API reference

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

I

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?: number
Chunk height in tiles (default 32).
chunkWidth?: number
Chunk width in tiles (default 32).
class?: string
Layer class/type string (Tiled class). Defaults to ''.
height?: number
Layer height in tiles. Must be provided iff width is.
id: number
Stable layer ID (unique within the map).
name: string
Display name (need not be unique).
offsetX?: number
Layer pixel offset X. Default 0.
offsetY?: number
Layer pixel offset Y. Default 0.
opacity?: number
Opacity 0..1. Default 1.
parallaxScale?: number
Uniform scale applied together with the camera-relative parallax shift. 1 keeps the layer at its authored size. Default 1.
parallaxX?: number
Parallax scroll factor on the X axis. 1.0 = full camera speed (normal), 0.5 = half speed (farther away), 0.0 = stationary. Default 1.
parallaxY?: number
Parallax scroll factor on the Y axis. 1.0 = full camera speed (normal), 0.5 = half speed (farther away), 0.0 = stationary. Default 1.
tileHeight: number
Tile height in pixels (for coordinate conversion).
tileWidth: number
Tile width in pixels (for coordinate conversion).
tintColor?: null | number
Multiplicative layer tint as a 0xRRGGBB integer, or null for none (Tiled tintcolor). Applied to every chunk's render tint. Default null.
visible?: boolean
Initial visibility. Default true.
width?: number
Layer 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