Refactor global node handling and add millis function by perminder-17 · Pull Request #8530 · processing/p5.js
Resolves #8474
Changes:
Added support for millis(),
Here's the result.
https://editor.p5js.org/aman12345/sketches/YPHvvipq7
In the code side we are doing nothing but
getOrCreateUniformNode: This function checks if a StrandsNode for a given uniform already exists. If it exists, it returns the cached node. If it doesn’t, it registers the uniform in strandsContext.uniforms (only once), builds the IR variable node, wraps it using createStrandsNode to make a StrandsNode, stores it in the cache, and returns it.
Using the same function as an helper for getBuiltinGlobalNode as we do same stuffs there for global property like mouseX etc.
PR Checklist
-
npm run lintpasses - Inline reference is included / updated
- Unit tests are included / updated