3D in the browser 60 fps on a laptop
Cobra reveal
A car reveal that plays in the browser: a cloth cover slides off a 3D Cobra while the camera moves around it, rendered live rather than played back as a video.
- Type
- 3D demo in a web page
- Built with
- three.js, WebGL, Blender
- Runs
- Live in the browser, no video file
- Built
- November 2026
What it is
A product reveal that runs as a web page. You turn a knob, the lights come up, a cloth cover slides off the car and the camera moves around it to an end frame you can spin with the mouse. Nothing is pre-rendered: every frame is drawn by the browser, so it works at whatever size the screen is and the end frame stays interactive.
It is a demo I built to see whether a reveal like this could be done without a game engine, a build step or a framework. It is plain JavaScript modules with three.js loaded through an import map, served as static files behind nginx.
The cloth
The cover is the part that has to look real. It is simulated in Blender, then baked out as vertex positions per frame and played back in the browser, so the folds and the way it catches the light are identical every run and cost nothing to compute. Two problems came out of that: the cloth hovered a millimetre off the body in places, and it cut through the windscreen. Both were fixed with a shrink-wrap pass onto the car before baking.
Making it fast
On my laptop the first version ran at about 7 fps. Three things were wrong. The post-processing pass sized itself in device pixels, so every time the renderer dropped its resolution to catch up, the expensive pass kept running at full size. The resolution logic judged frame times over 30-frame windows, which at 7 fps took 20 seconds to react. And the shadow map was redrawn every frame even when nothing had moved.
After fixing those, merging the car by material (700 draw calls down to 380), precompiling the shaders at load and halving the size of the glow blur, frame time went from about 52 ms to 35 ms on the same laptop, and it holds 60 fps on anything newer.
Serving it
It sits behind a password box. nginx serves the files only when a cookie matching a hash in the config is present, so an unauthenticated request never reaches the assets, and repeated wrong passwords from one address get rate limited. The page has a content security policy that allows the import map by hash, which means adding a script is a deliberate act rather than an accident.
Credit
The car model is "1965 AC Shelby 427 Cobra S/C" by Ddiaz Design, used under CC BY-NC-SA 4.0. The studio, lighting, cloth, camera work and all of the code are mine.

Contact
Looking for internship, part-time or contract work in tech, security most of all. Studying cybersecurity at Victoria University of Wellington.
- [email protected]
- Phone
- 027 210 1490