# Decal

A flat 3D surface for *floor markings, signage, hazard stripes, AGV path
overlays* and other "applied surface" decoration. Has no volume and stays
fixed in world space (it does NOT face the camera — for camera-facing
billboard markers use `Sprite`).

## When to use

- Floor zone paint (work areas, charging zones, danger stripes)
- AGV path overlays
- Region / department color highlights
- Wall posters and hazard signs (rotate the component to wall-mount)
- Any decorative surface that should add detail to the 3D scene without
  modeling depth

For labeled markings, place a `Text` component on top of the decal.

## Visibility

Decal is **3D-only**. It is *intentionally* invisible and non-selectable on
the 2D canvas — a flat colored rectangle in the 2D schematic would just
clutter the view. To work with a decal, switch the modeler to 3D mode.

- 2D canvas — empty (no paint, no click target)
- 3D mode — visible as a flat plane lying on the XZ ground; a small *editor
  selection handle* near a corner is the click target. The mesh body itself
  is non-raycastable so contents placed on top remain selectable.

## Properties

| property         | meaning                                                                                                                            |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `width / height` | Footprint of the plane (XZ).                                                                                                       |
| `fillStyle`      | Surface color. Supports `#RGB` / `#RRGGBB` / `#RRGGBBAA` / `rgb(...)` / `rgba(...)`. The alpha channel is reflected in material opacity. |
| `strokeStyle`    | Edge line color. Rendered as `LineSegments` along the plane edges.                                                                 |
| `alpha`          | Per-instance opacity multiplier (0–1). Multiplied with `fillStyle.alpha`.                                                          |
| `rotation`       | Rotate the plane in world space (e.g. rotate 90° to mount on a wall).                                                              |

## Z-stack

Decals sit slightly above the floor surface so they paint *on top of* the
floor plate without z-fighting. Multiple stacked decals are ordered by their
own z-priority — the framework keeps them separated.

## Differences from related components

| component      | role                                                                              |
| -------------- | --------------------------------------------------------------------------------- |
| **Decal**      | Flat surface fixed in world space (this).                                         |
| **Sprite**     | Flat surface that always faces the camera (billboard).                            |
| **FloorPlate** | The floor itself — a structural surface, not decoration on top of it.             |
| **Rect**       | A 2D-first rectangle. Use this if you genuinely need a 2D rectangle representation. |

## Tips

- If the decal seems invisible after creation, check that you are in 3D
  mode. The component has no 2D appearance by design.
- To resize precisely, select via the corner handle in 3D mode and use the
  property panel `width` / `height` inputs.
- For semi-transparent overlays (e.g. zone tint), give `fillStyle` an rgba
  value such as `rgba(255, 200, 0, 0.4)` — both color and opacity are
  controlled in one place.
