setComponent method
Sets the given value to the given component of the vector at the given index.
@param {number} index - The index into the buffer attribute. @param {number} component - The component index. @param {number} value - The value to set. @return {InterleavedBufferAttribute} A reference to this instance.
Implementation
///
/// @param {number} index - The index into the buffer attribute.
/// @param {number} component - The component index.
/// @param {number} value - The value to set.
/// @return {InterleavedBufferAttribute} A reference to this instance.
///
InterleavedBufferAttribute setComponent(int index, int component, double value ) {
if ( this.normalized ){
value = MathUtils.normalize( value, this.array );
}
this.data?.array[ index * this.data!.stride + this.offset + component ] = value;
return this;
}