# `DecalSpec`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/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`](DecalSpec.at.md), a world point on the target
surface, and reaches `depth / 2` either side along [`normal`](DecalSpec.normal.md). 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`](Labs.decal.md)). 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.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="image"></a>[`image`](DecalSpec.image.md) | property | The decal's image. |
| <a id="at"></a>[`at`](DecalSpec.at.md) | property | A world point on the target surface, metres: the centre of the projection box. |
| <a id="normal"></a>[`normal?`](DecalSpec.normal.md) | property | Where the projection faces. |
| <a id="size"></a>[`size`](DecalSpec.size.md) | property | Metres: width and height of the image on the surface. |
| <a id="depth"></a>[`depth?`](DecalSpec.depth.md) | property | Metres. |
| <a id="material"></a>[`material?`](DecalSpec.material.md) | property | The decal's own material fields over its `image` (`roughness`, `metallic`, `alpha` and the rest), as a part's material takes them. |

## Declaration

```ts
export interface DecalSpec {
  image: TextureInput;
  at: Point3;
  normal?: Point3;
  size: Point2;
  depth?: number;
  material?: MaterialSpec;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `DecalSpec` names no product |
| 2. A precedent | pass: [Babylon.js MeshBuilder.CreateDecal](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Meshes/Builders/decalBuilder.ts) (row `G24`); [Unity Projector](https://docs.unity3d.com/ScriptReference/Projector.html) (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) |
