getWorldMapPosition
getWorldMapPosition: (WorldMap) -> Point?The world tile at the centre of the map, or nil before the world map has been opened this session (the client has no world map yet).
client:getWorldMap()| Method | Returns | Description |
|---|---|---|
getWorldMapPosition() | Point? | The world tile at the centre of the map, or nil before the world map has been opened this session (the client has no world map yet). |
getWorldMapZoom() | number | The zoom the map draws at, pixels per tile, or 0 before the world map has been opened this session. |
setWorldMapPositionTarget(WorldPoint) | () | Scroll the map to worldPoint: when the map's current area contains the tile, it becomes the map's scroll target (x - regionLowX * 64, `… |
worldPointToGraphicsPoint(WorldPoint) | Point? | The canvas point at the centre of worldPoint's tile on the open world map, or nil when the map is closed or its surface does not hold t… |
getWorldMapData() | WorldMapData? | The surface of the map's current area, or nil before the world map has an area this session: the client loads one when the map is first o… |
getWorldMapRenderer() | WorldMapRenderer? | The world map's renderer, or nil before the world map has loaded an area this session. Raises on a client whose table does not place its… |
| Method | Returns | Description |
|---|---|---|
Client.getWorldMap | WorldMap | The world map's view (whether or not it is open). |
getWorldMapPositiongetWorldMapPosition: (WorldMap) -> Point?The world tile at the centre of the map, or nil before the world map has been opened this session (the client has no world map yet).
getWorldMapZoomgetWorldMapZoom: (WorldMap) -> numberThe zoom the map draws at, pixels per tile, or 0 before the world map has been opened this session.
setWorldMapPositionTargetsetWorldMapPositionTarget: (WorldMap, WorldPoint) -> ()Scroll the map to worldPoint: when the map's current area contains the tile, it becomes the map's scroll target (x - regionLowX * 64, y - regionLowY * 64), and the client scrolls the map there over the next frames. Does nothing when the area does not contain the tile, or before the world map has an area (it was never opened this session); on the client thread only.
worldPointToGraphicsPointworldPointToGraphicsPoint: (WorldMap, WorldPoint) -> Point?The canvas point at the centre of worldPoint's tile on the open world map, or nil when the map is closed or its surface does not hold the tile, by the client's own surface test (WorldMapData.surfaceContainsPosition, on the client thread; elsewhere the area's region bounds only).
getWorldMapDatagetWorldMapData: (WorldMap) -> WorldMapData?The surface of the map's current area, or nil before the world map has an area this session: the client loads one when the map is first opened.
getWorldMapRenderergetWorldMapRenderer: (WorldMap) -> WorldMapRenderer?The world map's renderer, or nil before the world map has loaded an area this session. Raises on a client whose table does not place its layout.