placeAt

function placeAt
placement.ts:127
placeAt(origin: RenderOrigin, position: UniverseVector, radius: number, eye: Vec3, thresholds?: LodThresholds) → RenderPlacement

Place a body, as seen from eye.

eye is the camera's position in render space — toRenderSpace(origin, cameraPosition), which buildScene has already computed. It is a required argument rather than a defaulted one because getting it wrong is silent, and the symptom shows up somewhere else entirely.

The reason it cannot be the origin: compression is radial, so the point it is measured from is the one place in the image that stays honest. The origin is not the eye — it is a power-of-two grid point within REBASE_THRESHOLD of the camera, so it lags the camera by up to 4 km and then snaps. Measuring compression from there gives every compressed object a parallax that is wrong by eyeOffset · (1/compressed − 1/true) and, worse, sawtooths: the error ramps as the camera drifts across the rebase window and resets when it snaps.

That error is scale-free in meters, so what decides whether it is visible is how big the object is on screen. Mars from 25,000 km absorbs it a thousand times over. Phobos, at 11 km of radius from the same place, moved by 0.8× its own angular radius every time the origin rebased, and Deimos by 1.6× — the two smallest bodies in the Solar System model, vibrating in their orbits while everything around them held still. rendering.test.ts pins the property that fixes it: the drawn direction from the eye is the true direction from the eye, at any separation.

originRenderOrigin
Undocumented
positionUniverseVector
Undocumented
radiusnumber
Undocumented
eyeVec3
Undocumented
thresholdsLodThresholds

Where the representation changes, for the lens this frame is taken with.

Only the point-to-billboard step moves with it, and only because that step is a claim about pixels. A caller with no lens gets the flight one over the baseline viewport, which is what LOD_THRESHOLDS states.