data/spatial-layers/
A layer of the spatial index, which answers “what is near here” queries for sensors, area hits and pickups. An archetype names the layers its instances occupy in spatial_layers, and a query names the layers it searches. The engine declares manifold:player, manifold:creature, manifold:item, manifold:projectile and manifold:prop; a mod adds a layer when its entities need their own queries. A mod set has at most 32 layers.
| Registry | manifold:spatial-layer |
| Files | data/spatial-layers/*.ron, *.update.ron, *.final.ron |
| Sides | both: the server and every client load it, and the handshake’s data hash covers it |
| Reads | nothing |
| Contract | Entity core (docs/architecture/entity-core.md), data stage |
Entry
A record, written SpatialLayer(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The layer’s key, <mod-id>:<name>. Archetypes name it by key, or by bare name for the engine’s layers (creature). |
Example
No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/spatial-layers/burrow.ron, which the data stage loads in its tests:
SpatialLayer(id: "dataref-fixture:burrow")