Feature Library

Vehicle showcase with x-ray

0.87 GPU · 2.21 CPU ms
A still of the Vehicle showcase with x-ray demo
Still
The live demo starts when it’s in view.Pick a part on the car or in the list · X for x-ray · drag to orbit · click, then scroll to zoom

A staged bay for any glTF vehicle whose parts are named nodes.

What it costs a frame

0.87 ms
2.21 ms
GPU
0.87 ms
CPU, median
2.21 ms
CPU, 95th pct
4.79 ms
Draw calls
314
Weight
Heavy

Measured 11 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: The Stiletto SP (139k triangles as fitted) in the bay with its floor mirror (a second pass of the car): a part swapped with its ceremony every 1.2 s, x-ray toggled every 4 s, the camera turning slowly. At rest the bay draws nothing. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool0.872.214.79
apple · Apple A19 Proin a browser tab · 16 November 20266.591.482.64
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20269.504.796.12

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

How steadily it runs on Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab

Typical frame ?
20.76 ms
1% low ?
26 fps
Varies by ?
±2.67 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
p50p95p9915.47 ms39.64 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run back to back, each starting once the GPU has finished the last, so frame times show the work itself. They have a floor of about 4–5 ms from the browser’s own scheduling: GPU and CPU ms stay the measure of cost.

Frames

Median (p50) ?
20.76 ms
p95 ?
24.53 ms
p99 ?
29.33 ms
Slowest ?
42.79 ms
Mean ?
20.98 ms
Standard deviation ?
2.67 ms
1% low ?
26 fps
0.1% low ?
23 fps
Hitches ?
2 of 600
Over budget ?
588 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.1 / 5.6 / 13.4 ms

Input

No input during this run. A browser-tab run plays none.

Memory

JavaScript heap ?
112 → 112 MB
Growth ?
+0.18 MB

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
three.js 0.187.0No other packages

What it’s for

  1. Car and product configurators
  2. Automotive paint: metallic, pearl, candy, satin, colour-shift
  3. A game’s garage or workshop screen
  4. Showing what is inside a machine
  5. Part pickers with rules
  6. Press and review pages for a 3D model
  7. Spoilers, flaps and louvres that deploy with speed

Pitfalls, in brief

  1. A strict Content Security Policy breaks the Stiletto twice: without 'wasm-unsafe-eval' three’s meshopt decoder cannot compile (EXT_meshopt_compression is required, so nothing loads), and without blob: in connect-src and img-src GLTFLoader cannot load the two embedded carbon-weave PNGs.
  2. The x-ray rule is the selected part’s alone: with x-ray on it is never glass (solid, with a sheen only where it is seen); with x-ray off it is the only thing glowing through the body.
  3. A part’s nodes are found by the content, not by name patterns: every node any part names for a mount is that mount’s candidate, all but the fitted one hide, and hinged panels never hide (a door skin can sit under a permanent hinge).
  4. Running gear is matched by name (RUNNING_GEAR), and Engine must not take in EngineCover: the Stiletto’s engine cover stayed solid over its engine under x-ray.
  5. Under x-ray, pick the solid parts first: the glass round them is hit first by any ray and is never what was pointed at.
14 more in brief
  1. Paint as uniforms: a finish that turns clearcoat, sheen or iridescence on as a value (iridescence > 0) is a new shader, a stall on first use.
  2. Flakes smaller than a pixel sparkle a pixel at a time and flash as the camera moves.
  3. Flakes in a 3D grid (cells in the mesh’s own space, no UVs) show stripes where a panel lies almost along the grid if each sphere is jittered only round its cell’s middle.
  4. A flake drawn as its own little mirror in the paint’s lighting comes out darker than the paint wherever its tilt misses the softboxes: grey grit on a white or silver car.
  5. Near-white paint sits on the tone mapper’s shoulder, where tints are squeezed out: a white pearl’s base sits below paper white (about 0.75) so its warm-to-cool travel survives.
  6. One material serves many parts (the carbon, the body paint): a part’s swap sweep is read per object as it draws (uniform().onObjectUpdate), so no part needs a material of its own and nothing compiles mid-swap.
  7. The floor mirror (reflector) renders once a node frame.
  8. See-through double-sided glass is drawn in two passes and compiled as a third variant unless compileAsDrawn is installed; keep the pipelines (keepPipelines), or toggling x-ray off and on again recompiles them.
  9. Compile every part, x-ray glass on every layout and both marks at load, with everything held visible: hidden parts are skipped by compileAsync, and a part with a UV set (the carbon weave) is a different pipeline from one without.
  10. Frame with what the panel leaves: a camera view offset moves the car into the free area, and the fit uses that area’s field of view and shape, or the car sits under the controls.
  11. A speed schedule read at the road speed alone makes the wing hunt: a speed hovering over a step (a car holding 68–72 km/h) raises and lowers it all the time, and the air brake flutters with a pedal held at its threshold.
  12. ActiveAero takes each node’s pose as it finds it as the stowed one.
  13. Draw on demand: the bay draws while the camera, a hinge, a sweep or the marks’ breathing moves, then stops.
  14. On an integrated GPU (an Intel Arc 140V: about 9.5 ms GPU and 4.8 ms CPU for the bench, 11× and 2× the reference laptop) lighten the floor mirror, not the car: it is a second pass of all of it.
19 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

Stiletto SP model and parts (HaTac): The owner’s own vehicle, its 81 parts and its review builds.

Arseny Kapoulkine, meshoptimizer: The model was packed with its encoder (MIT, a tool run once, not shipped); three’s own WebAssembly decoder reads it where the page allows WebAssembly, and the library’s TypeScript decoder (meshopt-decoder.ts, matching it byte for byte) where it does not.

Khronos EXT_meshopt_compression and KHR_meshopt_compression specifications: The bitstreams and filters the TypeScript decoder is written from (a copy of gltf-motion’s).

Christophe Schlick, “An Inexpensive BRDF Model for Physically-based Rendering” (1994): The Fresnel term of the softboxes in the floor.

Mark Jarzynski and Marc Olano, “Hash Functions for GPU Rendering” (JCGT, 2020): The PCG hash (three’s `hash` node) that places, keeps or drops and tilts each flake.

Khronos PBR Neutral tone mapper (three’s NeutralToneMapping): Keeps the swatches’ own colour under the bay’s light.

WAI-ARIA Authoring Practices Guide (W3C): The Tabs pattern (the slots, vertical, manual activation) and the Radio Group pattern (the parts and colours).

vehicleconfiguratorx-raymoddingglTFmeshoptstudioreflectorturntablecamera presetspickingcompileAsyncdraw on demandtslcar paintmetallic flakepearlescentclear coatanti-aliasingactive aerospeed schedulehysteresis

Near it in the frame