p5.js
p5.js copied to clipboard
Support strands shader variable names including double underscores
Resolves #8875 Resolves #8794
Changes:
- Explicitly initialize
strandsContextand add JSDoc comments for fields overview. - Support strands variable name including double underscores for uniform / varying / shared.
- Introduce internal strands variable namespace
_p5_strands_*. - Store
shaderNameMap,shaderNameStateinstrandsContextand shaderhooks. - Restore internal shader names like
_p5_strands_0back to the original user-facing names like__valin WebGL shader compile errors, to make debugging easier. - Add unit test for changed code
Tests Passed:
npm test -- test/unit/webgl/p5.Shader.jsnpm test -- test/unit/webgpu/p5.Shader.js
PR Checklist
- [ ]
npm run lintpasses - [x] Inline reference is included / updated
- [x] Unit tests are included / updated