Repository navigation
Agents: exact colours, column code, textured maps, slab surface scripts - #1190
Conversation
- author_scene columns take code (mount floor), rotation, and a color applied as an exact material on every native surface (it was stored, never applied). - author_scene slab railings are fences standing on the slab with their own height and color (the height was accepted but drawn at 1.1 m in the edge finish). - author_scene stairs take railing sides and style, and flight, tread and railing finishes. - paint color and add_object take exact: true to keep a colour as written instead of the nearest library finish; one shared exact-colour helper. - Native textures take offset, normalMap/normalScale and bumpMap/bumpScale; paint documents the UV convention for lining joints up. - Standalone slabs take a surface script (author_scene surfaceCode), as a room's floorCode: stored, rendered on the slab top, refreshed when reshaped, owning its colours, read back by get_source, shown in the slab panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 53bec51. Configure here.
| ), | ||
| } as AnyNode | ||
| place(fence) | ||
| }) |
There was a problem hiding this comment.
Slab railings decouple from the slab
Medium Severity
Slab railing runs are now separate level-parented fences linked only by supportSlabId. Deleting, duplicating, or translating the slab no longer takes those railings with it, so a balcony can vanish while its rails drop to the floor or stay behind in plan.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 53bec51. Configure here.
| move: () => import('./move-tool'), | ||
| }, | ||
|
|
||
| renderer: { |
There was a problem hiding this comment.
Script height skipped for slab hosts
Medium Severity
A slab surfaceScript raises the walking surface in floorFinishTopAt, but surfaces.top still returns the structural elevation and fence supportSlabId lift does too. Railings and anything hosted through that surface sit inside the decking instead of on it.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 53bec51. Configure here.


What does this PR do?
Lets
author_sceneand the MCP tools build more faithful finishes:code(the add_column module contract, mountfloor),rotation, and acolorthat is now applied, as an exact material on every native surface (it was stored in metadata and never applied).railingaccepted aheightbut the slab renderer drew every run at 1.1 m in the slab's edge finish. Slab railings are now fences standing on the slab (supportSlabId) with their ownheightand a newcolor. Stairs now takerailing(sides),railingStyle,color(flight),treadsandrailingColor.exact: trueonpaint(withcolor: that colour as a matte scene material, not the nearest library colour) and onadd_object(the module's slot colours with their roughness/metalness, not their library matches; glass and emissive slots keep theirs). One shared helper (exactColorMaterial/exactScriptSlots) now backs author_scene's exact slots too.offset,normalMap/normalScale,bumpMap/bumpScale; the viewer applies them (maps share the albedo's repeat and offset; normal/bump are non-colour, rendered shading only). New map URLs are inventoried as asset references; reference discovery now treats anyAssetUrlfield as a reference.paintdocuments the UV convention so an agent can line joints up (offset = frac(−c × repeat)).boundary !== 'auto') can carrysurfaceScript, the same record as a room'sfloor.script: author_scenesurfaceCode,setSlabSurfaceScript, refreshed byrefreshFinishScriptswhen reshaped, drawn on the slab's top, owning the surface's colours (paint refused), items stand on its build,get_sourcereads it, clipboard carries its artifacts, the slab panel shows it (view / remove, like the room panel, via a sharedScriptedFinishRow).Reviewer note: the slab kind now has a lazily loaded
renderer(ParametricNodeRenderer+ the script build beside the slab's group), like columns, doors and ceilings, instead of the default generic mount.ParametricNodeRendereris exported from viewer for that.Old scenes load unchanged: every new field is optional.
How to test
bun run ci(run locally: green).{ polygon, top: 0.3, surfaceCode: <decking module> }and a column withcodeand another withcolor: the slab shows the decking on its top, the coded column its module, the coloured one that exact colour on shaft/base/capital.painta wall with{ color: '#3a5f8c', exact: true }: a scene material named#3a5f8cis created and reused on a second call.painta floor with a native material{ texture: { url, repeat: [2, 2], offset: [0.5, 0], normalMap } }: the pattern shifts half a tile and shows relief.Screenshots / screen recording
Checked locally in
apps/editor(next dev): a payload sent through the MCPauthor_scenetool, with real compiles and the app's artifact store, then a texturedpaint. It renders the terrace's script-built decking on the slab top, cut to its outline; a 0.9 m red railing standing on it; a native column in its exact green, turned 30°; a scripted post in its module's exact blue; and a brick wall face with its normal map, offset half a tile. The slab kind's new renderer path also renders an existing project's slabs unchanged. No new console errors; the two "synchronously unmount a root" warnings also show without this change. No recording attached.Checklist
bun devbun checkto verify)mainbranch🤖 Generated with Claude Code
Note
Medium Risk
Broad changes to agent paint/add_object, author_scene placement, finish-script refresh, and spatial elevation, but new schema fields are optional and heavily tested.
Overview
Adds
exact: trueonpaintandadd_objectso hex colours become reusable scene materials instead of nearest library matches; scripted slots keep authored roughness/metalness while glass and emissive slots stay special. SharedexactColorMaterial/exactScriptSlotsalso driveauthor_sceneexact slot mapping.Native materials gain texture
offset,normalMap/normalScale, andbumpMap/bumpScale(viewer applies shared placement;paintdocuments UV/joint alignment). Reference inventory and discovery cover the new map URLs.Standalone slabs (not room floor plates) can carry
surfaceScriptviasetSlabSurfaceScriptandauthor_scenesurfaceCode: compile on outline, refresh when reshaped, refuse surface paint, elevate placed items on the build,get_source/ clipboard / slab panel parity with room floor scripts; slab kind gets a composed renderer.author_scenealso wires slab railings as height/coloured fences on the slab, columns withcode,rotation, and appliedcolor, and stairs with railing mode/style and body/tread/railing finishes.Reviewed by Cursor Bugbot for commit 53bec51. Bugbot is set up for automated code reviews on this repo. Configure here.