feat(paint-slots): migrate fence onto the unified slot model
Fence joins the node.slots paint model with one paintable 'surface' slot (merged post/base/rail geometry is a single mesh). Resolution order matches slab: textures-off joinery role -> node.slots.surface ref -> legacy inline material/preset -> declared default (library:wood-finewood27). Tags the mesh userData.slotId='surface' and wires capabilities.slots + paint. Stops borrowing DEFAULT_STAIR_MATERIAL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a8f32dd47a
commit
5555ad1fe0
@@ -0,0 +1,14 @@
|
||||
import type { AnyNode, FenceNode } from '@pascal-app/core'
|
||||
import { createSlotPaintCapability, previewGeometrySlot } from '../shared/slot-paint'
|
||||
|
||||
export const fencePaint = createSlotPaintCapability({
|
||||
resolveRole: () => 'surface',
|
||||
applyPreview: previewGeometrySlot,
|
||||
legacyEffective: (node: AnyNode) => {
|
||||
const fence = node as FenceNode
|
||||
if (fence.materialPreset || fence.material) {
|
||||
return { material: fence.material, materialPreset: fence.materialPreset }
|
||||
}
|
||||
return null
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user