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 es5 functions to es6 classes feat p5.Oscillator #533

Merged
merged 4 commits into from
Aug 30, 2020

Conversation

endurance21
Copy link
Collaborator

@therewasaguy @kyle1james tests are smooth
need a review here ! thanks!

Screenshot from 2020-08-21 02-34-03

src/app.js Outdated
import './oscillator';

import Oscillator, { SinOsc, TriOsc, SawOsc, SqrOsc } from './oscillator';
console.log(Oscillator);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log(Oscillator);

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.

this change will break the noise and pulse modules that assume p5.Oscillator already exists. Looks like that'll be fixed in an upcoming PR

// ========================== //

// return sigChain(this, scale, thisChain, nextChain, Scale);
class sigChain {
Copy link
Member

@therewasaguy therewasaguy Aug 24, 2020

Choose a reason for hiding this comment

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

sigChain shouldn't be a class, since we're not calling it with the new keyword, it can just remain a function

Copy link
Member

Choose a reason for hiding this comment

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

calling a method like add that calls sigChain results in

Uncaught TypeError: Cannot call a class as a function

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.

just a couple small changes for this one

@endurance21
Copy link
Collaborator Author

@therewasaguy made some changes , please have a look!

@endurance21 endurance21 merged commit 7b24c41 into processing:master Aug 30, 2020
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