Initialise iframeListener in preload
Add documentation and CHANGELOG
This commit is contained in:
parent
5f7361156b
commit
eb8404ac91
4 changed files with 87 additions and 58 deletions
|
@ -163,3 +163,17 @@ WA.room.setTiles([
|
|||
{x: 9, y: 4, tile: 'blue', layer: 'setTiles'}
|
||||
]);
|
||||
```
|
||||
|
||||
### Loading a tileset
|
||||
```
|
||||
WA.room.loadTileset(url: string): Promise<number>
|
||||
```
|
||||
Load a tileset in JSON format from an url and return the id of the first tile of the loaded tileset.
|
||||
|
||||
You can create a tileset file in Tile Editor.
|
||||
|
||||
```javascript
|
||||
WA.room.loadTileset("Assets/Tileset.json").then((firstId) => {
|
||||
WA.room.setTiles([{x: 4, y: 4, tile: firstId, layer: 'bottom'}]);
|
||||
})
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue