Dev.to AI 🤖 Ai 👁 0 📖 1 min read

How I Fixed Z-Fighting Across 45 Procedural 3D Toys in Three.js (Tinker Shelf v1.0.1)

I just shipped Tinker Shelf v1.0.1, a cozy 3D screw-sorting puzzle built with Three.js, TypeScript, and 45 procedural Blender models — playable free in desktop and mobile browsers without installs or signups: Play in br

How I Fixed Z-Fighting Across 45 Procedural 3D Toys in Three.js (Tinker Shelf v1.0.1)

I just shipped Tinker Shelf v1.0.1, a cozy 3D screw-sorting puzzle built with Three.js, TypeScript, and 45 procedural Blender models — playable free in desktop and mobile browsers without installs or signups:

Play in browser: https://playgama.com/game/lumolite

What Changed in v1.0.1 (From Player Feedback)
Players immediately spotted two things in the initial web launch: subtle z-fighting flicker when orbiting complex layers and the lack of recessed holes after unscrewing a bolt.

  1. Zero Z-fighting across all 45 GLBs (Geometry + Hardware WebGL2 Oracle): Instead of eyeballing screenshots, we switched primitive assembly in Blender to manifold CSG unions, carved 1.0–1.5 mm physical clearances between overlapping meshes, enabled backface culling on solid/crystal materials, quantized Draco positions at 16-bit, and ran a 26-angle hardware-GPU WebGL2 depth-order parity oracle (LESS forward vs reversed draw order) across all 45 models in both assembled and layer-peeled states (45/45 models at 0 conflicting pixels).
  2. Real recessed brass screw holes & manual disassembly: Every unscrewed bolt now reveals a parented recessed bore + brass collar ring sitting cleanly proud along the surface normal, and Fever no longer auto-removes screws so you peel every toy by hand.
  3. Mobile framing, instant Web Audio & level pacing: Added a top-right fullscreen toggle for short mobile viewports, tighter dynamic near/far clipping, non-blocking ctx.resume() audio start, and smoothed Level 5 pacing.

Would love feedback from fellow Three.js/WebGL devs on touch/mouse orbit feel, performance, and Levels 1–5!

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.