rebase

function rebase
origin.ts:116
rebase(origin: RenderOrigin, camera: UniverseVector, grid: number) → RenderOrigin

Move the origin to the snapped grid point nearest the camera.

Snapping is what keeps this exact: the delta is an integer multiple of a power of two, so translate adds it without rounding and every render coordinate shifts by a value float32 can hold exactly.

originRenderOrigin
Undocumented
cameraUniverseVector
Undocumented
gridnumber
Undocumented

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