Use an adaptive precision depending on the size of the grid
Obtain a reference to the Collection of embedded Document instances within the currently viewed Scene
A convenience method for accessing the placeable object instances contained in this layer
An Array of placeable objects in this layer which have the _controlled attribute
Track the set of PlaceableObjects on this layer which are currently controlled.
Track the PlaceableObject on this layer which is currently hovered upon.
Track the PlaceableObject on this layer which is currently hovered upon.
Is this layer currently active
The canonical name of the CanvasLayer
Obtain a reference to the PlaceableObject class definition which represents the Document type in this layer.
Return a reference to the active instance of this canvas layer
Render a configuration sheet to configure the default Drawing settings
Get initial data for a new drawing. Start with some global defaults, apply user default config, then apply mandatory overrides per tool.
The initial coordinate
The new drawing data
Handle double left-click events which originate from the Canvas stage.
The PIXI InteractionEvent which wraps a PointerEvent
Obtain an iterable of objects which should be added to this PlaceableLayer
Draw a single placeable object
The Document instance used to create the placeable object
Override the default PIXI.Container behavior for how objects in this container are sorted.
Clear the contents of the preview container, restoring visibility of original (non-preview) objects.
Get a PlaceableObject contained in this layer by its ID. Returns undefined if the object doesn't exist or if the canvas is not rendering a Scene.
The ID of the contained object to retrieve
The object instance, or undefined
Acquire control over all PlaceableObject instances which are visible and controllable within the layer.
Options passed to the control method of each object
An array of objects that were controlled
Release all controlled PlaceableObject instance from this layer.
Options passed to the release method of each object
The number of PlaceableObject instances which were released
Simultaneously rotate multiple PlaceableObjects using a provided angle or incremental. This executes a single database operation using Scene.update. If rotating only a single object, it is better to use the PlaceableObject.rotate instance method.
Options which configure how multiple objects are rotated
An array of objects which were rotated
Simultaneously move multiple PlaceableObjects via keyboard movement offsets. This executes a single database operation using Scene.update. If moving only a single object, this will delegate to PlaceableObject.update for performance reasons.
Options which configure how multiple objects are moved
An array of objects which were moved during the operation
Undo a change to the objects in this layer This method is typically activated using CTRL+Z while the layer is active
An array of documents which were modified by the undo operation
A helper method to prompt for deletion of all PlaceableObject instances within the Scene Renders a confirmation dialogue to confirm with the requester that all objects will be deleted
An array of Document objects which were deleted by the operation
Record a new CRUD event in the history log so that it can be undone later
The event type (create, update, delete)
The object data
Copy currently controlled PlaceableObjects to a temporary Array, ready to paste back into the scene later
The Array of copied PlaceableObject instances
Paste currently copied PlaceableObjects back to the layer by creating new copies
The destination position for the copied data.
Options which modify the paste operation
An Array of created Document instances
Select all PlaceableObject instances which fall within a coordinate rectangle.
A boolean for whether the controlled set was changed in the operation
Update all objects in this layer with a provided transformation. Conditionally filter to only apply to objects which match a certain condition.
An object of data or function to apply to all matched objects
A function which tests whether to target each object
An array of updated data once the operation is complete
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
Get the world-transformed drop position.
Returns the transformed x, y co-ordinates, or false if the drag event was outside the canvas.
Create a preview of this layer's object type from a world document and show its sheet so it can be finalized.
The data to create the object with.
The position to render the sheet at.
Handling of mouse-up events which conclude a new object creation after dragging
The drag drop event
Placeable Layer Objects
Preview Object Placement
Keep track of history so that CTRL+Z can undo changes
Track whether "highlight all objects" is currently active
Keep track of an object copied with CTRL+C which can be pasted later
A Quadtree which partitions and organizes Walls into quadrants for efficient target identification.
Options for this layer instance.
A reference to the named Document type which is contained within this Canvas Layer.
The named game setting which persists default drawing configuration for the User
Creation states affected to placeables during their construction.
The DrawingsLayer subclass of PlaceablesLayer. This layer implements a container for drawings.