<!-- generated by scripts/buildClaudeChromeMarkdown.ts — do not edit by hand -->

# Model Editor: Claude Chrome quickstart

> Two tool-named paths: AnimBox Geo Utils — direct, editable-quad modelling with `create.*` primitives + Quick Actions; or SCAD — parametric modelling via the built-in OpenSCAD editor (bakes to a triangle-only static mesh). Or let Auto pick the best tool per part.

## Two modelling paths

AnimBox supports two ways to build geometry. Use AnimBox Geo Utils (the `create.*` primitives plus modelling Quick Actions) for interactive sculpting and per-element edits — its output stays editable as quads. Use SCAD (the built-in OpenSCAD editor) when geometry is best described by code: gears, brackets, threaded parts, anything driven by parameters; SCAD is the preferred path for mechanical / printable parts. The SCAD output becomes a TRIANGLE-only static mesh imported into your scene, after which you can keep editing it with the AnimBox Geo Utils tools. When no single path fits, Auto picks the best tool per part (SCAD for the frame/engine, Geo Utils for the tank/seat); when that material choice is unclear, ask one question rather than silently picking.

- `scriptEditor.open()` — Open the unified Script Editor. Add a SCAD tab to write `.scad` source, render to a mesh, and import into the scene. Good for parametric and algorithmic geometry.

## Modeling primitives

The bread-and-butter modeling surface. Each `create.*` call returns a Promise resolving to a Mesh handle you can keep using. All `create.*` calls are async — await them. To READ a transform value, call the getter: `mesh.translate.x.get()` (one axis) or `mesh.translate.get()` (the [x,y,z] tuple) — a bare `mesh.translate.x` is an attribute handle, not a number.

- `create.cube(opts?)` — Create a cube mesh. Options include `width`, `height`, `depth`, and per-axis subdivisions. Returns Promise<Mesh>.
- `create.sphere(opts?)` — Create a sphere mesh. Options include `radius`, `widthSegments`, `heightSegments`. Returns Promise<Mesh>.
- `create.plane(opts?)` — Create a plane mesh. Options include `width`, `height`, `widthSegments`, `heightSegments`. Returns Promise<Mesh>.
- `create.cylinder(opts?)` — Create a cylinder mesh. Options: `radiusTop`, `radiusBottom` (NOT `radius` — a cylinder has two radii), `height`, `radialSegments`, `heightSegments`, `openEnded`. Returns Promise<Mesh>.
- `create.cone(opts?)` — Create a cone mesh. Options: `radius` (single base radius — unlike cylinder), `height`, `radialSegments`, `heightSegments`, `openEnded`. Returns Promise<Mesh>.
- `create.hemisphere(opts?)` — Create a hemisphere (half-sphere) mesh. Options: `radius`, `widthSegments`, `heightSegments`, `flatBase`. Returns Promise<Mesh>.
- `create.material(opts?)` — Create a PBR material. `baseColor` is an [r,g,b,a] tuple of 0..1 floats (not a hex string, not 0..255); `emissive` is an [r,g,b] tuple; `metallic`/`roughness` are 0..1; `emissiveIntensity` >= 0. Returns Promise<Material>; pass to `mesh.setMaterial(mat)`.
- `create.group(nodes, opts?)` — Group nodes under a new parent. The nodes ARRAY is arg 1, the { name } opts object is arg 2 (unlike the other create.*({opts}) calls): `await create.group([a, b], { name })`. Returns Promise<Group>.
- `create.fromVertsAndFaces(opts)` — Build a procedural mesh from raw `positions` (flat [x,y,z,...]) plus `indices` (triangle list) — or n-gon `faceVertexCounts` + `faceVertexIndices`. Good for terrain heightfields and lofted shells. Returns Promise<Mesh>. (Alias: `buildMesh`.)
- `ls({ selected: true })` — Return the currently-selected Node[]. Empty array when nothing is selected.
- `select(nodeOrRef)` — Replace the object-level selection with the given node, ref, or array of refs. Pass `null` plus `{ mode: "clear" }` to deselect all; `{ mode: "add" }` / `"remove"` / `"toggle"` modify the existing selection.
- `select(null, { mode: 'all', filter: { type: 'mesh' } })` — Select every mesh in the scene at the object level. Pair with `ls({ selected: true })` to read back the resulting selection.

## Top tasks

The most common Model Editor workflows, one line each. For modeling Quick Actions whose typed surface is still arriving (extrude, bevel, modifiers), search by name and run by id.

1. **Spawn a cube** — `create.cube({ width: 1 })` — Returns a Promise<Mesh>. Await it if you need to chain further calls on the new mesh.
2. **Spawn a sphere** — `create.sphere({ radius: 0.5 })` — Returns a Promise<Mesh>. Default segment counts give a clean smooth-shaded sphere.
3. **Spawn a plane** — `create.plane({ width: 2, height: 2 })` — Returns a Promise<Mesh>. Two segments by default. Pass `widthSegments` / `heightSegments` for more density.
4. **Read the active mesh** — `ls({ selected: true })` — Returns Node[] in selection order. First element is the focus of single-mesh operations; empty when nothing is selected.
5. **Select every mesh in the scene** — `select(null, { mode: 'all', filter: { type: 'mesh' } })` — Selects every object-level mesh. Pair with `ls({ selected: true })` to read the resulting selection.
6. **Find and run a modeling Quick Action** — `actions.search("extrude")` — Returns ranked descriptors. Take the first `id` and call `actions.run(id)` to invoke it on the current selection.
7. **Browse the namespace grid** — `help()` — Prints the doctrine block + full namespace grid. Pick a namespace and call its `.help()` accessor to see operations.
8. **Find an export method** — `io.help()` — Lists every io-namespace method with its one-line description. Pick one and call it directly.
9. **Capture a viewport screenshot** — `viewport.captureScreenshot()` — Awaits the next frame, returns a screenshot with an image Blob. Use it after every geometry-altering call.

## Report a bug

Found a defect or want a feature? Pre-fill the in-app report dialog with `await ModelEditor.dev.dialogs.bugReport.open({ title, description })` (pass `reportType: "feature"` for a request), then the user reviews and clicks Send. Submission is always human-gated. See the report-a-bug doc for the full evidence-gathering flow.

## Deep references

- [Full API reference](/docs/scripting/api) — Every method with signature, parameters, and examples.
- [Full flat API index](/llms-full.md) — Every public scripting symbol in one scannable file — generated from the API manifest, never stale. Read once instead of re-fetching for discovery.
- [Recipe library (JSON)](/recipe-library.json) — Machine-readable corpus of curated recipes + worked examples, each tagged by intent (cad / mesh / previewer / math / io / scene). Filter by intent before authoring a multi-step build.
- [Previewer recipes](/docs/scripting/previewer) — Copy-pasteable round-trip examples.
- [Model Editor recipes](/docs/scripting/model-editor) — Copy-pasteable round-trip examples.
