This class describes a four-dimensional vector or an RGBA color.
Property | Type | Description |
---|---|---|
x, r | number | x component of the vector, or red channel of color |
y, g | number | y component of the vector, or green channel of color |
z, b | number | z component of the vector, or blue channel of color |
w, a | number | w component of the vector, or alpha channel of color |
Vec4 | Constructor | Vec4(number x) |
Vec4 | Constructor | Vec4(number x, number y) |
Vec4 | Constructor | Vec4(number x, number y, number z) |
Vec4 | Constructor | Vec4(number x, number y, number z, number w) |
Vec4 | Constructor | Vec4(Vec3& v, number w) |