API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceTileLayerOptions
@codexo/exojs-tilemap / tilemap / stable
Options for constructing a TileLayer.
19
props
0
methods
0
events
Import
import { TileLayerOptions } from '@codexo/exojs-tilemap'Options for constructing a TileLayer.
Properties19
chunkHeight?: numberChunk height in tiles (default 32).
chunkWidth?: numberChunk width in tiles (default 32).
class?: stringLayer class/type string (Tiled class). Defaults to ''.
height?: numberLayer height in tiles. Must be provided iff width is.
id: numberStable layer ID (unique within the map).
name: stringDisplay name (need not be unique).
offsetX?: numberLayer pixel offset X. Default 0.
offsetY?: numberLayer pixel offset Y. Default 0.
opacity?: numberOpacity 0..1. Default 1.
parallaxScale?: numberUniform scale applied together with the camera-relative parallax shift. 1 keeps the layer at its authored size. Default 1.
parallaxX?: numberParallax scroll factor on the X axis. 1.0 = full camera speed (normal), 0.5 = half speed (farther away), 0.0 = stationary. Default 1.
parallaxY?: numberParallax scroll factor on the Y axis. 1.0 = full camera speed (normal), 0.5 = half speed (farther away), 0.0 = stationary. Default 1.
Layer properties (copied and frozen).
tileHeight: numberTile height in pixels (for coordinate conversion).
Tilesets available to this layer (shared with the map).
tileWidth: numberTile width in pixels (for coordinate conversion).
tintColor?: null | numberMultiplicative layer tint as a 0xRRGGBB integer, or null for none (Tiled tintcolor). Applied to every chunk's render tint. Default null.
visible?: booleanInitial visibility. Default true.
width?: numberLayer width in tiles. Omit together with height for an unbounded layer - chunk storage then accepts any signed chunk coordinate instead of being clamped to a fixed grid.
Source