-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.2.1
Web browser and version
All
Operating system
All
Steps to reproduce this
Steps:
To use .modify() in instance mode, you have to call it like this:
baseMaterialShader.modify(({ p5 }) => {
p5.getWorldInputs((inputs) => {
inputs.position.x += 5
return inputs
})
}, { p5 })Currently, the new build*Shader methods don't pass along the second context object:
Lines 708 to 710 in 276a96a
| fn.buildFilterShader = function (callback) { | |
| return this.baseFilterShader().modify(callback); | |
| }; |
It needs to do so to be able to support that syntax, e.g.:
buildMaterialShader(({ p5 }) => {
p5.getWorldInputs((inputs) => {
inputs.position.x += 5
return inputs
})
}, { p5 })Reactions are currently unavailable