getX
getX: (LocalPoint) -> numberScene x in 1/128ths of a tile.
LocalPoint.new(…)
LocalPoint.fromWorld(…)
LocalPoint.fromScene(…)| Method | Returns | Description |
|---|---|---|
getX() | number | Scene x in 1/128ths of a tile. |
getY() | number | Scene y in 1/128ths of a tile. |
getWorldView() | number | The id of the world view (WorldView.TOPLEVEL, 0, is the top level). |
getSceneX() | number | The scene tile x, flooring. |
getSceneY() | number | The scene tile y, flooring. |
distanceTo(LocalPoint) | number | The Euclidean distance in local units, truncated, or 2147483647 across world views. |
isInScene() | boolean | Whether the point is inside the basic 104x104 scene (deprecated). |
dx(number) | LocalPoint | This point moved dx local units east. |
dy(number) | LocalPoint | This point moved dy local units north. |
plus(number, number) | LocalPoint | This point moved by dx, dy local units. |
equals(any) | boolean | Whether other is a local point with the same coordinates and world view. == answers the same. |
hashCode() | number | A hash of x, y and the world view. |
toString() | string | LocalPoint(x=…, y=…, worldView=…). |
new(number, number) | LocalPoint | (number, number) -> LocalPoint: A local point in the top-level world view (deprecated). |
new(number, number, number) | LocalPoint | |
new(number, number, WorldView) | LocalPoint | |
fromWorld(Client, WorldPoint) | LocalPoint? | (Client, WorldPoint) -> LocalPoint?: The centre of the tile in the world view holding it (a boat's for a tile in a boat's scene, else the… |
fromWorld(Client, number, number) | LocalPoint? | |
fromWorld(WorldView, WorldPoint) | LocalPoint? | |
fromWorld(WorldView, number, number) | LocalPoint? | |
fromWorld(Scene, number, number) | LocalPoint? | |
fromWorldInstance(WorldView, WorldPoint) | {LocalPoint} | Every local point of world view wv that is a copy of this template tile, ordered by plane, then chunk x, then chunk y: an instance can us… |
fromScene(number, number) | LocalPoint | (number, number) -> LocalPoint: The centre of top-level scene tile x, y (deprecated). |
fromScene(number, number, WorldView) | LocalPoint | |
fromScene(number, number, Scene) | LocalPoint |
| Method | Returns | Description |
|---|---|---|
Actor.getCameraFocus | LocalPoint | Where the camera orbits while it follows the actor (client:getCameraFocusEntity() is the actor then): its getLocalLocation(). |
Actor.getLocalLocation | LocalPoint | The client-side position in local units (128 a tile), where the actor renders: interpolated between tiles while it moves. |
CameraFocusableEntity.getCameraFocus | LocalPoint | The centre of the tile the camera follows, in the local units of the world view holding the tile (a boat's, for a tile on it): its `LocalPo… |
Client.getCameraFocusPoint | LocalPoint? | The point the camera orbits, a local point in the top-level world view: what getCameraFocus() answers on client:getCameraFocusEntity()'… |
Client.getLocalDestinationLocation | LocalPoint? | The tile the player is walking to (the destination flag), in the top-level world view; nil when there is none. |
ClientObjectController.getLocation | LocalPoint | Where it is: its x and y in its world view (-1 until placed). |
GraphicsObject.getLocation | LocalPoint | Where it plays, as a local point of its world view. |
ItemLayer.getLocalLocation | LocalPoint | Its tile's centre as a local point. |
LocalPointClass.fromScene | LocalPoint | (number, number) -> LocalPoint: The centre of top-level scene tile x, y (deprecated). |
LocalPointClass.fromWorld | LocalPoint? | (Client, WorldPoint) -> LocalPoint?: The centre of the tile in the world view holding it (a boat's for a tile in a boat's scene, else the… |
LocalPointClass.fromWorldInstance | {LocalPoint} | Every local point of world view wv that is a copy of this template tile, ordered by plane, then chunk x, then chunk y: an instance can us… |
LocalPointClass.new | LocalPoint | (number, number) -> LocalPoint: A local point in the top-level world view (deprecated). |
Projectile.getTarget | LocalPoint? | The centre of its target tile as a local point of the top level (LocalPoint.fromWorld(topLevel, getTargetPoint())), nil when the tile i… |
ProjectileMoved.getPosition | LocalPoint? | Where it is heading: the centre of its target tile as a local point of the top level (it does not follow an aimed-at actor), nil when the… |
Tile.getLocalLocation | LocalPoint | Its centre as a local point. |
TileObject.getLocalLocation | LocalPoint | The local point of the object's centre. |
WorldEntity.getCameraFocus | LocalPoint? | Where the camera orbits while it follows the boat (client:getCameraFocusEntity() is the boat then): its getLocalLocation(). nil once… |
WorldEntity.getLocalLocation | LocalPoint? | Where it is in the world view it sails in: its fine position now (128 to a tile; world view 0), nil once it is gone. Raises on a client w… |
WorldEntity.transformToMainWorld | LocalPoint? | Where point, a local point in this entity's own world view, is in the world view it sails in, as the entity stands and turns now (world v… |
getXgetX: (LocalPoint) -> numberScene x in 1/128ths of a tile.
getYgetY: (LocalPoint) -> numberScene y in 1/128ths of a tile.
getWorldViewgetWorldView: (LocalPoint) -> numberThe id of the world view (WorldView.TOPLEVEL, 0, is the top level).
getSceneXgetSceneX: (LocalPoint) -> numberThe scene tile x, flooring.
getSceneYgetSceneY: (LocalPoint) -> numberThe scene tile y, flooring.
distanceTodistanceTo: (LocalPoint, LocalPoint) -> numberThe Euclidean distance in local units, truncated, or 2147483647 across world views.
isInSceneisInScene: (LocalPoint) -> booleanWhether the point is inside the basic 104x104 scene (deprecated).
dxdx: (LocalPoint, number) -> LocalPointThis point moved dx local units east.
dydy: (LocalPoint, number) -> LocalPointThis point moved dy local units north.
plusplus: (LocalPoint, number, number) -> LocalPointThis point moved by dx, dy local units.
equalsequals: (LocalPoint, any) -> booleanWhether other is a local point with the same coordinates and world view. == answers the same.
hashCodehashCode: (LocalPoint) -> numberA hash of x, y and the world view.
toStringtoString: (LocalPoint) -> stringLocalPoint(x=…, y=…, worldView=…).
newnew: ((number, number) -> LocalPoint) & ((number, number, number) -> LocalPoint) & ((number, number, WorldView) -> LocalPoint)(number, number) -> LocalPoint: A local point in the top-level world view (deprecated).
(number, number, number) -> LocalPoint: A local point in world view worldView.
(number, number, WorldView) -> LocalPoint: A local point in world view wv (its getId(); nothing is read).
fromWorldfromWorld: ((Client, WorldPoint) -> LocalPoint?) & ((Client, number, number) -> LocalPoint?) & ((WorldView, WorldPoint) -> LocalPoint?) & ((WorldView, number, number) -> LocalPoint?) & ((Scene, number, number) -> LocalPoint?)(Client, WorldPoint) -> LocalPoint?: The centre of the tile in the world view holding it (a boat's for a tile in a boat's scene, else the top level, as findWorldViewFromWorldPoint), or nil when it is not on that view's plane or is outside its scene, and with no scene loaded. Pass the client global.
(Client, number, number) -> LocalPoint?: The centre of world tile x, y in the top-level scene, or nil outside it and with no scene loaded. The plane is not checked.
(WorldView, WorldPoint) -> LocalPoint?: The centre of the tile in world view wv, or nil when it is not on wv's plane (getPlane()) or is outside its scene, and when wv is no longer loaded or has no scene.
(WorldView, number, number) -> LocalPoint?: The centre of world tile x, y in world view wv, or nil outside its scene and when wv is no longer loaded or has no scene. The plane is not checked.
(Scene, number, number) -> LocalPoint?: The centre of world tile x, y in scene's world view, or nil outside the 104-tile square at its base (a Scene is 104 tiles whatever its world view's size) and when its world view is no longer loaded. The plane is not checked.
fromWorldInstancefromWorldInstance: (WorldView, WorldPoint) -> {LocalPoint}Every local point of world view wv that is a copy of this template tile, ordered by plane, then chunk x, then chunk y: an instance can use one chunk several times, and outside an instance it is the tile itself. WorldPoint.toLocalInstance then fromWorld on each, as a plugin marking a tile would write it, in one call. Empty when wv holds no copy on its plane, and when it is no longer loaded or has no scene, so a per-tick caller needs no guard. The reverse is WorldPoint.fromLocalMainWorld.
fromScenefromScene: ((number, number) -> LocalPoint) & ((number, number, WorldView) -> LocalPoint) & ((number, number, Scene) -> LocalPoint)(number, number) -> LocalPoint: The centre of top-level scene tile x, y (deprecated).
(number, number, WorldView) -> LocalPoint: The centre of scene tile x, y of world view wv (its getId(); nothing is read).
(number, number, Scene) -> LocalPoint: The centre of scene tile x, y of scene's world view (its getWorldViewId(); nothing is read).