Abstract
Gets the number of bytes per component in the underlying typed array.
Bytes per component
Gets the class name of this vector instance.
The constructor name of the class
Gets the GLSL string representation of the vector as float values.
GLSL-formatted string for float values
Gets the GLSL string representation of the vector as integer values.
GLSL-formatted string for integer values
Gets the WGSL string representation of the vector as float values.
WGSL-formatted string for float values
Gets the WGSL string representation of the vector as integer values.
WGSL-formatted string for integer values
Gets the x-component (first component) of the vector.
The x-component value
Calculates the dot product between this vector and another vector.
The vector to calculate dot product with
The dot product result
Checks if this vector is approximately equal to another vector within a specified tolerance.
The vector to compare against
Optional
delta: numberOptional tolerance value for comparison
True if vectors are approximately equal, false otherwise
Checks if this vector is strictly equal to another vector (exact equality).
The vector to compare against
True if vectors are exactly equal, false otherwise
Checks if the internal storage shares the same ArrayBuffer as the provided one. Useful for determining if vectors share underlying memory.
The ArrayBuffer to compare against
True if the same ArrayBuffer is used, false otherwise
Calculates the distance from this vector to another vector.
The target vector
The distance between the vectors
Abstract base class for vector implementations. Provides common functionality and defines the interface that all vector classes must implement. This class handles basic vector operations and serves as a foundation for specific vector types.