Feature Library

First view: a navigable stand-in of the world at once, handed over to the full scene without a pop

0.35 CPU ms
A still of the First view: a navigable stand-in of the world at once, handed over to the full scene without a pop demo
Still
The live demo starts when it’s in view.Drag to look round at once · Arrive again · Side by side · Slow start

The HaTac engine’s arrival view, engine-free in raw WebGPU: the first frame of a 3D world is drawn before anything costly is ready.

The world’s own landforms are rasterised on the CPU on a coarse grid with the erosion’s starting shape laid over them (the ground the bake will start from, band-limited to what the grid can show, slumped and filled roughly as the bake will leave it, while the GPU compiles), and drawn as one faceted mesh with a silhouette for every tree and landmark, under a gradient sky with haze from depth, tone-mapped as the full scene is, on the same camera and the same reverse-Z conventions; the controls work from that first frame. A start runs in the engine’s order: the stand-in presented first, then each stage of the full scene (bakes, compiles, materials, sky, scatter) as a job awaited in turn, so the page stays live between them; when the last is ready the full scene draws under the stand-in for one frame, then the stand-in fades out over it and its targets are released. The demo is a valley whose stand-in is on screen in a fraction of a second (0.16 s on a warm restart here) while terrain-world’s eroded valley, material-bake’s ground, sky-atmosphere’s sky and clouds, its trees, tarn and a stone beacon are built behind it, with an arrival line timing every stage, a side-by-side split to compare the two, and a slowed start to watch each stage land.

What it costs a frame

0.35 ms
GPU
not used
CPU, median
0.35 ms
CPU, 95th pct
0.61 ms
Draw calls
0
Weight
Light

Measured 28 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 158, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged CPU 0.32–0.38 ms). What ran: Alone: the stand-in only, as the arrival view draws it while a scene loads: the valley’s preview at 12 m (65 × 65) and the ranges at 256 m (64 × 64, the valley’s cells cut out), about 1,250 tree silhouettes and the beacon in one indexed draw into a 4× multisampled HDR target, then the host’s present (sky gradient, haze from depth, tone map) into the canvas, at 1920×1080; the camera circles slowly. Phones: tiers are being measured next.

How steadily it runs on RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference

Typical frame ?
16.89 ms
1% low ?
55 fps
Varies by ?
±0.48 ms
All metricsRTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
p50p95p9916.02 ms18.15 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.

Frames

Median (p50) ?
16.89 ms
p95 ?
17.77 ms
p99 ?
18.09 ms
Slowest ?
18.30 ms
Mean ?
16.90 ms
Standard deviation ?
0.48 ms
1% low ?
55 fps
0.1% low ?
55 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.1 / 0.5 / 0.9 ms

Input

No input during this run.

Memory

JavaScript heap ?
39.5 → 35.5 MB
Growth ?
-3.92 MB

Browser

JavaScript a frame ?
0.42 ms
All tasks a frame ?
0.91 ms
Layout / style ?
0.00 / 0.00 ms
Main thread busy ?
5%

Garbage collection

Collections ?
3 (2 minor, 1 major)
Pauses ?
6.2 ms in all, longest 1.9

What it needs

Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
NothingNo other packages
With an agent
install("first-view")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it up

What it’s for

  1. A 3D world, game or map that should be on screen and turnable the moment the page opens, while its terrain bakes and its pipelines compile
  2. A configurator or product scene that shows the object’s silhouette at once and fades into the finished render without a jump
  3. A level or region change: the next place as a stand-in on the same camera while it streams in, so the player keeps moving
  4. A start sequence that runs the costly work in stages, keeps the page responsive between them and times each one
  5. A quick, cheap preview of procedural terrain from its recipe (landforms and shape noise) on the CPU, without the GPU bake
  6. Comparing a level-of-detail stand-in with the full scene side by side, to tune it until the hand-over cannot be seen

Pitfalls, in brief

  1. The demo needs WebGPU: the stand-in, and the full scene behind it, are WebGPU render and compute passes, and there is no WebGL path.
  2. Draw the stand-in before the full scene asks for anything: create the arrival’s pipelines first (they compile in the GPU process), rasterise the preview on the CPU while they compile, present, and only then start the bakes and the scene’s pipelines.
  3. Keep the preview cheap: a coarse grid is only worth it if it is back before the compiles are.
  4. Lay the erosion’s starting shape over the landforms (shapeGround), not the landforms alone.
  5. A coarse backdrop must not show through, nor dam, a finer ground.
9 more in brief
  1. Use the same camera, units and depth convention as the full scene (cameraMatrices here is sky-atmosphere’s host’s, line for line: camera-relative, reverse-Z, infinite far plane), the same tone map and exposure, and the full scene’s own key light for the stand-in’s sun (keyLight from the same air).
  2. Fade the whole arrival image over the finished scene, sky included (the engine’s fullFrameFade), when the full scene has its own sky, haze or clouds: the host blends its own tone-mapped frame at an opacity, so whatever draws underneath (a sky host, three.js) needs no changes.
  3. Draw the full scene under the stand-in at full cover for one frame before the fade starts: its first use binds every pipeline and uploads what is left, and a hitch there is hidden behind the stand-in instead of landing in the fade. startWorldView starts a job’s fade when its build resolves, so make that warm frame part of the last job’s build.
  4. Plant the trees once, before the bake, and give the same list to the stand-in and to the full scene’s scatter (the full scene drops only those the finished ground rejects: the tarn, the wettest channels, bare rock), so every silhouette turns into its own tree in the hand-over.
  5. Blend the ground the camera stands on with the hand-over: the stand-in’s height until the fade starts, the finished ground’s after it (the engine’s README: “blend the camera height as the full scene replaces the preview”).
  6. Release the stand-in once the fade is done: its colour and depth targets are the size of the screen (with 4× MSAA, 66 MB of colour and 33 MB of depth at 1080p).
  7. Make an earlier start stale when a new one begins (Arrive again, a setting that restarts the scene), and have its jobs check that after every await: startWorldView cannot be cancelled.
  8. startWorldView’s nextFrame waits for requestAnimationFrame, which a hidden tab (or a hidden pane) throttles or stops: the start then stalls until the page is seen.
  9. Reduced motion keeps the hand-over (a fade is not motion) but stops the demo’s idle drift and the clouds; the stand-in itself never moves on its own.
14 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Adapted from published work, named below.

Hannes Andersson: The HaTac engine’s arrival view, its fast-start decisions, measurements and tests; the library’s host, preview and demo.

loadingfirst frametime to first frametime to interactivestand-inplaceholderproxyimpostorsilhouettearrivalstartupcold startwarm startprogressive loadingstaged loadingbackground buildhand-overcross-fadefadeno popshader compilepipeline compilestallhitch

Near it in the frame