3D engine that AI agents drive
JavaScript 3d3d-engineagentic-aiai-agentsblenderclaude-codegame-enginegaussian-splattinggltfjavascriptmcpmcp-servermodel-context-protocolpath-tracerpath-tracingpbrrenderingthreejs-alternativewebgl2webgpu
Merge remote-tracking branch 'origin/main' into HEAD
Nguyen Xuan An901b9c756dd9
diff --cc docs/mcp.mdindex 9a73d811,d7fb0d40..4a5b7f60--- a/docs/mcp.md+++ b/docs/mcp.md@@@ -191,8 -191,10 +191,10 @@@ Every error an agent can reach names whEvery tool schema is read on every turn, so `node scripts/measure-tool-cost.mjs` reports the bytes and estimated tokens of each schema and of each typical result, and `npm run tool-cost` fails a pull request when one grows past its allowance against the base branch (`bench/tool-cost/README.md`). The current total is the last line of that script's output, and `bench/tool-cost-ceilings.json` holds the ceiling it may not pass. To save space, a mesh geometry's `edits` and `stack` in a recipe, and `motion` in `scene_apply` and asset recipes, are advertised as plain objects: the full field list is in `mesh_edit`, `mesh_stack` and `scene_create`, and the backend still validates every field and names the valid choices when one is wrong. A small mesh change is far cheaper as `mesh_edit` (187 bytes in the measured case) than as a whole recipe rewrite (1,254 bytes with the dispose).-`mesh_inspect` lint adds warnings for `intersecting-parts`, `self-intersection`, `thin-wall`, `floating-part` and `asymmetric`. They never set `ok` to false, run within face budgets, and list any check they skipped in `skippedChecks`. `scene_inspect` returns a `diagnostics` list only when there is something to say: ignored material fields, blended transmission, unused materials or geometries, and for imported assets the decoder's not-drawn features, rigs with no joints or no skin, and assets with no clips. Each item has `kind`, `severity`, `target`, `message` and `fix`.+`mesh_inspect` lint adds warnings for `intersecting-parts`, `self-intersection`, `thin-wall`, `floating-part` and `asymmetric`. They never set `ok` to false, run within face budgets, and list any check they skipped in `skippedChecks`. `scene_inspect` returns a `diagnostics` list only when there is something to say: ignored material fields, blended transmission, unused materials or geometries, `reflection-skipped` (smooth metal keeps only the sky reflection because the automatic object probes were skipped: over 200000 triangles, too many reflective or other parts; the message names the count and the limit, the fix is fewer triangles or `environment.objectReflections` false, and `scene_apply` carries it too), and for imported assets the decoder's not-drawn features, rigs with no joints or no skin, and assets with no clips. Each item has `kind`, `severity`, `target`, `message` and `fix`.+ `scene_inspect` (and so `scene_apply` and `scene_review`) adds an `unsupported-part` warning when a part hangs off what it rests on: a building with half its footprint past the edge of a rock. It casts 16 rays up from a grid over the part's footprint, at its lowest point; a ray is held up when another part has a surface within 2 cm of that point, or inside the part's own height (a building sunk into terrain). The warning names the part, the support and the unsupported share, and fires when under 70 percent of the footprint is held up. It stays quiet for a part with nothing under it at all (hovering on purpose), a part whose supports all sit inside its own footprint (a roof over walls, a table top on one pedestal), the lowest parts of the scene (they rest on the floor), animated, simulated and particle nodes, clouds and blended or additive parts. It checks the 64 largest footprints, skips parts under 10 cm wide and skips scenes over 400,000 triangles. The check lives in `src/unsupported-part.js`, loads on demand and reads the parts as drawn at the rest pose.+`scene_look` keeps the PNG under the 1 MiB response budget by itself: when a busy picture (planks, bricks, emissive text) encodes over it, the preview renders again at 0.75 of the size, up to four times with the aspect kept, and the metadata names the size that came back (`returnedWidth`, `returnedHeight`, `note`). It fails only when the smallest step still does not fit.`scene_look` returns the same kind of `diagnostics` list next to the picture, so an agent can check a frame without reading it. The findings carry the part names and the numbers in fields, and each list is capped (8 parts per finding, 8 findings per kind, with `nodeCount` or `droppedCount` saying how many were left out):diff --cc src/agent-scene.jsindex f809116d,a4c02b89..dbe38d84--- a/src/agent-scene.js+++ b/src/agent-scene.js@@@ -2402,7 -2407,7 +2411,7 @@@ export function createAgentScene(inputreturn result;});const resident = geometryStats(ownedGeometryRecords());- const diagnostics = [...recipeDiagnostics(state.recipe), ...closedRoomProblems(), ...staleBakeProblems(), ...(state.bakeSkipped ? [agentSceneModule('bake').bakeSkippedDiagnostic(state.bakeSkipped)] : []), ...(state.reflectionSkipped ? [agentSceneModule('reflections').reflectionSkippedDiagnostic(state.reflectionSkipped)] : []),...coplanarProblems(), ...(state.particleSampler?.diagnostics() ?? [])];- const diagnostics = [...recipeDiagnostics(state.recipe), ...closedRoomProblems(), ...staleBakeProblems(), ...(state.bakeSkipped ? [agentSceneModule('bake').bakeSkippedDiagnostic(state.bakeSkipped)] : []),...coplanarProblems(), ...(agentSceneModuleLoaded('unsupportedPart') ? agentSceneModule('unsupportedPart').unsupportedPartProblems(state.parts, state.recipe, revision) : []), ...(state.particleSampler?.diagnostics() ?? []), ...(state.assetRuntime.animators.length ? agentSceneModule('assets').placedClipDiagnostics(state.assetRuntime) : [])];++ const diagnostics = [...recipeDiagnostics(state.recipe), ...closedRoomProblems(), ...staleBakeProblems(), ...(state.bakeSkipped ? [agentSceneModule('bake').bakeSkippedDiagnostic(state.bakeSkipped)] : []),...(state.reflectionSkipped ? [agentSceneModule('reflections').reflectionSkippedDiagnostic(state.reflectionSkipped)] : []), ...coplanarProblems(), ...(agentSceneModuleLoaded('unsupportedPart') ? agentSceneModule('unsupportedPart').unsupportedPartProblems(state.parts, state.recipe, revision) : []), ...(state.particleSampler?.diagnostics() ?? []), ...(state.assetRuntime.animators.length ? agentSceneModule('assets').placedClipDiagnostics(state.assetRuntime) : [])];return {revision, topologyRevision,...(state.recipe.motion?.ik?.length ? { motionIk: agentSceneModule('motion').compileAgentMotion(state.recipe.motion, state.recipe).sweepIk() } : {}),