Module 05 / SPLINE
Spline scene
Modular by design
Real-time 3D scenes designed visually, then wired to the page through variables and events, without writing a renderer.
Why it matters
- What you're looking at
- The FH01 in a Spline scene: the page's values turn its dial, swing its light and spin it through Spline variables; click a part and an event comes back to the page.
- Why it matters
- The quickest route from a designer's scene to an interactive page: materials, lights, states and interactions are authored, not coded.
- The trade-off
- A heavy runtime (about 1.3 to 1.6 MB over the wire), little control over rendering, and the scene's logic lives in Spline's editor, not in your code.
Loading stage…
Module notes
The FH01 Field Headphones in real-time 3D: cups, drivers and boards slide apart and lock back together. Understandable, repairable, built to last, and wired both ways to the page.
- This browser
- checking…
- Native path
- Spline runtime (WebGPU, or WebGL 2) needs WebGL 2
- Fallback
- Static poster needs nothing extra
- Status
- Live since 2026-10-11
- Payload
- Scene (fh01.splinecode, Draco meshes) · 598 KB
- Spline runtime · 276 KB
- Its WebGPU pipeline · 329 KB (on WebGPU)
- Sky textures (the runtime's) · 307 KB
- Draco decoder · 98 KB
- Stage code · 4 KB
- Budget
- Payload 1.3 MB · budget ≤ 1.5 MB Within
- First frame desktop 2.2 s · phone 0.8 s · budget ≤ 3.0 s Within
- Frame rate desktop 60 fps · phone 60 fps · budget ≥ 55 fps desktop · ≥ 30 phone Within
- Browser support
-
First version with each feature · caniuse, 2026-10-11Feature Chrome Safari Firefox WebGL 2 (the Spline runtime) 56 15 51 WebGPU (its node-material pipeline) 113 26 141 WebAssembly (the Draco mesh decoder) 57 11 52 - Tags
Module 05 / Use it on your page
Design the scene in Spline, export it as a .splinecode file, and Spline's runtime plays it on a canvas. Variables and events connect it to your page.
npm @splinetool/runtime 2.0 (276 KB, +329 KB on WebGPU) · one .splinecode (598 KB gzipped) · Draco decoder (98 KB)
-
Step 1
Export the scene
In Spline: Export ▸ Code, then download the .splinecode and host it yourself. Spline's hosted URL works too, but ties the page to Spline's servers.
-
Step 2
Load it
wasmPath points the runtime at your copy of its Draco decoder and sky textures, which otherwise come from Google's and Spline's CDNs.
import { Application } from "@splinetool/runtime"; const app = new Application(canvas, { wasmPath: "/assets/spline/runtime" }); await app.load("/assets/spline/fh01.splinecode"); -
Step 3
Set variables
Variables bound in the scene move it: here explode takes the headphones apart, and turn rotates them. Bound rotations are in degrees.
app.setVariables({ explode: 1, turn: -44 }); console.log(app.getVariables()); -
Step 4
Listen to the scene
Objects with events report back to your page: a click names the part.
app.addEventListener("mouseDown", (e) => { console.log("clicked", e.target.name); });
Serving it
- Serve .splinecode as application/octet-stream and gzip it.
- Pause it offscreen with app.stop(), and start it again with app.play().
- An object that carries events ignores position writes from script: move its parent instead.
- No code at all: Spline's own viewer embed plays the scene too, with less control from the page.