# mesh

> Talos 0.6 · Since 0.6

Use it in a scene entity's `components` list as `{ "type": "mesh", … }`. The contract writes the fields flat and refuses unknown keys.

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `asset` | `string` | yes |  |  | A key of scene.assets whose kind is "glb": a model file, or a built-in mesh — builtin:cube, builtin:sphere, builtin:capsule, builtin:plane, builtin:cylinder, builtin:cone (see AssetRef.path for their sizes). |
| `material` | `string` | no |  |  |  |
| `color` | `string` | no |  |  |  |
| `castShadow` | `boolean` | no |  |  |  |
| `receiveShadow` | `boolean` | no |  |  |  |
| `collide` | `boolean` | no |  |  | false: the mesh gets no automatic collider, so bodies pass through it (grass, a banner, a pickup's look). Absent or true: an entity with a mesh and no `collider` collides as its mesh, a static body built once at load, when nothing moves it: no `rigidbody`, `controller`, `vehicle`, `wheel`, `navagent`, `animator` or `script` on it or any parent, no `goal`, `spawn`, `trigger` or `water` on it, and not spawned by a behaviour. The shape is the asset's convex hulls when it carries them, a convex built-in's own hull, else the mesh's triangles. A `collider` component on the entity replaces it. |

## Rules that can refuse it

- `component-not-writable`
- `plant-bake-missing`
- `plant-too-heavy`
- `render.hd.rt-proxy-invalid`
- `render.hd.vg_resident_full`
- `render.shader.vg-skipped`
- `script-call-inapplicable`
- `ui.model-view.unresolved.tentative`

## Example

From the contract's tested fixture `fixtures/contract/full20/scene.json#ramp`.

```json
{
  "type": "mesh",
  "asset": "ramp"
}
```
