Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacement of es5 functions to es6 classes feat p5.soundFile #531

Merged
merged 1 commit into from
Aug 29, 2020

Conversation

endurance21
Copy link
Collaborator

all test working fine !

@therewasaguy @kyle1james please review this pr!

Screenshot from 2020-08-20 19-01-22

Copy link
Member

@therewasaguy therewasaguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! This class has a lot going on (more than it should!)

* </code></div>
*/
save(fileName) {
p5.prototype.saveSound(this, fileName, 'wav');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should import saveSound (perhaps this is handled in an upcoming PR?)

constructor(paths, onload, onerror, whileLoading) {
if (typeof paths !== 'undefined') {
if (typeof paths === 'string' || typeof paths[0] === 'string') {
var path = p5.prototype._checkFileFormats(paths);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something for the backlog: we should probably import checkFileFormats and remove it from the p5 prototype

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we've started taking care of this in #540, fantastic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants