DecalSpec ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromconfigurator-runtime.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Interface · import type { DecalSpec } from '@holostep-configurators/runtime-client/contract'; · labs, @experimental · since 2.0.0 · section 20. Labs
A projected decal with depth. The projection box is centred on at, a world point on the target
surface, and reaches depth / 2 either side along normal. The image's top
points along world +Y projected onto the surface (along −Z on a horizontal surface). The decal
belongs to the parts it lands on: each piece hangs under the mesh it lands on, so it moves and
hides with that mesh and is projected again when its model reloads (Labs.decal). A triangle
facing away from the projection, or edge-on to it, takes no piece. On a skinned mesh the
projection uses the mesh's bind pose, not the pose it draws.
| Member | Kind | Summary |
|---|---|---|
image |
property | The decal's image. |
at |
property | A world point on the target surface, metres: the centre of the projection box. |
normal? |
property | Where the projection faces. |
size |
property | Metres: width and height of the image on the surface. |
depth? |
property | Metres. |
material? |
property | The decal's own material fields over its image (roughness, metallic, alpha and the rest), as a part's material takes them. |
export interface DecalSpec {
image: TextureInput;
at: Point3;
normal?: Point3;
size: Point2;
depth?: number;
material?: MaterialSpec;
}
| Rule | Result |
|---|---|
| 1. Neutral name | pass: DecalSpec names no product |
| 2. A precedent | pass: Babylon.js MeshBuilder.CreateDecal (row G24); Unity Projector (row G24) |
| 3. Two apps, or labs | labs (@experimental at a stable path, reached through has() or supports()): it graduates when a second app uses it; apps today: app-bcb7ef21da |
| 4. The cheaper fix first | decided per need in Appendix B: rows G24, K52 at tier labs (a member only where no rule, data, asset or app code serves the need) |