Sets the the vector to a new value.
set() can use separate numbers, as in v.set(1, 2, 3), a p5.Vector object, as in v.set(v2), or an array of numbers, as in v.set([1, 2, 3]).
Examples
Syntax
set([x], [y], [z])
set(value)
Parameters
x
Number: x component of the vector.
y
Number: y component of the vector.
z
Number: z component of the vector.
value
p5.Vector|Number[]: vector to set.
Notice any errors or typos? Please let us know. Please feel free to edit src/math/p5.Vector.js and open a pull request!
Related References
textToContours
Returns an array of arrays of points outlining a string of text written using the font.
textToModel
Converts text into a 3D model that can be rendered in WebGL mode.
textToPaths
Returns a flat array of path commands that describe the outlines of a string of text.
textToPoints
Returns an array of points outlining a string of text written using the font.