Follow-up from the <Decal> roadmap (previously tracked in packages/cientos/src/core/abstractions/Decal/ROADMAP.md).
Problem
Attaching a <Decal> to a sub-mesh of a loaded .glb today means extracting it manually:
```vue
```
<primitive :object> can't accept Vue children, so a <Decal> cannot be dropped directly inside a loaded model. For models with many named nodes this gets verbose fast.
Directions
A — codegen à la pmndrs/gltfjsx / gltf.pmnd.rs: a CLI that parses a .glb and emits a typed Vue wrapper exposing each named node as a ref. Host writes <MyModel><Decal :mesh="model.Helmet" ... /></MyModel>. Most ergonomic; requires a build step.
B — discoverable prop on <Decal>, e.g. <Decal :inside="modelRef" name="Helmet" /> that walks modelRef's scene graph for a child named Helmet. Zero codegen, slightly magic, fails silently if the name is typo'd (mitigated with a console.warn).
C — provide-based bridge: the loaded model component provide()s a Map<name, MeshRef>; Decals inject and pick by name. Works inside Vue's component tree, no runtime traversal, but every model wrapper must opt in.
Direction A is canonical across the pmndrs ecosystem; direction B is the cheap "good enough" alternative if a full codegen tool feels too heavy for cientos.
Follow-up from the
<Decal>roadmap (previously tracked inpackages/cientos/src/core/abstractions/Decal/ROADMAP.md).Problem
Attaching a
<Decal>to a sub-mesh of a loaded.glbtoday means extracting it manually:```vue
```
<primitive :object>can't accept Vue children, so a<Decal>cannot be dropped directly inside a loaded model. For models with many named nodes this gets verbose fast.Directions
A — codegen à la
pmndrs/gltfjsx/gltf.pmnd.rs: a CLI that parses a.glband emits a typed Vue wrapper exposing each named node as aref. Host writes<MyModel><Decal :mesh="model.Helmet" ... /></MyModel>. Most ergonomic; requires a build step.B — discoverable prop on
<Decal>, e.g.<Decal :inside="modelRef" name="Helmet" />that walksmodelRef's scene graph for a child namedHelmet. Zero codegen, slightly magic, fails silently if the name is typo'd (mitigated with aconsole.warn).C — provide-based bridge: the loaded model component
provide()s aMap<name, MeshRef>; Decals inject and pick by name. Works inside Vue's component tree, no runtime traversal, but every model wrapper must opt in.Direction A is canonical across the pmndrs ecosystem; direction B is the cheap "good enough" alternative if a full codegen tool feels too heavy for cientos.