@yagejs/tilemap
v0.1.0
Published
Tile-based map loading and rendering for YAGE
Maintainers
Readme
@yagejs/tilemap
Tile-based map loading and rendering for the YAGE 2D game engine.
Install
npm install @yagejs/tilemapSupports Tiled map format out of the box. Bundles @pixi/tilemap for efficient rendering.
Usage
import { Engine } from "@yagejs/core";
import { TilemapPlugin, TilemapComponent, tiledMap } from "@yagejs/tilemap";
const engine = new Engine();
engine.use(new TilemapPlugin());Load and render a Tiled map:
const map = await assets.load(tiledMap("level1.json"));
entity.add(new TilemapComponent({ map }));What's in the box
- TilemapPlugin / TilemapComponent - tile-based map rendering
- Tiled loader - JSON format support with tilesets, object layers, properties
- Collision extraction - convert map shapes to
@yagejs/physicscolliders (optional) - Custom properties - typed access to Tiled object properties
Docs
Full documentation at yage.dev.
License
MIT
