> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eucaengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Components & schema

> The canonical component data — what you can spawn (SpawnRequest) and what you observe (RichEntityData). The running server (GET /schema) is the authoritative schema; the OpenAPI reference is a hand-maintained snapshot.

The world is a [flat table of components](/concepts/world-as-table), and you read and write them as plain
data. Two structs define the canonical surface: **`SpawnRequest`** (what you set when creating an entity)
and **`RichEntityData`** (what you get back from [`observe`](/concepts/query-verbs)).

<Note>
  **The running server is the authoritative schema.** `GET /schema` — and `euca discover` /
  `euca explain` from the CLI — reflect the live handlers exactly. The
  [API reference](/api-reference/introduction) is a hand-maintained OpenAPI snapshot whose
  generator has been retired, so it can drift from the live routes; use it as a browsable
  overview and trust `GET /schema` for exact field types.
</Note>

## What you can spawn — `SpawnRequest`

`POST /spawn` accepts these fields (all optional):

```
position [x,y,z]   scale [x,y,z]      velocity {linear,angular}   collider   physics_body
mesh   color        health   team      role ("hero"|"minion"|"tower"|"structure")
combat (bool)        combat_damage   combat_range   combat_speed   combat_cooldown   combat_style
ai_patrol [[x,y,z]]  gold   gold_bounty   xp_bounty   building_type   lane   spawn_point   player   agent_id
```

## What you observe — `RichEntityData`

`POST /observe` (and `GET /entities/{id}`) return entities as:

```
id   generation              # the (index, generation) handle
transform                    # position / rotation / scale (propagates on /step)
velocity   collider   physics_body
health [current,max]   team   dead   role
mana [current,max]   gold   level   # gameplay/MOBA
ai   trigger_zone   projectile      # behavior markers
tags   visible_to                   # tagging + view filtering
```

Fields are present only when the entity has that component. Pixels map to an `entity_id` via the
segmentation channel (see [Datasets](/systems/datasets)).

## Core component types

The lowest-level components (`GET /schema`):

| Component           | Shape                                                                             |
| ------------------- | --------------------------------------------------------------------------------- |
| `LocalTransform`    | `position [x,y,z]`, `rotation [x,y,z,w]`, `scale [x,y,z]`                         |
| `GlobalTransform`   | read-only; computed from the hierarchy on `/step`                                 |
| `Velocity`          | `linear [x,y,z]`, `angular [x,y,z]`                                               |
| `PhysicsBody`       | `Dynamic` \| `Static` \| `Kinematic`                                              |
| `Collider`          | `Aabb(hx,hy,hz)` \| `Sphere(r)` (plus capsule/convex/trimesh/compound internally) |
| `Health`, `Team`, … | gameplay components ([Gameplay & combat](/systems/gameplay-and-combat))           |

<Note>
  Transforms read `[0,0,0]` until the first `/step` — `GlobalTransform` propagates on step. A
  `velocity` only integrates if the entity has a `physics_body`.
</Note>

<Card title="Browse every struct" icon="table-list" href="/api-reference/introduction" horizontal>
  Every request/response struct, in the OpenAPI reference (hand-maintained snapshot).
</Card>
