MapCapture
constMapCapture:object
Defined in: client/api.d.ts:8742
Top-down orthographic pictures of the world around a point, for a gamemode’s own map or minimap art. Only what is streamed in around the player is in the picture, so capture near where you stand. Pixel (px, py) lies (0.5 - py / size) * extent cm along the yaw’s forward from the centre and (px / size - 0.5) * extent cm along its right; at yaw 0 forward is +X and right is +Y. The PNG stays on the player’s machine.
Type Declaration
Section titled “Type Declaration”busy()
Section titled “busy()”busy():
boolean
True from a capture() that returned true until its mapCaptured.
Returns
Section titled “Returns”boolean
capture()
Section titled “capture()”capture(
request?):boolean
Queues a capture: it renders over the next few frames, so auto-exposure can settle, and mapCaptured reports the result. False while one is already in flight. Throws a TypeError for a non-finite coordinate or a name outside the allowed characters.
Parameters
Section titled “Parameters”request?
Section titled “request?”Where to point the camera; every field is optional.
Returns
Section titled “Returns”boolean
lastImage()
Section titled “lastImage()”lastImage(
maxBytes?):string
The last successful capture’s PNG as a data: URI for a Web view, or ‘’ if there is none or it is over the cap. A failed capture clears it.
Parameters
Section titled “Parameters”maxBytes?
Section titled “maxBytes?”number
Size cap; default 8 MiB.
Returns
Section titled “Returns”string