API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceObjectLayerOptions
@codexo/exojs-tilemap / tilemap / stable
Construction options for an ObjectLayer.
14
props
0
methods
0
events
Import
import { ObjectLayerOptions } from '@codexo/exojs-tilemap'Construction options for an ObjectLayer.
Properties14
class?: stringLayer class string.
drawOrder?: "index" | "topdown"Draw order for the objects (Tiled draworder): 'topdown' (sorted by y) or 'index' (source order). Informational; objects are stored as given. Default 'topdown'.
id: numberLayer id (unique within the map).
name?: stringLayer name.
objects?: readonly TileMapObjectA format-independent map object. The geometry kind is the discriminant; narrow on `kind` to read shape-specific fields. Template objects are not yet represente…<TilePropertiesAn immutable, flat key-value bag of generic tile properties. Adapters copy and freeze source properties; the runtime never retains a caller-owned mutable objec…>[]The objects in this layer.
offsetX?: numberLayer pixel offset X. Default 0.
offsetY?: numberLayer pixel offset Y. Default 0.
opacity?: numberLayer opacity in [0, 1]. Default 1.
parallaxScale?: numberUniform parallax scale around the layer origin. Default 1.
parallaxX?: numberParallax scroll factor on the X axis. 1 = full camera speed (normal), 0.5 = half speed (farther away), 0 = stationary. Default 1.
parallaxY?: numberParallax scroll factor on the Y axis. 1 = full camera speed (normal), 0.5 = half speed (farther away), 0 = stationary. Default 1.
Layer-level properties (copied and frozen).
tintColor?: null | numberMultiplicative layer tint as a 0xRRGGBB integer, or null for no tint (Tiled tintcolor). Default null.
visible?: booleanWhether the layer is visible. Default true.
Source