getComponent method

double getComponent(
  1. int index,
  2. int component
)

Returns 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. @return {number} The returned value.

Implementation

///
/// @param {number} index - The index into the buffer attribute.
/// @param {number} component - The component index.
/// @return {number} The returned value.
	///
	double getComponent(int index, int component ) {
		num value = this.array[ index * this.data!.stride + this.offset + component ];
		if ( this.normalized ) value = MathUtils.denormalize( value, this.array );
		return value.toDouble();
	}