Vector properties
These properties are found on all Vector instances
dimension
A number
representing the dimension of the Vector. Equal to vector.values.length
import { Vector } from 'volts';
const vec3 = new Vector(1,2,3);
vec3.dimension; // 3
signal
import { Vector } from 'volts';
const vec3 = new Vector(1,2,3);
vec3.signal; // Reactive VectorSignal(1,2,3)
new Vector(1).signal; // Reactive scalar
new Vector(1,2).signal; // Reactive point2d
new Vector(1,2,3).signal; // Reactive vector
new Vector(1,2,3,4).signal; // Reactive pack4
pointSignal
import { Vector } from 'volts';
const vec3 = new Vector(1,2,3);
vec3.pointSignal; // Reactive PointSignal(1,2,3)
Vector.components
This is a static property
An array containing all keys that a Vector might contain, in order. Keys capped to 4 dimensions
import { Vector } from 'volts';
Vector.components // [ 'x', 'y', 'z', 'w' ]
Last updated
Was this helpful?