p5.js
p5.js copied to clipboard
[p5.js 2.0+ Bug Report]: Benchmark cleanup passes p5.model to freeGeometry
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [x] WebGL
- [x] WebGPU
- [ ] p5.strands
- [ ] Build process
- [x] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
p5.js version
main branch (commit 92763e5bf)
Web browser and version
Google Chrome 150.0.7871.187 (Official Build, arm64)
Operating system
macOS 15.7.3 (Build 24G419)
Steps to reproduce this
Steps:
- Clone the
p5.jsrepository and check outmainat commit92763e5bf. - Install dependencies with
npm install. - Run:
npx vitest bench test/bench/cpu_transforms.bench.js. - Observe the FES validation message in the terminal output.
Snippet:
In test/bench/cpu_transforms.bench.js:
const shape = myp5.buildGeometry(drawCircles);
myp5.model(shape);
myp5.freeGeometry(myp5.model);
Observation:
The freeGeometry() function should receive the geometry instance created by buildGeometry(). Correcting the call to myp5.freeGeometry(shape) eliminates the validation messages and ensures a clean benchmark run.
Additional Context:
I discussed the finding with @davepagurek in the p5.js Discord. He confirmed that shape is the correct argument and asked that I create an issue before submitting a PR.