Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
tomhsiao1260 wants to merge 2 commits into shader-park:main from tomhsiao1260:yao/hotfix0
Closed

Conversation

Copy link
Contributor

@tomhsiao1260 tomhsiao1260 commented May 30, 2022

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.

Copy link
Member

PWhiddy commented May 30, 2022
edited
Loading

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.

Copy link
Contributor Author

Thanks, I will read it later.

Copy link
Member

PWhiddy commented May 31, 2022

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.

@tomhsiao1260 tomhsiao1260 deleted the yao/hotfix0 branch May 31, 2022 06:57
Copy link
Contributor Author

eval function here

PWhiddy reacted with thumbs up emoji

Copy link
Contributor Author

tomhsiao1260 commented May 31, 2022
edited
Loading

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.

Copy link
Member

PWhiddy commented May 31, 2022

Here is some documentation of p5's "instance mode" vs "global mode"

https://github.com/processing/p5.js/wiki/p5.js-overview#instantiation--namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /