API reference

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

I

interfaceSampledChunkSourceOptions

@codexo/exojs-tilemap / tilemap / stable

Options for createSampledChunkSource.

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

Options for createSampledChunkSource.

Methods2
Convert a sampled value (and its tile coordinate, for position-dependent logic such as river carving or map edges) into a resolved tile, or null for an empty cell. Must be pure and deterministic, same requirement as sample.
sample(tx: number, ty: number): number
Sample a scalar value at a tile coordinate. Called once per tile within each requested chunk. Must be a pure, deterministic function of (tx, ty) - import('./ChunkStreamer').ChunkStreamer regenerates a chunk from scratch via this source whenever it's revisited after eviction, so a non-deterministic sampler would make previously-visited terrain silently change underneath the player.
Source