Repository navigation
Conversation
| height?: number; | ||
| base?: string; | ||
| scripts?: string[]; | ||
| includeWebGPU?: boolean; |
There was a problem hiding this comment.
Awesome, thanks for wiring this up!
| // Adapted from https://openprocessing.org/@golan/2405195 | ||
| function bodyField() { | ||
| const points = uniformStorage(dataStorage); | ||
| const progress = uniformFloat("u_progress"); |
There was a problem hiding this comment.
Minor: we can simplify this a little by omitting the manual uniform name here, and then it defaults to the variable name, so you can call .setUniform('progress', something) later
| const coord = filterColor.texCoord; | ||
|
|
||
| // Find the distance from this pixel to the nearest body point. | ||
| let minDist = 1.0; |
There was a problem hiding this comment.
Another small simplification: in strands, we use the js convention of every number being a float, so you don't need the .0 suffix in the code for it to work!
| <EditableSketch code={code} /> | ||
| <EditableSketch | ||
| code={code} | ||
| scripts={example.data.scripts} |
There was a problem hiding this comment.
Maybe if there are other scripts to include we should add something below the code? Either automatically here when they're included, or in the description of the sketch, so people know if they copy and paste the code that they have to add some other scripts too?
|
Hello! I'm so sorry that this got auto-closed when I merged Dave's PR, that wasn't the intent! @pearmini are you able to reinstate the branch? I can't reopen as the branch is closed! |
Adds an interactive Body Field example using ml5.js @shiffman body tracking and p5.strands, created at OSACC 2026. Inspired by @golanlevin and @davepagurek 's great work!
Also enables example pages to load additional libraries and the WebGPU addon.