fix point() origin bug and stale per-vertex color leak#8712
fix point() origin bug and stale per-vertex color leak#8712ksen0 merged 2 commits intoprocessing:mainfrom
Conversation
|
https://editor.p5js.org/aman12345/sketches/FzSrg-6pj here's the build. |
|
I tried it out, also with some push/pops on color. It seems to function for me; the PR fixes the regression, but does not add parity for the weight effect, which is also mentioned in the issue. I checked earlier 1.x versions, and the behavior is indeed different between 1.x and 2.x - @davepagurek note the |
|
Agreed that it's not worth refactoring to fully match 2.x -- it's a pretty big/risky change to do that in 1.x at this point, and I wouldn't be surprised if some 1.x sketches depend on this behaviour and would break if we change it, even though the new behaviour is more consistent overall. |
Agreed. And thanks for the illustrations, @perminder-17 I think it'd be great to add those illustrations to the compatibility repo |
Sure, Thanks @davepagurek for the examples. |
|
Thanks for working on a fix @perminder-17! |
Yeah, happy to help! |




Resolves #8701
In
_drawPoints, we now sync incoming vertices intothis.immediateMode.geometry.verticesbefore_prepareBufferruns. This ensuresaPositiongets real point coordinates instead of falling back to(0,0,0).Color leak fix:
For direct
point()calls, we clear stalevertexStrokeColors(left over frombeginShape(POINTS)). This makespoint()use currentstroke()color whilebeginShape(POINTS)still uses per-vertex colors correctly.PR Checklist
npm run lintpasses