API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceChunkSource
Supplies chunk data for one import('./TileLayer').TileLayer on demand, keyed by signed chunk coordinates - the abstraction a import('./ChunkStreamer').ChunkStreamer drives to implement chunk streaming, and the seam a format adapter or a procedural generator implements. `getChunk` may return synchronously (e.g. slicing already-parsed source data) or a `Promise` (e.g. an expensive procedural-generation algorithm, plausibly off the main thread) - import('./ChunkStreamer').ChunkStreamer installs a synchronous result in the same tick it was requested, with zero pop-in. Returning `null` (synchronously or via a resolved `Promise`) means "no data for this coordinate" - e.g. outside a finite provider's authored extent, even though the layer itself may be unbounded.
import { ChunkSource } from '@codexo/exojs-tilemap'Supplies chunk data for one import('./TileLayer').TileLayer on demand, keyed by signed chunk coordinates - the abstraction a import('./ChunkStreamer').ChunkStreamer drives to implement chunk streaming, and the seam a format adapter or a procedural generator implements.
`getChunk` may return synchronously (e.g. slicing already-parsed source data) or a `Promise` (e.g. an expensive procedural-generation algorithm, plausibly off the main thread) - import('./ChunkStreamer').ChunkStreamer installs a synchronous result in the same tick it was requested, with zero pop-in. Returning `null` (synchronously or via a resolved `Promise`) means "no data for this coordinate" - e.g. outside a finite provider's authored extent, even though the layer itself may be unbounded.
getChunk(cx: number, cy: number): ChunkPayloadA chunk payload ready to install into a import('./TileLayer').TileLayer via import('./TileLayer').TileLayer._adoptChunk - the same shape import('./TileChunk').… | Promise<ChunkPayloadA chunk payload ready to install into a import('./TileLayer').TileLayer via import('./TileLayer').TileLayer._adoptChunk - the same shape import('./TileChunk').… | null> | null