Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

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.

Registrymanifold:spatial-layer
Filesdata/spatial-layers/*.ron, *.update.ron, *.final.ron
Sidesboth: the server and every client load it, and the handshake’s data hash covers it
Readsnothing
ContractEntity core (docs/architecture/entity-core.md), data stage

Entry

A record, written SpatialLayer(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe 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")