Sets the value at the specified index of the vector.
This method allows you to change a specific component of the vector by providing its index and the new value you want to set. Think of the vector as a list of numbers, where each number represents a different direction (like x, y, or z). The index is just the position of the number in that list.
For example, if you have a vector with values [0, 20, 30], and you want to change the second value (20) to 50, you would use this method with index 1 (since indexes start at 0) and value 50.
Examples
Syntax
setValue(index, value)
Parameters
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.