Visual

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_idstringrequired
titlestringrequired
What the scene shows: "Office floor plan", "Pump assembly", "Solar system".
descriptionstring
What the scene shows and what people should look at.
backgroundstring
The color behind it, hex (default "#f4f4f5", a light gray).
groundstring
shadow (soft shadows under the objects, no floor drawn; default), grid (a floor grid and shadows) or none. One of shadow, grid, none.
lightingstring
studio (soft, even product lighting; default), daylight (sun and sky), night (dim: your lights and glowing objects carry it) or none (only your lights). One of studio, daylight, night, none.
cameraobject
Where people's view starts.
Show child attributes
positionany[]
Where the camera is, in meters.
targetany[]
The point it looks at, and turns around.
fovnumber
How wide it sees, in degrees (default 45).
viewsobject[]
Saved views people jump to: a name, where the camera is and what it looks at.
Show child attributes
namestringrequired
positionany[]required
targetany[]required
objectsobject[]
Show child attributes
positionany[]
Where its center is, in meters: [x (right), y (up), z (toward the default camera)]. The ground is y = 0, so a box 1 high stands on it at y = 0.5. In a group: from the group's center.
rotationany[]
How it is turned, in degrees around x, y and z: [0, 90, 0] turns it a quarter turn round the upright axis, so its front (+z) faces +x.
scalenumber | any[]
Stretch: one number for all sides (2 = twice the size), or [x, y, z].
widthnumber
box, plane: across (x), in meters (default 1).
heightnumber
box: tall (y; default 1); cylinder, cone: tall (default 1); text: the height of its line (default 0.3; capital letters are about three quarters of it); model: scaled to this height (default: its own size).
depthnumber
box, plane: front to back (z), in meters (default 1).
radiusnumber
sphere, cylinder, cone, capsule: radius in meters (default 0.5; capsule 0.25); torus: the ring's radius (default 0.5).
radius_topnumber
cylinder: the top's radius, for a tapered one (default: radius).
tubenumber
torus: the ring's thickness, as a radius (default 0.15).
lengthnumber
capsule: its straight middle, in meters (default 0.5; the whole is length + 2 × radius).
textstring
text: what it says (faces +z: toward the default camera).
modelstring
model: its file, the url add_model returned ("/api/uploads/f_…").
lightstring
light: point (a bulb, all around), spot (a cone of light toward target) or directional (sunlight from its position toward target). Default point. One of point, spot, directional.
intensitynumber
light: how bright; 1 is a normal light of its kind (default), 3 is three times as bright.
targetany[]
light (spot, directional): the point it shines at (default [0, 0, 0]).
colorstring
Its color, hex ("#3b82f6"). On a light, the light's color.
metalnessnumber
0 (paint, plastic, wood; default) to 1 (bare metal).
roughnessnumber
0 (mirror-smooth, glossy) to 1 (matte; default 0.5).
opacitynumber
1 solid (default) to 0 invisible: glass is about 0.3.
emissivestring
A glow color, hex: screens, lamps, signs, LEDs. Glows without any light on it.
emissive_intensitynumber
How strong the glow is (default 1).
imagestring
A picture on its surface (a poster, a screen, a label), the url add_asset returned ("/api/uploads/f_…").
wireframeboolean
Drawn as lines only.
motionstring
spin (turns round its axis), float (bobs up and down) or pulse (grows and shrinks a little), forever. One of spin, float, pulse.
speednumber
With motion: 1 is its normal pace (spin: a turn in 6 s), 2 twice as fast.
axisstring
With motion spin: the axis it turns round (default y, upright). One of x, y, z.
labelboolean
Show its name beside it in the scene, always (for the parts people must find).
notesstring
What people read when they click it: what it is, its spec, what to look at.
hiddenboolean
Not drawn (kept in the scene).
keystring
Your own name for it in this call, so objects after it can give parent: key.
parentstring
The group it goes in: a group's id, or the key of a group earlier in this call.
namestring
What people read when they point at it or click it: "Front door", "Server rack 2", "Pump".
shapestringrequired
box, sphere, cylinder, cone, torus (a ring), plane (flat on the ground), capsule, text (flat words), model (a GLB/glTF from add_model), light, or group (holds other objects that move together). One of box, sphere, cylinder, cone, torus, plane, capsule, text, model, light, group.

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_idstringrequired

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_idstringrequired
titlestring
descriptionstring | null
backgroundstring
The color behind it, hex (default "#f4f4f5", a light gray).
groundstring
shadow (soft shadows under the objects, no floor drawn; default), grid (a floor grid and shadows) or none. One of shadow, grid, none.
lightingstring
studio (soft, even product lighting; default), daylight (sun and sky), night (dim: your lights and glowing objects carry it) or none (only your lights). One of studio, daylight, night, none.
cameraobject
Where people's view starts.
Show child attributes
positionany[]
Where the camera is, in meters.
targetany[]
The point it looks at, and turns around.
fovnumber
How wide it sees, in degrees (default 45).
add_objectsobject[]
Show child attributes
positionany[]
Where its center is, in meters: [x (right), y (up), z (toward the default camera)]. The ground is y = 0, so a box 1 high stands on it at y = 0.5. In a group: from the group's center.
rotationany[]
How it is turned, in degrees around x, y and z: [0, 90, 0] turns it a quarter turn round the upright axis, so its front (+z) faces +x.
scalenumber | any[]
Stretch: one number for all sides (2 = twice the size), or [x, y, z].
widthnumber
box, plane: across (x), in meters (default 1).
heightnumber
box: tall (y; default 1); cylinder, cone: tall (default 1); text: the height of its line (default 0.3; capital letters are about three quarters of it); model: scaled to this height (default: its own size).
depthnumber
box, plane: front to back (z), in meters (default 1).
radiusnumber
sphere, cylinder, cone, capsule: radius in meters (default 0.5; capsule 0.25); torus: the ring's radius (default 0.5).
radius_topnumber
cylinder: the top's radius, for a tapered one (default: radius).
tubenumber
torus: the ring's thickness, as a radius (default 0.15).
lengthnumber
capsule: its straight middle, in meters (default 0.5; the whole is length + 2 × radius).
textstring
text: what it says (faces +z: toward the default camera).
modelstring
model: its file, the url add_model returned ("/api/uploads/f_…").
lightstring
light: point (a bulb, all around), spot (a cone of light toward target) or directional (sunlight from its position toward target). Default point. One of point, spot, directional.
intensitynumber
light: how bright; 1 is a normal light of its kind (default), 3 is three times as bright.
targetany[]
light (spot, directional): the point it shines at (default [0, 0, 0]).
colorstring
Its color, hex ("#3b82f6"). On a light, the light's color.
metalnessnumber
0 (paint, plastic, wood; default) to 1 (bare metal).
roughnessnumber
0 (mirror-smooth, glossy) to 1 (matte; default 0.5).
opacitynumber
1 solid (default) to 0 invisible: glass is about 0.3.
emissivestring
A glow color, hex: screens, lamps, signs, LEDs. Glows without any light on it.
emissive_intensitynumber
How strong the glow is (default 1).
imagestring
A picture on its surface (a poster, a screen, a label), the url add_asset returned ("/api/uploads/f_…").
wireframeboolean
Drawn as lines only.
motionstring
spin (turns round its axis), float (bobs up and down) or pulse (grows and shrinks a little), forever. One of spin, float, pulse.
speednumber
With motion: 1 is its normal pace (spin: a turn in 6 s), 2 twice as fast.
axisstring
With motion spin: the axis it turns round (default y, upright). One of x, y, z.
labelboolean
Show its name beside it in the scene, always (for the parts people must find).
notesstring
What people read when they click it: what it is, its spec, what to look at.
hiddenboolean
Not drawn (kept in the scene).
keystring
Your own name for it in this call, so objects after it can give parent: key.
parentstring
The group it goes in: a group's id, or the key of a group earlier in this call.
namestring
What people read when they point at it or click it: "Front door", "Server rack 2", "Pump".
shapestringrequired
box, sphere, cylinder, cone, torus (a ring), plane (flat on the ground), capsule, text (flat words), model (a GLB/glTF from add_model), light, or group (holds other objects that move together). One of box, sphere, cylinder, cone, torus, plane, capsule, text, model, light, group.
copy_objectsobject[]
Show child attributes
objectstringrequired
Its id from read_scene: a group copies with everything in it.
positionany[]required
Where the copy's center goes (in the same group as the original: from that group's center).
namestring
The copy's name (default: the original's).
change_objectsobject[]
Show child attributes
positionany[] | null
rotationany[] | null
scalenumber | any[] | null
widthnumber | null
heightnumber | null
depthnumber | null
radiusnumber | null
radius_topnumber | null
tubenumber | null
lengthnumber | null
textstring | null
modelstring | null
lightstring | null
intensitynumber | null
targetany[] | null
colorstring | null
metalnessnumber | null
roughnessnumber | null
opacitynumber | null
emissivestring | null
emissive_intensitynumber | null
imagestring | null
wireframeboolean | null
motionstring | null
speednumber | null
axisstring | null
labelboolean | null
notesstring | null
hiddenboolean | null
objectstringrequired
Its id from read_scene.
parentstring | null
Move it into a group (its id), or null to take it out of its group.
namestring
What people read when they point at it or click it: "Front door", "Server rack 2", "Pump".
shapestring
box, sphere, cylinder, cone, torus (a ring), plane (flat on the ground), capsule, text (flat words), model (a GLB/glTF from add_model), light, or group (holds other objects that move together). One of box, sphere, cylinder, cone, torus, plane, capsule, text, model, light, group.
delete_objectsstring[]
Objects deleted, by id; a group goes with everything in it. Deleting can't be undone.
add_viewsobject[]
Show child attributes
namestringrequired
positionany[]required
targetany[]required
delete_viewsstring[]
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_idstringrequired
urlstring
base64string
namestring
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_idstringrequired
fromstring[]
Up to 4 of: camera (the view it opens on; default), front, back, left, right, top, or a saved view's name.