/?studio=1, then select Scene layout in the left navigation. The editor works with two asset families:
在本地 /?studio=1 打开工作台,并从左侧进入 Scene layout。编辑器处理两类资产:
Built-in / 内置物件
使用相对 transform 保留代码中原始摆放;支持停用、重新激活和可逆 GLB 外观替换。Uses relative transforms over authored placement; supports disable/reactivate and reversible GLB visual replacement.
Custom / 自定义资产
使用绝对 transform;可选择 decorative 或 interactive,并上传 GLB。Uses absolute transforms; choose decorative or interactive behavior and upload a GLB.
Built-in controls / 内置物件控制
Relative placement / 相对摆放
scene.placements[coreId] stores optional position, rotation, and scale overrides relative to the authored object:
Disable and reactivate / 停用与重新激活
Disabling a built-in adds its ID toscene.disabledCoreAssets. It disappears from:
- visible scene interaction;
- hit targets and signal markers;
- content index;
- deep-link resolution;
- detail-page navigation.
Replace only the visual / 只替换视觉
scene.coreAssetModels[coreId] points to a Studio-managed GLB. The built-in keeps its ID, content, placement, hitbox, signal marker, and route.
Loading behavior:
- the native or previous visual stays visible while fetching and processing;
- the GLB is fitted to the native object’s bounds and grounded;
- parse/compile failure keeps the existing visual;
- clearing the model path restores the native visual.
Custom asset controls / 自定义资产控制
Custom assets live inscene.customAssets and use absolute transforms:
Use interactive only when the object has meaningful bilingual content. Decorative dressing should not become an empty button.
只有真正有内容的物件才应设为 interactive。
Drag-to-place transaction / 拖动摆放事务
1
Start drag placement / 开始拖动摆放
Select an enabled built-in or custom asset and choose Drag placement.
2
Choose a mode / 选择模式
Use Plane for X/Z, Height for Y, or Heading for rotation around Y.
3
Drag in the room / 在房间中拖动
The HUD shows current coordinates. Hold Shift in Heading mode to snap to 15° increments.
4
Confirm or cancel / 确认或取消
Confirm placement merges changed axes into the Studio draft. Cancel restores the last confirmed transform.
Transform limits / Transform 限制
GLB lifecycle / GLB 生命周期
Removing or replacing an uncommitted model discards its staged cache when it is no longer shared. A successful save removes only previously published scene references absent from the next saved scene. 删除或替换未提交模型会清理未共享暂存;保存只精确删除上一份保存场景拥有、下一份不再引用的 GLB。 For a custom asset with no usable model, the runtime shows a wireframe placeholder. A built-in replacement failure instead keeps the native or previous visual. 自定义模型失败时显示 wireframe;内置替换失败时保留原生或上一个可用外观。Confirm versus save / 确认与保存
The browser draft is not a repository file. Normal routes ignore it.
浏览器草稿不是代码文件,普通发布路由不会读取它。
Commit outputs / 提交产物
app/generated/scene-config.ts. Use the Studio save boundary to keep it synchronized with JSON.
不要手工编辑生成场景源码;通过 Studio 保存保持它与 JSON 同步。
See GLB models and Content Studio.