# 3D scenes

The 5 tools for 3d scenes. Before an agent first makes one, it reads guide topic scenes.

## create_scene

Add an interactive 3D scene to a space: objects (boxes, spheres, cylinders, text, 3D models, lights, groups of them) in space, with their colors, materials, motion and notes. People turn it around, zoom in, click an object to read its notes, and comment on a point of it; editors move, turn and size objects in the page. Its objects are its own. Read guide topic "scenes" first; check it from several sides with render_scene.

Parameters:
- `space_id` (string, required)
- `title` (string, required): What the scene shows: "Office floor plan", "Pump assembly", "Solar system".
- `description` (string): What the scene shows and what people should look at.
- `background` (string): The color behind it, hex (default "#f4f4f5", a light gray).
- `ground` (string): shadow (soft shadows under the objects, no floor drawn; default), grid (a floor grid and shadows) or none.
- `lighting` (string): studio (soft, even product lighting; default), daylight (sun and sky), night (dim: your lights and glowing objects carry it) or none (only your lights).
- `camera` (object): Where people's view starts.
- `views` (object[]): Saved views people jump to: a name, where the camera is and what it looks at.
- `objects` (object[])

## read_scene

A 3D scene as it is now: its settings (background, ground, lighting, camera, saved views) and its objects in order, each with its id (what update_scene and comment take), parent group, shape, position, rotation, scale, size, look, motion and notes.

Parameters:
- `item_id` (string, required)

## update_scene

Change a 3D scene: its settings (description, background, ground, lighting, camera); add objects; copy objects (an object with everything in it, to a new position: a second chair, a row of desks); change objects (any field — null clears one, parent null takes it out of its group); delete objects (and what a group holds; only when the person asked for it); add or delete saved views; its title. Changes apply in that order.

Parameters:
- `item_id` (string, required)
- `title` (string)
- `description` (string | null)
- `background` (string): The color behind it, hex (default "#f4f4f5", a light gray).
- `ground` (string): shadow (soft shadows under the objects, no floor drawn; default), grid (a floor grid and shadows) or none.
- `lighting` (string): studio (soft, even product lighting; default), daylight (sun and sky), night (dim: your lights and glowing objects carry it) or none (only your lights).
- `camera` (object): Where people's view starts.
- `add_objects` (object[])
- `copy_objects` (object[])
- `change_objects` (object[])
- `delete_objects` (string[]): Objects deleted, by id; a group goes with everything in it. Deleting can't be undone.
- `add_views` (object[])
- `delete_views` (string[]): Saved views deleted, by id or name.

## add_model

Store a 3D model in a space, for a scene's model objects: a GLB (.glb), or a glTF (.gltf) with its buffers and pictures inside it, up to 50 MB, from a URL (a public address) or base64. Returns the url to give as model.

Parameters:
- `space_id` (string, required)
- `url` (string)
- `base64` (string)
- `name` (string): Its file name: "pump.glb".

## render_scene

See a 3D scene as people do: a screenshot from its camera, and from other sides when asked — front, back, left, right, top (each framing the whole scene) or a saved view by name or id — all drawn in one go. With them, checks of what the page sees: objects under the ground and models that did not load (from any side), objects out of view or too small to see (from its camera); and errors it hit. A scene looks right from one side and wrong from another: check it from at least two.

Parameters:
- `item_id` (string, required)
- `from` (string[]): Up to 4 of: camera (the view it opens on; default), front, back, left, right, top, or a saved view's name.
