
Skill
iwsdk-scene-composer
compose editable static IWSDK scenes
Description
Compose editable static IWSDK scenes from text, images, or hybrid references using a shared application asset manifest, v1 scene JSON, modular scene files, and the managed editor's validation and rendering tools. Use for 3D environments, props, architecture, staged scenes, procedural Three.js assets, custom PBR or shader materials, glTF assets, prefabs, patterns, lighting, camera matching, or visual review.
SKILL.md
IWSDK Scene Composer
Author native IWSDK assets and scene files. Application code owns geometry and materials; scene JSON owns composition; the managed editor provides visual feedback and human transform/component adjustment.
Read these references when relevant:
- scene-format.md before editing scene JSON;
- asset-authoring.md before creating or changing glTF or procedural assets;
- text-intake.md for text-only requests;
- image-intake.md for image or hybrid requests;
- composition-patterns.md for decomposition and repetition strategies;
- review-and-stop.md before final review.
Fixed Boundaries
- Use only
iwsdk.scene.v1. There is no compatibility schema. - Scene files are the composition source of truth. Create and edit them with normal
filesystem tools under
public/scenes/. - Scene JSON has one renderable content kind:
asset. It does not define models, primitive geometry, material resources, or material overrides. - The default export of the configured application asset manifest is the asset source
of truth. It may contain URL-backed glTF and UIKitML entries plus parentless
Object3Dprototypes with arbitrary Three.js geometry and materials. - The application runtime and editor import the same manifest module independently. Never depend on shared object identity, iframe messaging, DOM state, or a live runtime world when defining assets.
- Humans use the editor for selection, hierarchy, transforms, components, root lighting, and preview visibility. They do not edit geometry or materials there.
- Agents may edit asset TypeScript and scene JSON, then use the editor to validate and render the result.
The public scene MCP surface is intentionally small:
scene_open
scene_render_file
scene_get_state
scene_get_capabilities
scene_screenshot
scene_select
scene_set_camera
scene_set_preview_visibility
scene_measure_image_regions
Document creation and mutation happen through direct file edits. Do not look for MCP create/add/update/remove/patch/save/compose/review/publish tools.
When MCP is unavailable, use the CLI equivalents:
npx iwsdk dev status
npx iwsdk dev up
npx iwsdk scene capabilities --raw
npx iwsdk scene render-file \
--input-json '{"path":"public/scenes/room.iwsdk.scene.json","viewId":"hero"}' \
--output-file artifacts/room.png
npx iwsdk scene open \
--input-json '{"path":"public/scenes/room.iwsdk.scene.json"}' --raw
npx iwsdk scene state --raw
iwsdk dev up starts the server in the background, launches the configured
managed editor browser, and waits for the command bridge. Do not edit
vite.config.ts to change browser mode as an ad hoc startup workaround.
scene_render_file renders a file without replacing the editor's active document,
but it still uses the managed editor browser for manifest evaluation and WebGL.
If startup reports dev_browser_not_ready, inspect iwsdk dev status and
iwsdk dev logs --tail 100. Retry only when the diagnostics indicate a transient
startup failure. Do not invent a custom CPU or Playwright renderer and present it as
authoritative editor evidence. Preserve the structured failure, continue
type/schema/build checks that remain meaningful, and report the visual-verification
gate as blocked.
Camera parameters are intentionally distinct: view accepts only the built-in
presets (current, top, front, back, left, right, quarter, orbit),
while viewId selects an exact camera declared in authoring.views. Once a level
loads, its saved hero view owns runtime framing and supersedes the initial
World.create({ render: { camera } }) pose.
Workflow
1. Specify
Turn the request into a compact implementation brief:
- required and optional features;
- source evidence regions for image input;
- silhouette, proportions, parts, negative space, contacts, and material response;
- hero and diagnostic views;
- measurable acceptance criteria;
- assumptions, uncertainty, and fidelity ceiling.
A single image proves visible composition, not hidden geometry. Do not silently invent occluded detail or lower requested fidelity.
2. Plan Assets And Modules
Call scene_get_capabilities once. Inspect src/assets.ts and existing asset modules.
For every visible form, choose one of:
- reuse an existing manifest asset;
- add a glTF entry to the manifest;
- register a UIKitML file with
AssetType.UIKitML; - create a deterministic parentless
Object3Dprototype in code and register it; - assemble existing assets with a scene prefab or module.
Create custom geometry and materials in asset code, not JSON. Prefer separate
*.scene-asset.ts modules for substantial procedural assets and import their
prototypes into src/assets.ts.
Plan independent semantic groups as standalone scene modules. Give each module a local origin, size envelope, attachment points, required views, and asset IDs. Asset and component IDs are application-global; imported node and prefab IDs are namespaced.
3. Build
Author assets first, then scene JSON. Build in dependency order:
- support/stage and representative lighting;
- large composition masses;
- identity-critical groups;
- repeated secondary detail;
- hero camera and final environment.
Use meters, stable descriptive IDs, deterministic ordering, and explicit transforms.
Groups supply hierarchy, never visible mass. Use castShadow and receiveShadow on
asset nodes only when needed. Use prefabs and patterns for repetition; keep repeated
asset prototypes resource-sharing friendly.
4. Validate And Materialize
With the managed editor command-ready, call scene_render_file on every changed
module, then the root. It composes imports, validates schema and manifest references,
lowers the scene, and returns a PNG plus diagnostics without changing the active
document. Fix failures in the owning asset or scene file.
After the root passes, call scene_open once for live collaboration. The editor
watches the root and imported files. A valid file change swaps the preview atomically;
an invalid change preserves the last valid render and reports diagnostics. Unsaved
human edits produce a conflict instead of being overwritten.
Use scene_get_state for selection, hashes, diagnostics, dirty/conflict state, runtime
readiness, and render statistics. Use camera, screenshot, selection, and preview
visibility tools only when their live-editor context is useful.
5. Review And Refine
Review in three passes:
- Layout: hierarchy, scale, support contacts, and arrangement.
- Geometry: silhouette, proportions, parts, negative space, and alternate views.
- Final: material response, color, lighting, environment, and hero framing.
Keep review orchestration and evidence outside the editor. The editor supplies authoritative screenshots, hashes, camera state, diagnostics, and render measurements. Derive comparisons, defect lists, lineage, and stop decisions in ordinary task files.
Fix the highest-impact defect in its owning asset or scene module, rerender that file, then rerender the root. Default to two focused correction rounds. Stop earlier on a repeated defect, oscillation, plateau, missing input/asset, or representation ceiling.
6. Finish
Finish only when:
- every root and module file validates and renders;
- the active editor state is clean and conflict-free;
- required views are nonblank and correctly framed;
- required features pass measurable and visual checks;
- manifest asset IDs resolve in both editor and application runtime;
- the application build and selected scene load without blocking errors.
If a required gate is unavailable, finish with an explicit blocked or accepted-with-gaps result. Passing a local schema check, production build, or custom diagnostic image does not substitute for authoritative editor renders and state.
Modular Composition
{
"version": "iwsdk.scene.v1",
"units": "meters",
"imports": [
{
"id": "reading-nook",
"src": "./modules/reading-nook.iwsdk.scene.json",
"transform": { "position": [1.8, 0, -0.6] }
}
],
"resources": {},
"nodes": []
}
Each module must be valid by itself. Imports resolve recursively in declaration order. The import entry becomes a transform group. The root owns global components, environment, metadata, and authoring settings. Cycles, unsafe IDs, missing files, duplicate namespaced IDs, and invalid modules fail composition.
For parallel work, assign one module file per worker. Never let two workers edit one file. Render modules independently, import only passing modules, then correct cross-module scale, contact, occlusion, lighting, and framing at the root.
Regeneration And Provenance
Preserve stable IDs and module boundaries when revising. Never overwrite unrelated human-authored files. Record the skill/runtime versions, input hashes, root/module paths, capability hash, source/composed/runtime hashes, assumptions, and fidelity ceiling in authoring metadata or adjacent task evidence.
More skills from the immersive-web-sdk repository
View all 9 skillsiwsdk-debug
debug continuous behavior in WebXR
Aug 3DebuggingImmersiveInteractionIWSDK +1iwsdk-depth-occlusion
implement depth sensing and occlusion in IWSDK
Jul 21ARIWSDKVRWebXRiwsdk-grab
grab and move objects in WebXR scenes
Aug 3ARImmersiveInteractionVR +1iwsdk-migrate-0-5
migrate IWSDK applications to version 0.5
Aug 3EngineeringIWSDKMigrationiwsdk-physics
implement physics in IWSDK projects
Aug 3ImmersiveInteractionIWSDKPhysics +1iwsdk-planner
plan IWSDK projects and architecture
Aug 3ArchitectureImmersiveIWSDKStrategy +1
More from Meta Open Source
View publisherrelay-best-practices
write idiomatic Relay code
relay
Apr 22EngineeringFrontendGraphQLReact +1relay-performance
optimize Relay application performance
relay
Jun 10FrontendGraphQLPerformanceReact +1add-shape-types-to-torch-model
annotate PyTorch models with tensor shapes
pyrefly
Jul 18Data ModelingDeep LearningPythonPyTorchcamera-streaming
configure camera streaming and photo capture
meta-wearables-dat-ios
May 15CameraHardwareiOSVideodat-conventions
develop iOS applications with DAT SDK
meta-wearables-dat-ios
May 15iOSMobileSDKSwiftdebugging
debug wearable device software
meta-wearables-dat-ios
May 15DebuggingEngineeringiOS