-
Notifications
You must be signed in to change notification settings - Fork 25
remove TAU, TWO_PI #78
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
Conversation
These constants are not used by the library itself internally, but are defined so that the user code can reference them. They are not conventionally exported like they would be from a normal library which can be confusing, but this was a tradeoff we've made to make the user code be as minimal and as quick to script with as possible. See issue #59 as an alternative setup we've considered.
Thanks, I will read it later.
For extra context, the way we run use code is by using eval near the bottom of the file. This allows maybe variables to automatically be in scope without having to import everything, which makes it faster/easier for quickly scripting in the live editor, but more challenging for building standard applications with the library. P5.js also has two different modes that it can operate in for this reason, that linked issue I mentioned is one possible compromise.
eval function here
Hi, PWhiddy
Do you mean P5.js itself also use eval function for live editor and use another method for building the application library? Is there any further information for these two different modes in P5.js codebase (e.g. Github link)? Thank you.
Here is some documentation of p5's "instance mode" vs "global mode"
https://github.com/processing/p5.js/wiki/p5.js-overview#instantiation--namespace
I found that the parameter TAU is the same as TWO_PI and both of them have never been used in sculptToGLSL function, so I remove both of them.