Vec3

interface Vec3

Double-precision 3-vector, in whatever frame the caller is holding.

This is not a universe position — see universeVector.ts for that. A Vec3 is always a displacement or a frame-local coordinate, where double precision is plenty (a 1e6 m local frame has 0.2 nm resolution).

Plain readonly objects rather than a class: they survive structuredClone to a worker, JSON round-trips without a codec, and the engine keeps them in one hidden class as long as the field order below is preserved everywhere.

vec3.ts:14

Members

xreadonly

x: number

yreadonly

y: number

zreadonly

z: number

Generated from the source of @inertialref/spatial and its comments. Nothing on this page is written by hand.