PlacedSpec beta
Interface of @v12-engine/editor
export interface PlacedSpecWhat a tool that puts one down with a click, picks one with a press and moves it with a drag works on (PlacedTool): a kind of thing that stands at a place. The lights, the effects, the points and the sounds each say theirs
Members
add
add(ground: Vec2): number | undefined;Puts a new one down at a place, as one step: its id, or nothing where none can go
at
at(pointer: ToolPointer, ground: Vec2): number | undefined;The one a press is on, if any, by its id
kind
readonly kind: CollectionId;Which kind of thing it is: what the map's symmetry puts down again with it (mirrorItems)
move
move(id: number, to: Vec2): void;Moves one to a place, as a part of the drag's step
moved
moved(id: number): string;What a drag of one is called in the history: "Move gate"
picked
picked(): number | undefined;The one picked, if any: what Escape lets go of, and what the keys turn
placeOf
placeOf(id: number): Vec2 | undefined;Where one stands, by its id: what a drag moves it from
select
select(id: number | null): void;Selects one alone, by its id, or none
turn
turn?(id: number, by: number): void;Turns one by [ and ] (a twelfth of a half turn), where its kind turns that way
turnsNext
turnsNext?: boolean;Whether [ and ] turn the way the next one faces (ToolState.facing) while none is picked