/ls-clad:camera-and-renderingfrom ls-clad
Configures orthographic/perspective cameras, 2D screen-space rendering with ScreenTransform/Image/Text, RenderMeshVisual patterns, and visibility debugging for Lens Studio scene construction.
Ships in ls-clad. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
For a top-down orthographic view of 3D objects (RenderMeshVisual with meshes):
size to control the visible area — size is the full visible height in world units, not half-height. If your scene is 160cm tall, set size to 160 (not 80). This differs from some other engines where orthographic size means half-height.(0, height, 0) — high above(-90, 0, 0) — looking along -YIf scripts need to convert between screen coordinates and world coordinates, the half-height for conversion math is size / 2.
This approach works for 3D geometry viewed from above. It does not work for screen-space 2D content (ScreenTransform, Image, Text) — see below.
For 2D screen-space content (ScreenTransform, Image, Text), use the OrthographicCameraObjectPreset (this is the exact presetName argument for createSceneObjectFromPreset) rather than converting an existing camera. The preset correctly configures properties that a manual conversion will miss:
Ortho layer, not the default layer 0. The camera must render this layer or objects will be invisible. Reference the layer by name (Ortho) rather than hardcoding a numeric mask, since the mask value depends on the project's layer configuration.-1 to render elements on the z=0 plane. A positive near clips ScreenTransform children that sit at the camera's z position.scene.captureTarget. Render targets are configurable per camera — Lenses that chain cameras or use custom render targets may assign different targets.Do not convert an existing perspective camera to orthographic for screen-space content — too many properties differ. Use the preset.
If your goal is a 2D-looking game or visualization, you have two viable approaches:
| Approach | Use when... | Camera | Objects |
|---|---|---|---|
| 3D objects + orthographic camera | You want physics, mesh colliders, or 3D lighting on flat-looking objects | Manually configured orthographic (see above) | RenderMeshVisual with plane/box meshes |
| Screen-space (ScreenTransform) | You want UI-style layout with anchors, text, and Image components | OrthographicCameraObjectPreset (with Canvas) | ScreenImage/ScreenText presets |
Text over Text3DText3D renders extruded 3D geometry and is comparatively expensive — reach for it only when you genuinely need dimensional/extruded lettering. For almost all labels, HUDs, scores, and banners a plain Text component is the cheaper, more legible choice. How you place UI text (screen-space vs. world-space, a preset vs. a UI framework) is platform-specific — follow your platform's UI guidance for the exact setup.
Screen-space objects require preset creation — not manual SceneObject + component assembly.
Key requirements for screen-space Image objects:
createSceneObjectFromPreset via scene-graphql.PremultipliedAlphaAuto blend mode, baseTex texture slot). Custom UnlitMaterials will not render correctly on screen-space Image components. To change an Image's color, modify the default material's main-pass color at passInfos.0.baseColor (a top-level baseColor set fails — it's a shader-graph material tinting a white base texture) rather than replacing the material.Need the 2D image itself? /build-image (the ls-clad:build-image skill) generates one from a text prompt to Assets/GeneratedImages/<Name>.png — assign it as the Image's texture, or use it as a material baseTex.
Default type; configured with field of view. No special setup required for 3D objects on the default render layer.
Set camera properties via scene-graphql setProperty on the Camera component ID:
setProperty on a camera property doesn't work as expected, use scene-graphql to query the component's properties field to discover the actual property namesCamera property names in the Editor API are not the same as in the runtime Lens API. For example, clearColorOption is a runtime property that does not exist in the Editor API. Always query the component's properties or grep editor.d.ts if you need Editor API property names.
A RenderMeshVisual component provides an object's visible appearance. It has two key aspects:
mesh — the geometry (sphere, box, plane, custom mesh)materials — an array of materials controlling appearanceMaterials are always an array, even for single-material objects. To assign a material:
mutation {
setProperty(
id: "render-mesh-visual-component-id"
propertyPath: "materials.0"
value: "material-asset-id"
valueType: REFERENCE
)
}
The id must be the RenderMeshVisual component ID, not the scene object ID. Query the object's components field to get the component ID if unknown.
An object that exists in the scene graph is not the same as an object that renders. Before you report that an object is visible or that a build renders, proactively confirm every check in Visibility Debugging below — treat it as a sign-off gate, not just a reactive debug list — plus one the debug list omits:
setLocalScale.If any check fails, the object is not "visible" — fix it before sign-off; do not claim it renders.
If an object is correctly positioned but invisible in the preview:
setEnabled stateOrtho layer, not default layer 0.near: -1 or ScreenTransform children are clipped.OrthographicCameraObjectPreset; missing Canvas = nothing visible.ScreenImageObjectPreset via scene-graphql; manual assembly lacks internal bindings.physics.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lens-studio-devs/ls-extensions --plugin ls-clad74 skills in this plugin
/build-imageGenerate a 2D image from a text prompt via SPECS text-to-image, to Assets/GeneratedImages/<Name>.png (build-mesh reference, texture, or screen-space). Transparent RGBA cutout, cropped tight, by default; opt out for an opaque image.
/build-meshGenerate a 3D mesh, model, or asset for a Lens — build, create, or make props, characters, scenery. Four peer backends chosen per asset: SPECS text-to-3D (static default — best texture fidelity, async minutes-long jobs), FAST3D (faster static AI props), code-authored MeshBuilder via the mesh-builder-scripting skill (articulated, animated, parametric TypeScript content), and Blender voxel (blocky aesthetic; the only source of rigged GLBs). GLB backends return the file plus AABB metadata so the caller can size colliders and place the mesh in the world.
/Other plugins' skills for the same job