Skip to content

MapPick beta ​

Interface of @v12-engine/editor

ts
export interface MapPick

A click, or the pointer, in the scene as a panel asked for it (panel.pick, editor.screen.pickFromScene): where in the view, where on the ground (none off the map), which cell, and what stands there as the editor picks it (an object, a camp, a region, a point, a path, a doodad, a light, an effect, a thing of a game's own kind), with the keys held

Members ​

alt ​

ts
alt: boolean;

Whether Alt is held

cell ​

ts
cell: {
        x: number;
        z: number;
    } | null;

The map cell under the pointer, or null off the map

ctrl ​

ts
ctrl: boolean;

Whether Ctrl (or Cmd) is held

ground ​

ts
ground: Vec2 | null;

The point on the ground under the pointer, or null off the map

picked ​

ts
picked: Named | null;

What stands under the pointer as the editor picks it, or null for the ground alone

shift ​

ts
shift: boolean;

Whether Shift is held

x ​

ts
x: number;

Where the pointer is in the view, in pixels from the canvas's left

y ​

ts
y: number;

Where the pointer is in the view, in pixels from the canvas's top