Skip to content

TilemapComponentOptions

Defined in: tilemap/src/TilemapComponent.ts:38

Options for creating a TilemapComponent.

  • VisualComponentOptions

optional alpha?: number

Defined in: renderer/dist/index.d.ts:200

Alpha (opacity). Default: 1.

VisualComponentOptions.alpha


optional blendMode?: BLEND_MODES

Defined in: renderer/dist/index.d.ts:208

How this object’s pixels combine with what is drawn beneath it. Default: "inherit" — the mode of the nearest ancestor that sets one, which is "normal" unless a parent changed it. Set it explicitly to "normal" inside a group that uses another mode. See BlendMode for the modes that need import "pixi.js/advanced-blend-modes".

VisualComponentOptions.blendMode


optional interactive?: VisualInteractiveOptions

Defined in: renderer/dist/index.d.ts:221

Make the container interactive. When set, Pixi eventMode is configured so it participates in pointer hit-testing — required for any .on("pointerdown", ...) listener to fire.

consumeOnInteraction: true additionally marks it as a UI-input surface (via @yagejs/core’s consume registry), so a pointerdown landing on it is auto-claimed by @yagejs/input — preventing the same press from also firing gameplay action-map edges like MouseLeft. Default false: an interactive container still propagates the action, matching the “I want both Pixi events AND the action map” use case.

VisualComponentOptions.interactive


optional keyPrefix?: string

Defined in: tilemap/src/TilemapComponent.ts:52

Override prefix used when auto-keying entities spawned from Tiled objects. Defaults to mapKey. Set this when multiple instances of the same map need distinct entity-key namespaces (e.g. instanced dungeons).


optional layer?: string

Defined in: renderer/dist/index.d.ts:194

Render layer name. Default: “default”.

VisualComponentOptions.layer


optional layers?: string[]

Defined in: tilemap/src/TilemapComponent.ts:46

Which tile layers to render. Omit to render all.


optional map?: TiledMapData

Defined in: tilemap/src/TilemapComponent.ts:42

Parsed Tiled map data. Use only when you don’t have an AssetHandle. Auto-keys require mapKey or source.


optional mapKey?: string

Defined in: tilemap/src/TilemapComponent.ts:44

Asset path to the Tiled JSON. Resolved via Assets.get.


optional renderAboveEffects?: boolean

Defined in: renderer/dist/index.d.ts:227

Draw this visual after the scene’s layers, outside every layer- and scene-scope effect and mask. Default false. See VisualComponent.renderAboveEffects.

VisualComponentOptions.renderAboveEffects


optional source?: AssetHandle<TiledMapData>

Defined in: tilemap/src/TilemapComponent.ts:40

Asset handle for the map. Preferred — captures both the parsed data and the asset path.


optional tint?: ColorSource

Defined in: renderer/dist/index.d.ts:198

Tint color.

VisualComponentOptions.tint


optional visible?: boolean

Defined in: renderer/dist/index.d.ts:196

Initial visibility. Default: true.

VisualComponentOptions.visible

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/tilemap.md.