API reference

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

T

typeTileCellSource

@codexo/exojs-tilemap / tilemap / stable

Per-cell collision classification for a tile layer, independent of the tiles the layer renders. Returns the class/type string for the cell, or `null` when the cell carries no collision. The string is opaque: it is the merge key for adjacent cells and reaches the consumer unchanged, exactly like the `type` of a tile collision object. A source is sampled while geometry is being built and is expected to answer identically for as long as the geometry is used. Changing what it returns does not invalidate geometry that was already built; rebuild instead.

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

Per-cell collision classification for a tile layer, independent of the tiles the layer renders.

Returns the class/type string for the cell, or `null` when the cell carries no collision. The string is opaque: it is the merge key for adjacent cells and reaches the consumer unchanged, exactly like the `type` of a tile collision object.

A source is sampled while geometry is being built and is expected to answer identically for as long as the geometry is used. Changing what it returns does not invalidate geometry that was already built; rebuild instead.

Definition1
(tx: number, ty: number) => null | string
Source