Recipe: 3D Product Viewer
This recipe ships an interactive 3D viewer for your products. A three-d element compiles a Bevy app to WebAssembly and serves it, while a files element holds the source models and textures. Visitors rotate, zoom, and inspect a real 3D scene in the browser — no plugin, no external 3D host.
The problem it solves
A flat product photo cannot show what a 3D object actually looks like. But standing up an interactive 3D experience usually means a games-engine toolchain, a WASM build pipeline, and somewhere to host the assets and the compiled bundle. This recipe makes all three platform elements, so a 3D viewer is something you build and deploy the same way you build any other front end.
Elements
| Element | Role |
|---|---|
three-d | Builds and deploys an interactive 3D world with Bevy, compiled to WASM. |
files | Stores the source assets (models, textures, audio) you author with. |
Flow
- Create a
fileselement as your asset store.uploadyour source models and textures;listanddownloadthem as you iterate. - Create a
three-delement. Register the 3D assets the scene uses with itsupload_assetoperation (each asset is stored in the element’s dedicated namespace), and confirm them withlist_assets. buildthe world — the three-d element compiles your Bevy app towasm32-unknown-unknownvia BuildForce. While iterating,hot_reloadpushes changes without a full rebuild.servethe compiled viewer to the browser. Visitors get the interactive scene; yourendera still or re-serveto check it before publishing.
What this shows
Interactive 3D is a native frontend category on the platform, not a special case — the three-d element owns the Bevy→WASM build and the serving, so “ship a 3D viewer” is one element’s job. Source assets live in a plain files store you can manage independently of the build, which keeps the authoring loop (upload a new model, re-register, rebuild) tight. The same build-and-serve shape that backs a spa backs a 3D world — the platform treats both as first-class front ends.