Skip to content

SortLayerRegistry

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:49

Typed registry of sort-layer names (TanStack-style augmentation).

User code extends this interface to get typed sprite.sortLayer assignment and JSX props:

declare module 'three-flatland' {
interface SortLayerRegistry {
radarBlip: SortLayerConfig
}
}
flatland.declareSortLayer('radarBlip', { renderOrder: 42 })
sprite.sortLayer = 'radarBlip' // ✓ typed
sprite.sortLayer = 'radarBlop' // ✗ TS error

background: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:53

Background elements (sky, distant scenery)


default: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:51

Sprites that never declare a sortLayer land here (renderOrder 0).


effects: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:61

Visual effects (particles, spell effects)


entities: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:59

Game entities (players, enemies, items)


foreground: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:63

Foreground elements (overlays, weather)


ground: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:55

Ground/floor tiles


radarBlip: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.test-d.ts:9


shadows: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:57

Shadow sprites (render below entities)


ui: SortLayerConfig

Defined in: packages/three-flatland/src/pipeline/sortLayers.ts:65

UI elements (always on top)