scene-construction

Orchestrates preset-first scene construction in Lens Studio via VirtualScene and GraphQL tools.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill scene-construction-lens-studio-devs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scene-construction
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/scene-construction
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill scene-construction-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building scenes in Lens Studio by hand-wiring objects, components, and assets is tedious and error-prone, and guessing GraphQL field names or preset identifiers causes repeated failures. This Skill teaches the canonical read → presets → re-read → apply → save workflow so scene construction succeeds on the first pass. ## Core Features & Use Cases - Canonical preset-first workflow: Snapshot the scene with VirtualScene read, discover exact preset names, batch-create objects via scene-graphql preset mutations, then wire everything in one atomic VirtualScene apply. - Tool surface routing: Directs each operation to the right surface — VirtualScene for introspection and bulk apply, scene-graphql for preset creates and schema introspection, asset-graphql for standalone asset CRUD. - Script input wiring guidance: Documents the two-phase pattern for TypeScript @input wiring, including component-typed and array-typed reference gotchas. - Use Case: Build a physics playground scene by spawning BoxPhysicsObjectPreset walls in parallel, creating a Matter asset with custom bounciness, and wiring materials to meshes in a single atomic apply. ## Quick Start Use the scene-construction skill to build a Lens Studio scene with a camera, a lit sphere on a plane, and a red PBR material wired to the sphere.

Frequently Asked Questions about scene-construction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create scene objects in Lens Studio with GraphQL?

Use the createSceneObjectFromPreset mutation with an exact presetName like BoxMeshObjectPreset, discovered via the presets(type: SceneObject) query. Batch multiple creates in one mutation using GraphQL aliases for parallel execution.

When should I use VirtualScene versus scene-graphql?

Use VirtualScene read for scene introspection and apply for bulk modifications, reparenting, and asset-plus-scene wiring in one atomic operation. Use scene-graphql for preset-based object creation and schema introspection, since presets spawn pre-wired hierarchies VirtualScene cannot materialize.

Why does my Lens Studio preset creation fail with a display name?

The presetName argument requires the literal identifier like CameraObjectPreset, not the display name Camera Object. Run presets(type: SceneObject) { name } first to get exact identifiers before any create call.

Why does my script @input reference read back null at runtime?

Component-typed @inputs must reference the target component's UUID, not its SceneObject's UUID — a SceneObject reference reports success but resolves to null. Array-typed @inputs must be wired via scene-graphql setProperty because VirtualScene rejects them.

Can I wire script inputs in the same apply as object creation?

No, script @input wiring requires a two-phase pattern: create the structure first, write and recompile the TypeScript, then wire inputs in a second apply. Wiring before compilation fails because the inputs do not yet exist on the ScriptComponent.