Tiled Layers - WorkAdventure Documentation
Tiled Layers - WorkAdventure Documentation
Inbound API
Map Scripting API Map Scripting API Extended utility functions Tiled Layers
Return a Map of all layers
Api Reference
Camera IMPORTANT
Chat To use these functions, you need to import the "Scripting API Extra" library.
Controls
Player Layers are renamed: if they are in a group layer, the name of the group layer is prepended with a "/" as a separator.
Room
import {getLayersMap} from '@workadventure/scripting-api-extra';
Sound
Tiled Properties
findLayerBoundaries(layer: ITiledMapTileLayer): {
top: number;
left: number;
right: number;
bottom: number;
}
Example:
findLayersBoundaries(layers: ITiledMapTileLayer[]): {
top: number;
left: number;
right: number;
bottom: number;
}
It will return a square containing all the tiles of all the layers passed in parameters.
Previous Next
« Extended Utility Functions Tiled Properties »