-
-
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
All
Web browser and version
All
Operating system
All
Steps to reproduce this
Steps:
- Turn off FES
- Draw a cylinder with a high level of detail
- It still logs a warning
That's because these sorts of warnings are raw console.logs in the codebase:
p5.js/src/webgl/3d_primitives.js
Lines 2582 to 2585 in 9799ead
| console.log( | |
| 'Cannot draw stroke on cylinder objects with more' + | |
| ' than 24 detailX or 16 detailY' | |
| ); |
Snippet:
p5.disableFriendlyErrors = true
function setup() {
createCanvas(400, 400, WEBGL);
cylinder(20, 100, 40, 40)
}Additionally, this also triggers when you are drawing to a p5.Geometry, i.e.:
function setup() {
createCanvas(400, 400, WEBGL);
const myGeom = buildGeometry(() => cylinder(20, 100, 40, 40))
noStroke()
model(geom)
}Arguably we should just silence this error if inside of buildGeometry since we don't know if it will eventually be drawn with strokes or not, to avoid misleading false positives.