-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
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.0.5 (2.0+)
Web browser and version
Any
Operating system
Any
Steps to reproduce this
Steps:
- Create geometry with a circle in it:
buildGeometry(() => circle(0, 0, 100) - Don't actually draw the returned geometry
It draws to the screen anyway and the returned geometry has 0 vertices.
This is because some 3D primitive drawing functions call _drawGeometry(), which is currently a function that the renderer calls after it's checked if a buildGeoemtry is in progress. So circle and other methods that directly call _drawGeometry need updating.
Snippet:
function setup() {
createCanvas(400, 400, WEBGL);
geom = buildGeometry(() => circle(0, 0, 100))
console.log(geom.vertices.length)
}Live: https://editor.p5js.org/davepagurek/sketches/Eil5dyQA6