The Document instance represented by this object
A control icon for interacting with the object
A reference to the Scene embedded Document instance which this object represents
A mouse interaction manager instance which handles mouse workflows related to this object.
Status flags which are applied at render-time to update the PlaceableObject. If an object defines RenderFlags, it should at least include flags for "redraw" and "refresh".
The measurement ruler label
Retain a reference to the Scene within which this Placeable Object resides
The geometry shape used for testing point intersection
The template graphics
The tiling texture used for this template, if any
Protected
_borderInternal property used to configure the control border thickness
Static
embeddedIdentify the official Document name for this PlaceableObject class
Static
RENDER_The ticker priority when RenderFlags of this class are handled. Valid values are OBJECTS or PERCEPTION.
Static
RENDER_The object that this object is a preview of if this object is a preview.
The bounding box for this PlaceableObject. This is required if the layer uses a Quadtree, otherwise it is optional
The central coordinate pair of the placeable object based on it's own width and height
An indicator for whether the object is currently controlled
Is the HUD display active for this Placeable?
Does there exist a temporary preview of this placeable object?
A unique identifier which is used to uniquely identify related objects like a template effect or grid highlight.
An indicator for whether the object is currently a hover target
The id of the corresponding Document which this PlaceableObject represents.
The mouse interaction state of this placeable.
A convenient reference for whether the current User is the author of the MeasuredTemplate document.
A convenient reference for whether the current User has full control over the document.
Is this placeable object a temporary preview?
Is this MeasuredTemplate currently visible on the Canvas?
Provide a reference to the CanvasLayer which contains this PlaceableObject.
A unique identifier which is used to uniquely identify elements on the canvas related to this object.
A document sheet used to configure the properties of this Placeable Object or the Document it represents.
The named identified for the source object associated with this PlaceableObject. This differs from the objectId because the sourceId is the same for preview objects as for the original.
Static
implementationReturn a reference to the configured subclass of this base PlaceableObject type.
Does the User have permission to configure the Placeable Object?
The User performing the action. Always equal to game.user
.
The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Can the User access the HUD for this Placeable Object?
The User performing the action. Always equal to game.user
.
The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Internal
Obtain a shifted position for the Placeable Object.
The number of grid units to shift along the X-axis
The number of grid units to shift along the Y-axis
The number of grid units to shift along the Z-axis
The shifted target coordinates
Callback actions which occur on a single right-click event to configure properties of the object
The triggering canvas interaction event
Define additional steps taken when an existing placeable object of this type is updated with new data
Internal
Execute a partial draw.
The draw function
The drawn object
Internal
Get the data of the copied object pasted at the position given by the offset. Called by foundry.canvas.layers.PlaceablesLayer#pasteObjects for each copied object.
The offset relative from the current position to the destination
Optional
options: { hidden?: boolean; snap?: boolean } = {}Optional
hidden?: booleanPaste in a hidden state, if applicable. Default is false.
Optional
snap?: booleanSnap to the grid. Default is true.
The update data
Internal
Update the quadtree.
Internal
Determine a new angle of rotation for a PlaceableObject either from an explicit angle or from a delta offset.
An object which defines the rotation update parameters
Optional
angle?: numberAn explicit angle, either this or delta must be provided
Optional
delta?: numberA relative angle delta, either this or the angle must be provided
Optional
snap?: numberA precision (in degrees) to which the resulting angle should snap. Default is 0.
The new rotation angle for the object
Activate interactivity for the Placeable Object
Clear the display of the existing object.
The cleared object
Clone the placeable object, returning a new object with identical attributes. The returned object is non-interactive, and has no assigned ID. If you plan to use it permanently you should call the create method.
A new object with identical data
Assume control over a PlaceableObject, flagging it as controlled and enabling downstream behaviors
Optional
options: { releaseOthers?: boolean } = {}Additional options which modify the control request
Optional
releaseOthers?: booleanRelease any other controlled objects first
A flag denoting whether control was successful
Draw the placeable object into its parent container
Optional
options: object = {}Options which may modify the draw and refresh workflow
The drawn object
Get the snapped position for a given position or the current position.
Optional
position: anyThe position to be used instead of the current position
The snapped position
Highlight the grid squares which should be shown under the area of effect
Refresh all incremental render flags for the PlaceableObject. This method is no longer used by the core software but provided for backwards compatibility.
Optional
options: object = {}Options which may modify the refresh workflow
The refreshed object
Release control over a PlaceableObject, removing it from the controlled set
Options which modify the releasing workflow
A Boolean flag confirming the object was released.
Is the given point contained in the template's shape?
The point
Is contained?
Protected
_canProtected
Does the User have permission to create the underlying Document?
The User performing the action. Always equal to game.user
.
Optional
event: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected
_canProtected
Does the User have permission to delete the underlying Document?
The User performing the action. Always equal to game.user
.
Optional
event: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected
_canProtected
Does the User have permission to drag this Placeable Object?
The User performing the action. Always equal to game.user
.
Optional
event: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected
_canProtected
_canProtected
Does the User have permission to hover on this Placeable Object?
The User performing the action. Always equal to game.user
.
Optional
event: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected
_canProtected
Does the User have permission to update the underlying Document?
The User performing the action. Always equal to game.user
.
Optional
event: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected
_computeProtected
Compute the geometry for the template using its document data. Subclasses can override this method to take control over how different shapes are rendered.
Protected
_createProtected
Create a standard MouseInteractionManager for the PlaceableObject
Protected
_finalizeProtected
Finalize the left-drag operation.
The triggering mouse click event
Protected
_finalizeProtected
Finalize the right-drag operation.
The triggering mouse click event
Protected
_getProtected
Get an array of points which define top-left grid spaces to highlight for square or hexagonal grids.
Protected
_getProtected
Get the shape to highlight on a Scene which uses grid-less mode.
Protected
_initializeProtected
Initialize the left-drag operation.
The triggering canvas interaction event
Protected
_initializeProtected
Initialize the right-drag operation.
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a single left-click event to assume control of the object
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a double left-click event to activate
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a double right-click event to configure properties of the object
The triggering canvas interaction event
Protected
_onProtected
Additional events that trigger once control of the object is established
Optional parameters which apply for specific implementations
Protected
_onProtected
Register pending canvas operations which should occur after a new PlaceableObject of this type is created
Protected
_onProtected
Define additional steps taken when an existing placeable object of this type is deleted
Protected
_onProtected
Conclude a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected
_onProtected
Callback actions which occur on a mouse-move operation.
The triggering mouse click event
If false, the cancellation is prevented
Protected
_onProtected
Callback actions which occur on a mouse-move operation.
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a mouse-move operation.
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur when a mouse-drag action is first begun.
The triggering canvas interaction event
If false, the start if prevented
Protected
_onProtected
Callback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the cancellation is prevented
Protected
_onProtected
Callback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Protected
_onProtected
Begin a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected
_onProtected
Actions that should be taken for this Placeable Object when a mouseover event occurs. Hover events on PlaceableObject instances allow event propagation by default.
The triggering canvas interaction event
Options which customize event handling
Optional
hoverOutOthers?: booleanTrigger hover-out behavior on sibling objects
Protected
_onProtected
Actions that should be taken for this Placeable Object when a mouseout event occurs
The triggering canvas interaction event
Protected
_onProtected
Callback action which occurs on a long press.
The triggering canvas interaction event
The local canvas coordinates of the mousepress.
Protected
_onProtected
Additional events which trigger once control of the object is released
Options which modify the releasing workflow
Protected
_onProtected
Callback actions which occur on a single left-unclick event to assume control of the object
The triggering canvas interaction event
Protected
_onProtected
Callback actions which occur on a single right-unclick event
The triggering canvas interaction event
Protected
_overlapsProtected
Is this PlaceableObject within the selection rectangle?
The selection rectangle
Protected
_prepareProtected
Perform the database updates that should occur as the result of a drag-left-drop operation.
The triggering canvas interaction event
An array of database updates to perform for documents in this collection
Protected
_propagateProtected
Should the placeable propagate left click downstream?
Protected
_propagateProtected
Should the placeable propagate right click downstream?
Protected
_refreshProtected
Refresh the elevation of the control icon.
Protected
_refreshProtected
Refresh the position of the MeasuredTemplate
Protected
_refreshProtected
Update the displayed ruler tooltip text
Protected
_refreshProtected
Refresh the underlying geometric shape of the MeasuredTemplate.
Protected
_refreshProtected
Refresh the displayed state of the MeasuredTemplate. This refresh occurs when the user interaction state changes.
Protected
_refreshProtected
Refresh the display of the template outline and shape. Subclasses may override this method to take control over how the template is visually rendered.
Protected
#onProtected
Callback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Static
_getInternal
Get the origin used for pasting the copied objects.
The objects that are copied
The offset
Static
_getInternal
Obtain the shifted position.
The number of grid units to shift along the X-axis
The number of grid units to shift along the Y-axis
The number of grid units to shift along the Z-axis
The unsnapped position
The snapped position
The grid
The shifted target coordinates
Static
getGet a Circular area of effect given a radius of effect
The radius of the circle in grid units
Static
getGet a Conical area of effect given a direction, angle, and distance
The radius of the cone in grid units
The direction of the cone in degrees
The angle of the cone in degrees
Static
getGet a rotated Rectangular area of effect given a width, height, and direction
The length of the ray in grid units
The direction of the ray in degrees
The width of the ray in grid units
Static
getGet a Rectangular area of effect given a width and height
The length of the diagonal in grid units
The direction of the diagonal in degrees
A type of Placeable Object which highlights an area of the grid as covered by some area of effect.
See