Home > rc-js-util > Vec4
Vector 4.
Signature:
export declare abstract class Vec4<TArray extends TTypedArray> extends ATypedArrayTuple<4, TArray>
Extends: ATypedArrayTuple
See static properties for constructors. Instances are not an extension of this class, but of the static members.
| Property | Modifiers | Type | Description |
|---|---|---|---|
| “0” | number | x | |
| “1” | number | y | |
| “2” | number | z | |
| “3” | number | w | |
| constructor | IVec4Ctor<TArray> | ||
| constructors | static |
Map<TTypedArrayCtor, Function> | |
| f32 | static |
IVec4Ctor<Float32Array> | |
| f64 | static |
IVec4Ctor<Float64Array> | |
| i16 | static |
IVec4Ctor<Int16Array> | |
| i32 | static |
IVec4Ctor<Int32Array> | |
| i8 | static |
IVec4Ctor<Int8Array> | |
| TTypeGuardVec4 | true | ||
| u16 | static |
IVec4Ctor<Uint16Array> | |
| u32 | static |
IVec4Ctor<Uint32Array> | |
| u8 | static |
IVec4Ctor<Uint8Array> | |
| u8c | static |
IVec4Ctor<Uint8ClampedArray> |
| Method | Modifiers | Description |
|---|---|---|
| castToBaseType() | Although the typed array tuples extend a typed array, they are not structurally compatible. This function returns the argument passed without modification but cast as the underlying storage type, e.g. Float32Array. | |
| copyFromBuffer(_memoryDataView, _pointer, _littleEndian) | If endianness is not supplied the platform’s endianness will be used. | |
| copyToBuffer(_memoryDataView, _pointer, _littleEndian) | If endianness is not supplied the platform’s endianness will be used. | |
| getCtor(ctor) | static |
|
| getLoggableValue() | ||
| getPackedRGBAColor(_normalized) | ||
| getW() | ||
| getX() | ||
| getY() | ||
| getZ() | ||
| isEqualTo(_other) | Component-wise equals. | |
| setRGBAColor(_packedRGBA, _normalize) | ||
| setW(_w) | ||
| setX(_x) | ||
| setY(_y) | ||
| setZ(_z) | ||
| update(_x, _y, _z, _w) |