Run example in manual-test-samples/webgl/geometry. It produces hundreds of errors saying,
p5.Vector.prototype.mult: n is undefined or not a finite number
which seems to trace up to trying to take the angle between two vectors [0, 0, 0] and a divide-by-zero NaN in p5.Geometry._getFaceNormal. happens for cylinder and cone on initialization, doesn't repeat again after first frame. other shapes in this example are fine.
This is from some colinearity or repeated points in the cone and cylinder geometry, presumably from the circular base. From my quick testing it looks like both exist. Ideally all geometries should be well formed so this shouldn't happen. As a guard against this we can escape early in the case of colinear points or repeated points. This is when sinAlpha is 0 or NaN.
(This is my first contribution! I would love to help a bit with p5.js since I found @shiffman on youtube and watched some of his videos.)
@tau- go for it! I can't assign it to you for some reason, but feel free to assign it to yourself so people know you're working on it!
I cannot assign this to myself either. I think the issue is that I am not marked as a contributor.
Most helpful comment
This is from some colinearity or repeated points in the cone and cylinder geometry, presumably from the circular base. From my quick testing it looks like both exist. Ideally all geometries should be well formed so this shouldn't happen. As a guard against this we can escape early in the case of colinear points or repeated points. This is when sinAlpha is 0 or NaN.
(This is my first contribution! I would love to help a bit with p5.js since I found @shiffman on youtube and watched some of his videos.)