跪拜 Guibai
← All articles
AI Programming · VibeCoding · Three.js

A Walkable 3D Museum of Chinese Antiquities, Built with VibeCoding

By 答案answer ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Browser-based 3D museums are moving past tech demos into complete, navigable applications that combine scene design, model optimization, and interactive annotation. This project packages those pieces into a single Vue + Three.js reference that handles dual-device layouts, asset compression, and guided camera choreography — the exact integration work that trips up teams building Web 3D products.

Summary

The cultural-relics-museum project constructs a full Three.js exhibition space rather than a flat image gallery. A circular, altar-like hall lit with radial light trails and a central light pool houses 15 simulated artifacts, each selectable for auto-focus, orbit rotation, and auto-spin. Detail hotspots pinned to 3D models let visitors click numbered markers to read about specific features, mimicking Sketchfab-style annotations. A roaming camera flies sequentially between exhibits, acting as a built-in virtual guide. The stack runs Vue 3, TypeScript, Vite 8, and Three.js r185, with GLTF/GLB models optimized through Draco, KTX2/Basis, and Meshopt compression. Two separate route-based layouts adapt the experience for desktop and mobile, and the codebase is released under MulanPSL-2.0 as a reference for Web 3D, digital-twin, or cultural-heritage projects.

Takeaways
Fifteen simulated artifacts sit in a circular, altar-inspired hall with radial light trails and a central light pool, establishing an Eastern ritualistic atmosphere.
Clicking an artifact triggers an automatic camera fly-to, orbit controls, and an auto-rotate toggle, with metadata displayed in a side panel.
Numbered hotspots pinned to 3D models let users click specific surface points to read detail descriptions, similar to Sketchfab annotations.
A roaming camera mode flies sequentially through all exhibits, functioning as a virtual guided tour without manual navigation.
GLTF/GLB assets load through Draco, KTX2/Basis, and Meshopt pipelines, and HDR environment maps enhance metallic and glazed material rendering.
Separate /pc and /m routes deliver distinct 3D layouts for desktop and mobile, avoiding a single-viewport compromise.
The project is open source under MulanPSL-2.0 and positioned as a complete Three.js learning reference, not a standalone API demo.
Conclusions

Hotspot annotations on 3D models remain rare in open-source Web 3D projects; most stop at orbit controls. Adding them turns a viewer into an explainer, which is the functional gap between a model showcase and a museum.

Designing separate PC and mobile 3D layouts is a practical decision that many WebGL projects skip, yet it directly determines whether a digital museum reaches a phone-sized audience.

The project's value as a reference lies in integration — scene, lighting, camera choreography, asset optimization, and UI — rather than in any single Three.js technique. That integration surface is what most tutorials omit.

Concepts & terms
Draco
A Google-developed compression library for 3D geometry that dramatically reduces GLTF/GLB file sizes, requiring a decoder to be loaded on the client before rendering.
KTX2/Basis
A GPU-friendly texture format that compresses images for efficient transfer and direct GPU upload, reducing both download size and texture-memory usage in WebGL applications.
Meshopt
A mesh optimization pipeline that reorders vertex and index buffers for better GPU cache utilization and smaller compressed file sizes, often used alongside Draco in glTF workflows.
CSS2DRenderer
A Three.js renderer that overlays HTML/CSS elements onto 3D scenes, commonly used for labels, tooltips, and UI elements that need to track 3D positions while remaining styled with standard CSS.
VibeCoding
An AI-assisted coding workflow where developers describe intent in natural language and let AI generate, iterate, and refine code, emphasizing speed and exploration over manual line-by-line implementation.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗