Skip to content

1681-engine / ui / WorldAnchorOptions

Interface: WorldAnchorOptions ​

Defined in: src/ui/dom/DomWorldAnchors.ts:5

Properties ​

alignX? ​

ts
optional alignX?: number;

Defined in: src/ui/dom/DomWorldAnchors.ts:13

Which point of the element sits on the spot, as fractions of its size (default 0.5, 1: centred above it). Written as a CSS translate in percent, so the element is never measured.


alignY? ​

ts
optional alignY?: number;

Defined in: src/ui/dom/DomWorldAnchors.ts:14


margin? ​

ts
optional margin?: number;

Defined in: src/ui/dom/DomWorldAnchors.ts:16

Kept shown this far past the screen's edge (default 64 px), so a wide label does not pop out early.


offsetX? ​

ts
optional offsetX?: number;

Defined in: src/ui/dom/DomWorldAnchors.ts:7

Moved this far after projecting (CSS px): a name 20 px over the feet.


offsetY? ​

ts
optional offsetY?: number;

Defined in: src/ui/dom/DomWorldAnchors.ts:8

Released under the MIT License.