API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceReadonlyTileChunk

@codexo/exojs-tilemap / tilemap / stable

Public readonly view of a tile chunk. Provides read-only inspection access for iteration, queries, and the future renderer. The underlying storage is never exposed directly.

6
props
2
methods
0
events
Import
import { ReadonlyTileChunk } from '@codexo/exojs-tilemap'

Public readonly view of a tile chunk.

Provides read-only inspection access for iteration, queries, and the future renderer. The underlying storage is never exposed directly.

Methods2
cloneTiles(): Uint32Array
Create a defensive copy of the tile data. The caller owns the copy; mutation of the returned array cannot affect the chunk.
getRawAt(lx: number, ly: number): number
Read the raw packed tile word at local-in-chunk coordinates. Returns 0 for empty.
Properties6
cx: number
Signed chunk X coordinate.
cy: number
Signed chunk Y coordinate.
empty: boolean
Whether every cell is empty (all-zero).
height: number
Height of this chunk in tiles.
revision: number
Monotonic revision counter. Increments on every cell mutation within this chunk. No-ops (writing same value) do NOT increment.
width: number
Width of this chunk in tiles.
Source