API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classObjectLayer
A data-only layer of TileMapObjects — spawn points, trigger zones, collision regions, markers. Object layers are not rendered by the tile renderer; they are parsed and exposed for gameplay use (e.g. building physics colliders, placing entities). Query with query (untyped, fully back-compatible) or, when an ObjectSchema type argument `S` is supplied, with the typed accessors byType, byKind, and where — these narrow `properties` to the developer-declared shape. The schema is **opt-in**: the default type parameter reproduces the original untyped behaviour, so `new ObjectLayer(options)` and `map.getObjectLayer('x')` are unchanged.
import { ObjectLayer } from '@codexo/exojs-tilemap' A data-only layer of TileMapObjects — spawn points, trigger zones, collision regions, markers. Object layers are not rendered by the tile renderer; they are parsed and exposed for gameplay use (e.g. building physics colliders, placing entities).
Query with query (untyped, fully back-compatible) or, when an ObjectSchema type argument `S` is supplied, with the typed accessors byType, byKind, and where — these narrow `properties` to the developer-declared shape. The schema is **opt-in**: the default type parameter reproduces the original untyped behaviour, so `new ObjectLayer(options)` and `map.getObjectLayer('x')` are unchanged.
new(options: ObjectLayerOptions): ObjectLayer<S> byKind(kind: K): Extract<RectangleObject<TileProperties>, object> | Extract<EllipseObject<TileProperties>, object> | Extract<PointObject<TileProperties>, object> | Extract<PolygonObject<TileProperties>, object> | Extract<PolylineObject<TileProperties>, object> | Extract<TileObject<TileProperties>, object> | Extract<TextObject<TileProperties>, object>[] byType(type: T): TypedObject<S, T>[] getObjectById(id: number): TileMapObject<TileProperties> | undefined getObjectByName(name: string): TileMapObject<TileProperties> | undefined query(filter: ObjectQuery): TileMapObject<TileProperties>[] where(type: T, predicate: object): TypedObject<S, T>[] class: string drawOrder: "index" | "topdown" id: number kind: "object" name: string objects: readonly TileMapObject<TileProperties>[] offsetX: number offsetY: number opacity: number properties: TileProperties visible: boolean