TileChunkData class
Sixteen by sixteen cells of one layer.
Constructors
- TileChunkData(int cx, int cy, [Uint32List? cells])
-
Chunk (
cx,cy) holdingcells— kept, not copied — or all empty cells when null. Throws an ArgumentError whencellsis not TileChunkStore.cellsPerChunk long.
Properties
- cells → Uint32List
-
Row by row. Write through TileChunkStore.setCell so the revision
and the saved form keep up.
final
- cx → int
-
Which chunk: the cell (cx * 16, cy * 16) is its top-left.
final
- cy → int
-
The chunk's row, counted in chunks; see cx.
final
- encoded ↔ String?
-
This chunk as the codec last wrote it; null once it changes.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether every cell is empty.
no setter
- revision ↔ int
-
Bumped on every change: what a renderer keys its cached buffers on.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copy(
) → TileChunkData - A separate chunk: its own copy of the cells, with the same revision and encoded form.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited