applyMatrix3 method

BufferAttribute<NativeArray<num>> applyMatrix3(
  1. Matrix3 m
)

Implementation

BufferAttribute applyMatrix3(Matrix3 m) {
  if (itemSize == 2) {
    for (var i = 0, l = count; i < l; i++) {
      _vector2.fromBufferAttribute(this, i);
      _vector2.applyMatrix3(m);

      setXY(i, _vector2.x, _vector2.y);
    }
  } else if (itemSize == 3) {
    for (var i = 0, l = count; i < l; i++) {
      _vector.fromBufferAttribute(this, i);
      _vector.applyMatrix3(m);

      setXYZ(i, _vector.x, _vector.y, _vector.z);
    }
  }

  return this;
}