BONEYARD · part · bay
Range
src/42-range.js · one module, no third-party code
ParametersFactory
How it works
The Catalina grid arrives once (ctx.dem) as metres per cell. Two tables are built from it: a height in screen units (elevation above a 600 m basin floor, times the vertical exaggeration, over the cell size) and a colour per cell, the life-zone band for that elevation in feet, blended 120 ft into the next band and multiplied by a west-southwest afternoon hillshade from central differences. Each frame, for every column of a buffer whose long side is 384 pixels, a ray leaves the camera at that column's angle and steps outward in growing strides. A sample projects to screen y = horizon + (camera height - ground height) / distance * scale; if that is above everything drawn in the column so far, the span between is painted in the cell colour faded toward the tube's fog, and the column's y-buffer rises. Near ground paints first and hides the far ridges behind it, which is why no sorting is needed.
The camera flies at a fixed ground speed. On autopilot it turns toward the next of seven stops (the Catalina Highway base, Windy Point, Mount Lemmon, Mount Kimball, Pusch Peak, Sabino Canyon, downtown) and holds 320 m over the highest ground in the next 90 cells. Arrow keys or a sideways drag take the stick; a pause hands it back. The tour is stepped at a fixed 1/60 s to reach any t, so a deep link and the still land on the same pose as the Labs page. The horizon sits on the shared vanishing point; the sky and fog come from the tube's tokens; the landmark tags are DOM spans placed with the same projection and hidden when a ridge is in front of them.
Provenance
- technique
- Voxel Space: one ray per screen column marched front to back over a heightmap, each hit drawn as a vertical span above the column's running y-buffer; distance fog; hillshaded colour table
- lineage
- NovaLogic, Comanche: Maximum Overkill, 1992; adapted from a CC0 voxel demo at 3d-retro.com whose terrain was synthetic sine waves; ported from Voxel Catalinas (desertdatalabs.com/labs/voxel-catalinas/)
- original
- the heightmap is real: the Santa Catalina Mountains over the Tucson basin, 768 x 768 cells of about 64 m (AWS Terrain Tiles, Mapzen Terrarium, compiled from SRTM, USGS 3DEP/NED and others), coloured by the six Catalina Highway life-zone bands from 27 Miles; an autopilot tour of seven stops that any input interrupts; a readout of the true altitude and ground elevation under the camera; the same deterministic fast-forward as the Labs page, so #range?t=22 lands on the pose and readout the Labs page shows at t=22
- not
- a map for navigation: 64 m cells, an interpretive six-band life-zone framing (boundaries shift with aspect and have moved upslope), 2x vertical exaggeration by default (named in the readout; v = 1x)
- deps
- none · Canvas 2D · 2026-09
- budget
- 1.72 ms/tick in a 1440x900 workbench; 1.89 ms/tick at 390x844 touch emulation, 448 px long-side ray buffer; one-second local Chromium CPU samples, 2026-09-30, normal CPU rate; excludes GPU, raster and hardware phones
- api
- mount(canvas, params, ctx) -> { tick(dt, t, progress, pointer), resize(w, h, dpr), still(t), destroy() }
- license
- MIT, Desert Data Labs LLC · elevation: Mapzen terrain tiles; data from SRTM, NED, and others
Budget: 1.72 ms/tick in a 1440x900 workbench; 1.89 ms/tick at 390x844 touch emulation, 448 px long-side ray buffer; one-second local Chromium CPU samples, 2026-09-30, normal CPU rate; excludes GPU, raster and hardware phones