TMXMap master READ ONLY 0
  • explorer
  • search
a [App]
a CG.TMXMap
a README.md
a app.ts
a [Test]
a test
  • README.md

TMXMap

Use Tiled Map Editor maps in Code.Gamelet with pixi.js.

What is Tiled Map Editor

Tiled is a 2D level editor that helps you develop the content of your game. Its primary feature is to edit tile maps of various forms, but it also supports free image placement as well as powerful ways to annotate your level with extra information used by the game. Tiled focuses on general flexibility while trying to stay intuitive.

Getting Started

Usage 1. import tmx resources into one appResource

CG.Base.resourceManager.addAppResource('TMXMap.testMap');
CG.Base.resourceManager.load(() => {
    CG.Base.pixi.initialize(600, 600);
    let tiledMap = new CG.TMXMap.MapRenderer('TMXMap.testMap');
    CG.Base.pixi.root.addChild(tiledMap);
});

Usage 2. import tmx resources into a appResource, and load tmx file from source code

CG.Base.resourceManager.addAppSource('test/beach.tmx');
CG.Base.resourceManager.load(() => {
    CG.Base.pixi.initialize(600, 600);
    let tiledMap = new CG.TMXMap.MapRenderer('test/beach.tmx')
    CG.Base.pixi.root.addChild(tiledMap);
});

To use tmx of appSource (usage 2), you need to modify the tmx: * tileset > source (tsx file)
change "filename" to "resourceAlias:filename" * tileset > image > source (embeded tileset)
change "filename" to "resourceAlias" or "resourceAlias:filename"

Versioning

We use SemVer for versioning.

Authors

Resources

READ ONLY
  • problem
  • console
No problems have been detected so far.
Ln 1, Col 1, Sel 0
Markdown