API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceLdtkLayerDef
@codexo/exojs-ldtk / ldtk / stable
Layer definition from `defs.layers`.
11
props
0
methods
0
events
Import
import { LdtkLayerDef } from '@codexo/exojs-ldtk'Layer definition from `defs.layers`.
Properties11
gridSize: numberidentifier: stringintGridValues?: readonly LdtkIntGridValueDefAn IntGrid value definition (maps a raw int to a named, coloured entry).[]parallaxFactorX?: numberParallax horizontal factor, in [-1, 1]. 0 (the default) means "no parallax" - the layer scrolls at normal camera speed, same as every other layer. See import('./ldtkToTileMap').ldtkToTileMap for how this is carried onto the runtime layer's parallaxX.
parallaxFactorY?: numberParallax vertical factor, in [-1, 1]. 0 (the default) means "no parallax".
parallaxScaling?: booleanWhether a non-zero parallax factor also scales this layer up/down to simulate depth. Defaults to true (LDtk's own default) when absent. Converted to the runtime layer's uniform parallaxScale multiplier.
pxOffsetX?: numberDefinition-level horizontal pixel offset, added to each layer instance offset.
pxOffsetY?: numberDefinition-level vertical pixel offset, added to each layer instance offset.
tilesetDefUid?: null | numberUID of the default tileset for this layer. null or absent = none.
uid: numberSource