Recommended Studio workflow / 推荐流程
1
Prepare a self-contained glTF 2.0 binary
Export one
.glb with embedded PNG, JPEG, or WebP textures. Apply transforms,
remove unused nodes, and avoid decoder-dependent extensions.2
Open local Content Studio
Run
npm run dev, then open the loopback URL with ?studio=1.3
Choose the role
Replace an enabled built-in visual, or create a custom asset. Set a custom
asset to Decorative when it should have no page, or Interactive when
it needs bilingual content, index entry, and deep link.
4
Upload and wait for Ready
The Studio validates and stages the GLB. Its status progresses through
fetching, processing, ready, or error. The retained native object or a
visible placeholder keeps placement editable during this phase.
5
Place and confirm
Use Plane X/Z, Height Y, and Heading rotation. Hold Shift for 15° heading
snapping and set scale numerically. Select Confirm all placement.
6
Save, validate, and push
Select Save to project, inspect the JSON, generated scene module, and
final upload in
git status, run the validation commands, then commit and
push.Staging and cleanup / 暂存与清理
Upload does not immediately publish a model:public/uploads/models/.
This means the content document can retain one stable public URL before and
after save, while the server changes which filesystem location supplies it.
Save products / 保存产物
A successful save updates all required scene artifacts:public/content/site-content.jsonrecordsmodelSrc, purpose, content, and transform;app/generated/scene-config.tsrecords the same normalized scene for the production bundle; andpublic/uploads/models/<uuid>.glbcontains the final model bytes.
Validator limits / 验证限制
These are safety ceilings, not performance targets. Aim much lower for mobile
devices. See Performance.
The validator rejects malformed GLB structure, out-of-range buffer access,
external resource URIs, node cycles, unsupported embedded image formats, and
runtime extensions that require unconfigured Draco, Meshopt, Basis/KTX2, or
similar decoders.
Blender export checklist / Blender 导出检查
- Use metres and apply rotation and scale.
- Use Principled BSDF for lit PBR materials.
- Keep Base Color textures in sRGB and data maps in their intended non-color space.
- Use OpenGL normal-map orientation.
- Embed all textures.
- Remove cameras, lights, empty nodes, duplicate meshes, and hidden geometry that the page does not need.
- Combine static meshes where that reduces material and draw-call overhead.
- Keep a hero asset around 5k–20k triangles and a small prop below roughly 2k before device testing.
- Remove branded or copyrighted textures unless the licence permits their use.
Lighting behavior / 光照交互
The loader enables shadow participation for mesh materials, but the visible day/night response still depends on the exported material:- standard lit PBR materials respond to the room’s hemisphere, sun, moon, and practical lights;
- unlit/basic materials do not respond to light;
- strong emissive values can flatten the day/night difference; and
- incorrect normals, metallic values, or color space can make a model appear unexpectedly dark.
When a placeholder remains / 占位符不消失
Check the Studio status and browser Network/Console panels:- Upload rejected: re-export a valid self-contained GLB within the limits.
- Fetching fails: confirm the path is the same-origin
/uploads/models/<uuid>.glbgenerated by the Studio. - Processing fails: inspect unsupported material/extension or empty-scene errors.
- Slow first appearance: reduce textures, primitives, mesh instances, and materials. Parsing and GPU compilation still take time after bytes arrive.
- Built-in replacement fails: the native object intentionally stays as fallback.
- Custom model fails: the visible placeholder intentionally stays so you can replace or remove it.
Detected multiple renderers concurrently rendering the same context provider
describes concurrent React renderer/provider trees, often during HMR. It does
not prove that the GLB is invalid. Restart duplicate previews/dev servers and
inspect React/provider duplication separately.
Direct code path / 代码直连
Studio-managed models belong inpublic/uploads/models/ and should be
referenced through scene configuration. If a bespoke runtime feature needs a
manually managed GLB, add it under a clearly documented public/ path, write
the loading, timeout, cancellation, disposal, fallback, and accessibility logic
in code, and record why it is outside the Studio transaction.
Do not hotlink a third-party model. Archive its source and licence, optimize it
locally, self-host the permitted derivative, and update ASSET_CREDITS.md.