Mammoth Templates logomammoth templates

Home / Three.js / Product Showcase

Video preview

Product Stage Commerce Page is a single-product store page built around a 3D hero. A glossy torus ring stands on a pedestal, lit by a procedural studio environment (soft boxes, gradient and floor bounce computed in the shader, no textures) and shaded with a small PBR-style model: fresnel, GGX-flavoured specular, a clear-coat layer, engraved grooves and soft contact shadows. Visitors drag to orbit with inertia, use the keyboard arrows, or jump to Front / Side / Top / Detail camera presets.

Around the stage is a complete, working shop UI for a fictional brand. Five finish swatches (gloss blue, brushed gold, rose, obsidian, pearl) change the 3D material live and update the price; a size selector with a size guide, quantity stepper and Add to cart feed a slide-in cart drawer with quantity controls, remove, promo code, shipping and totals, all persisted in localStorage. Below sit feature cards, a specifications list and related items whose thumbnails are generated as inline SVG.

Everything is front end only: vanilla JS, no libraries (about 57 KB of unminified JavaScript in total). The cart is isolated in a single file with TODO: connect your API comments so you can plug in Shopify, Stripe or your own backend. It falls back to a static SVG ring without WebGL, pauses when hidden or off-screen, caps the pixel ratio and respects reduced-motion.

Highlights

  • Raw WebGL ring and pedestal: procedural studio reflections, fresnel, clear-coat, engraved grooves, soft shadows
  • Drag-to-orbit for mouse and touch with inertia, pinch zoom, keyboard arrows, camera presets, auto-rotate toggle
  • Finish swatches re-skin the 3D model live with eased material transitions and price adjustments
  • Working cart: drawer, quantity, remove, promo code, shipping threshold, totals, localStorage, mock checkout
  • Size selector with size guide, specs section, related items with generated SVG thumbnails
  • Dark and light themes with toggle and system preference; the 3D scene lighting follows the theme
  • Static SVG fallback, pause when hidden/offscreen, DPR cap, reduced-motion support
  • Responsive 360px to 1920px, keyboard and screen-reader friendly (radio groups, focus trap, live regions), zero dependencies, CC0