A container of DoorControl instances
A container of HUD interface elements
A container of cursor interaction elements. Contains cursors, rulers, interaction rectangles, and pings
Ruler tools, one per connected user
A graphics instance used for drawing debugging visualization
The Canvas selection rectangle
A mapping of user IDs to Cursor instances for quick access
Options for this layer instance.
A mapping of user IDs to Ruler instances for quick access
The positions of any offscreen pings we are tracking.
A convenience accessor to the Ruler for the active game user
Is this layer currently active
The canonical name of the CanvasLayer
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.
Return a reference to the active instance of this canvas layer
Get the Ruler display for a specific User ID
Draw the cursors container
Create and add Ruler graphics instances for every game User.
Draw door control icons to the doors container.
Draw the select rectangle given an event originated within the base canvas layer
The rectangle coordinates of the form {x, y, width, height}
Handle mousemove events on the game canvas to broadcast activity of the user's cursor position
Create and draw the Cursor object for a given User
The User document for whom to draw the cursor Container
Update the cursor when the user moves to a new position
The User for whom to update the cursor
The new cursor position
Update display of an active Ruler object for a user given provided data
The User for whom to update the ruler
Data which describes the new ruler measurement to display
Draw a ping at the edge of the viewport, pointing to the location of an off-screen ping.
The co-ordinates of the off-screen ping.
Additional options to configure how the ping is drawn.
{@see Ping#animate}
Draw a ping on the canvas.
The position on the canvas that was pinged.
Additional options to configure how the ping is drawn.
{@see Ping#animate}
Activate the InteractionLayer, deactivating other layers and marking this layer's children as interactive.
Options which configure layer activation
The layer instance, now activated
Deactivate the InteractionLayer, removing interactivity from its children.
The layer instance, now inactive
Get the zIndex that should be used for ordering this layer vertically relative to others in the same Container.
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.
Deconstruct data used in the current layer in preparation to re-draw the canvas
Handle pinging the canvas.
The triggering canvas interaction event.
The local canvas coordinates of the mousepress.
Handle the canvas panning to a new view.
The inner _activate method which may be defined by each InteractionLayer subclass.
Handle left mouse-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Handle double left-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Start a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Continue a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Conclude a left-click drag workflow originating from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Cancel a left-click drag workflow originating from the Canvas stage.
A right-click pointer event on the document.
Handle right mouse-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Handle mouse-wheel events which occur for this active layer.
The WheelEvent initiated on the document
Handle a DELETE keypress while this layer is active.
The delete key press event
Given an off-screen co-ordinate, determine the closest point at the edge of the viewport to that co-ordinate.
The off-screen co-ordinate.
The closest point at the edge of the viewport to that co-ordinate and a ray cast from the centre of the screen towards it.
A CanvasLayer for displaying UI controls which are overlayed on top of other layers.
We track three types of events: