Fix instance mode usage of uniformFloat() in shader.modify() example by aashu2006 · Pull Request #8470 · processing/p5.js
Navigation Menu
{{ message }}
processing / p5.js Public
- Notifications You must be signed in to change notification settings
- Fork 3.7k
Merged
davepagurek merged 2 commits intoprocessing:dev-2.0from
Feb 7, 2026Merged
Conversation
Copy link
aashu2006
commented
Jan 30, 2026
aashu2006
commented
Resolves #8467
Changes
- Fixed the instance mode example for
p5.shader.modify()in the reference. - Updated the example to use
sketch.uniformFloat('b')instead of callinguniformFloat()as a global function. - This aligns the example with correct instance mode usage, where all p5 APIs must be accessed via the sketch instance.
The issue occurred because the example already uses sketch.createCanvas() and sketch.background(), but missed prefixing uniformFloat() with sketch, causing a runtime error in instance mode.
PR Checklist
-
npm run lintpasses - [Inline reference] is included / updated
- [Unit tests] are included / updated (not applicable for documentation change)
aashu2006
mentioned this pull request
17 tasks
davepagurek approved these changes Feb 7, 2026
Copy link
Contributor
davepagurek
left a comment
davepagurek
left a comment
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the fix!
ksen0
added this to p5.js 2.x 🌱🌳
github-project-automation
bot
moved this to Completed
in p5.js 2.x 🌱🌳
ksen0
added this to the
2.3 milestone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment