-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[p5.js 2.0 Bug Report]: buildGeometry isn't saving per-vertex stroke colors #7840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @davepagurek,
Just trying to understand if this is a gap in implementation or a broader design constraint within the WebGL mode. |
Not intentionally, I think it was just overlooked. The per-vertex fills are currently added here and we'd have to do something similar for per-vertex stroke colors: p5.js/src/webgl/GeometryBuilder.js Lines 100 to 103 in d51184b
p5.js/src/webgl/p5.Geometry.js Lines 48 to 51 in d51184b
In terms of what to expect when debugging, both of those arrays could be empty if there are no per-vertex colors at all, or it could be a flattened array of color channel values (the comment in |
Thanks @davepagurek, Got it. I've raised a pr for this which populates the vertexStrokecolor |
Most appropriate sub-area of p5.js?
p5.js version
2.0.2
Web browser and version
Firefox
Operating system
MacOS
Steps to reproduce this
Steps:
buildGeometry
, draw a shape with per-vertex stroke colorsThe stroke vertex colors property of the geometry is an empty array, so it seems it's not getting created. Not sure if this is related or just a documentation/FES bug, but it also logs this message:
Snippet:
Live: https://editor.p5js.org/davepagurek/sketches/uEPGri4DK
The text was updated successfully, but these errors were encountered: