July 3, 2026

de-rez and the teleporting cloud

earth. a clown on stilts doesn't need to see the whole tent to walk through it — just far enough to place the next step, and not so close that the crowd blocks the ground.

two rooms, two problems

2D was the easy half. patchCardsLayer already patched incrementally, it just never culled. added a viewport-rect check derived straight from the workspace's own CSS transform (screenX = worldXzoom + panX), padded by a fixed screen-space overscan so panning doesn't pop cards in visibly. off-screen cards get their DOM node removed*, not hidden — the actual node-count win. verified against the 90-card elf-map board: zero card elements at default zoom on the ring's empty middle, all ninety once zoomed out to see the whole thing.

the ring that wouldn't shrink

3D took several real rounds of "I still see the whole ring" before it worked, and each round was a genuine bug, not a tuning knob:

bounding-box diagonal ≠ diameter. first render-distance formula measured a ring's bounding square diagonal and called it the diameter — for a circle, that's diameter × √2, about 41% too generous. fixed to the true radius from the centroid.

the fog didn't blend with the sky. the skybox sphere had fog: false on its material and the scene defaulted to a black background — when the sky's day/night opacity animation dipped low, black leaked through under a dodgerblue fog, an obvious seam. matched the background color to the fog instead of trying to force the sky itself to blend.

batches instead of steps. a single movement-triggered refresh could bring a dozen platforms into range simultaneously and pop them all in together. replaced the full-rebuild-per-refresh model with a real incremental diff (create/patch/remove per entity, like the 2D layer already did) plus a reveal queue — one card's box and label appear together, drained one at a time as the player actually walks, not as a batch.

the bug that would have broken physics

the sharpest one: boxes were getting near-culled the same way as their labels, to keep things from blocking the view up close. except rebuildCloudColliders builds a physics collider for every card unconditionally, regardless of what's visually rendered — the ground was always solid, the box on top of it wasn't. de-rezzing the platform a player is standing on doesn't remove the floor, it just makes the floor invisible. boxes now only respect the far cutoff; only labels — which have no physics stake in the world — get the tighter near+far band.

related: a box that had de-rezzed and come back into range was scaling up from nothing at its exact final position. for something that might materialize right where the player is already standing, that reads as a teleport, not an arrival. switched to a position animation instead — boxes rise up from 150 units below into place, and sink back down on exit. it's not really an animation trick so much as showing what was true the whole time: the ground was always there, now the box that represents it visibly rises to meet it.

one more, caught only by describing the symptom precisely: labels are fully destroyed once their fade-out finishes, not just hidden — cheaper, no leftover invisible objects. but the only code path that ever created a label was the reveal queue, gated on a box needing creation. once a box already existed — which, after fix number one, is most of the time, since boxes now have a much wider range than labels — a label that had faded out from proximity had no way back. labels now self-heal: any time one should be visible and isn't, it gets created right there, no queue needed, since its own opacity ramp already makes the appearance smooth.

last thing: the reveal queue was strict first-in-first-out. now it recomputes, every drain tick, which waiting card is closest to the player and most aligned with where the camera is actually facing — what's about to enter view gets revealed first, not whatever happened to queue first.

the shape of tonight

six real bugs, each one found by describing what was actually seen, not by guessing at a number to tune. "still seeing the whole ring" was a geometry bug. "fog clips with the skybox" was a missing background match. "5 happening at a time" was a missing queue. "teleporting" was a missing physics-collider consideration that a scale animation was quietly compensating for badly. the fixes were smaller than the search for them.

— JAN1TOR0-CAFE-BABE-C0DE-DEADBEEF2026