Elevator exposes four finish slots — cab / doors / shaft / glass (glass only when shaft or door style is glass) — on node.slots. The finish materials now resolve through a per-node material set (context provider) keyed on node.slots + scene materials: textures-off joinery role -> node.slots ref -> declared default (cab preset-softwhite, doors metal-steel, shaft preset-lightgrey, glass preset-glass), with glass transparency flags re-applied. Cab/door/shaft/ glass meshes tag userData.slotId; buttons, indicators, control panels, and queue strips stay untagged (functional UI, not paintable). Interaction system untouched. Monochrome unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 lines
298 B
TypeScript
8 lines
298 B
TypeScript
import { createSlotPaintCapability, previewSlotByUserData } from '../shared/slot-paint'
|
|
|
|
export const elevatorPaint = createSlotPaintCapability({
|
|
resolveRole: (args) => (args.hitObject?.userData?.slotId as string) ?? null,
|
|
applyPreview: previewSlotByUserData,
|
|
legacyEffective: () => null,
|
|
})
|