You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found a workaround! But it's still a redundant & slower boilerplate; given we 1st need to create an instance and only then access its constructor: 😞 createVector().constructor.random3D()
const VECS=5,
RANGE=10,
vecs =Array(VECS);
function setup() {
noCanvas();
for (let i =0; i <VECS; vecs[i++] = createVector().constructor.random3D().mult(RANGE));
for (let i in vecs) print(`${i} -> ${vecs[i]}`);
}
W/o p5 there's no apparent way to invoke
static
methods like p5.Vector.Random3D(): 😿http://p5js.org/reference/#/p5.Vector/random3D
The text was updated successfully, but these errors were encountered: