Internal
_rulerThe ruler paths.
A container of cursor interaction elements not bound to stage transforms. Contains cursors elements.
A graphics instance used for drawing debugging visualization
A container of DoorControl instances
Options for this layer instance.
A container of pings interaction elements. Contains pings elements.
The Canvas selection rectangle
Is this layer currently active
The name used by hooks to construct their hook string. Note: You should override this getter if hookName should not return the class constructor name.
A convenience accessor to the Ruler for the active game user
Static
instanceReturn a reference to the active instance of this canvas layer
Static
layerInternal
Handle mousemove events on the game canvas to broadcast activity. With SHOW_CURSOR permission enabled, the user's cursor position is transmitted.
Activate the InteractionLayer, deactivating other layers and marking this layer's children as interactive.
Optional
options: { tool?: string } = {}Options which configure layer activation
Optional
tool?: stringA specific tool in the control palette to set as active
The layer instance, now activated
Deactivate the InteractionLayer, removing interactivity from its children.
The layer instance, now inactive
Draw the canvas layer, rendering its internal components and returning a Promise. The Promise resolves to the drawn layer once its contents are successfully rendered.
Optional
options: object = {}Options which configure how the layer is drawn
Draw the cursors container
Draw door control icons to the doors container.
Draw a ping at the edge of the viewport, pointing to the location of an off-screen ping.
The coordinates of the off-screen ping.
Optional
options: any = {}Additional options to configure how the ping is drawn.
A promise which resolves once the Ping has been drawn and animated.
Draw a ping on the canvas.
The position on the canvas that was pinged.
Optional
options: any = {}Additional options to configure how the ping is drawn.
A promise which resolves once the Ping has been drawn and animated.
Create and add Ruler instances for every game User.
Draw the select rectangle given an event originated within the base canvas layer
The rectangle
Get the Cursor instance for a specific User ID.
The User ID
Get the Ruler instance for a specific User ID.
The User ID
Get the zIndex that should be used for ordering this layer vertically relative to others in the same Container.
Deconstruct data used in the current layer in preparation to re-draw the canvas
Optional
options: object = {}Options which configure how the layer is deconstructed
Update the Ruler for a User given the provided path.
The User for whom to update the Ruler
The path and hidden state of the Ruler
Protected
_activateProtected
The inner _activate method which may be defined by each InteractionLayer subclass.
Protected
_canProtected
Does the User have permission to left-click drag on the Canvas?
The User performing the action.
The event object.
Protected
_highlightProtected
Highlight the objects of this layer.
Should the objects of this layer be highlighted?
Protected
_onProtected
Handle the canvas panning to a new view.
Protected
_onProtected
Handle left mouse-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Handle double left-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Handle right mouse-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Handle double right mouse-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Handle a Copy keypress while this layer is active.
The copy key press event
Was the event handled?
Protected
_onProtected
Handle a Cut keypress while this layer is active.
The cut key press event
Was the event handled?
Protected
_onProtected
Handle a Cycle View keypress while this layer is active.
The cycle-view key press event
Was the event handled?
Protected
_onProtected
Handle a Delete keypress while this layer is active.
The delete key press event
Was the event handled?
Protected
_onProtected
Handle a Dismiss keypress while this layer is active.
The dismiss key press event
Was the event handled?
Protected
_onProtected
Cancel a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Conclude a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Continue a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Start a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Protected
_onProtected
Handle pinging the canvas.
The triggering canvas interaction event.
The local canvas coordinates of the mousepress.
Protected
_onProtected
Handle mouse-wheel events which occur for this active layer.
The WheelEvent initiated on the document
Protected
_onProtected
Handle a Paste keypress while this layer is active.
The paste key press event
Was the event handled?
Protected
_onProtected
Handle a Select All keypress while this layer is active.
The select-all key press event
Was the event handled?
Protected
_onProtected
Handle a Undo keypress while this layer is active.
The undo key press event
Was the event handled?
Static
preparePrepare data used by SceneControls to register tools used by this layer.
A CanvasLayer for displaying UI controls which are overlayed on top of other layers.
We track three types of events: