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".
Retain a reference to the Scene within which this Placeable Object resides
Static
embeddedStatic
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.
An indicator for whether the object is currently controlled
The geometry of this Region.
The value of this property must not be mutated.
This property is updated only by a document update.
Is the HUD display active for this Placeable?
Does there exist a temporary preview of this placeable object?
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 has full control over the document.
Is this placeable object a temporary preview?
Is this Region 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.
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
Additional events that trigger once control of the object is established
Optional parameters which apply for specific implementations
Actions that should be taken for this Placeable Object when a mouseout event occurs
The triggering canvas interaction event
Additional events which trigger once control of the object is released
Options which modify the releasing workflow
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
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
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.
Rotate the PlaceableObject to a certain angle of facing
The desired angle of rotation
Snap the angle of rotation to a certain target degree increment
The rotated object
Protected
_canProtected
Does the User have permission to configure the 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 control the 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 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
_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
_canProtected
Does the User have permission to view details of the 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
_createProtected
Create a standard MouseInteractionManager for the PlaceableObject
Protected
_destroyProtected
The inner _destroy method which may optionally be defined by each PlaceableObject subclass.
Optional
options: objectOptions passed to the initial destroy call
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 the target opacity that should be used for a Placeable Object depending on its preview state.
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 single right-click event to configure properties of the object
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
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 Region when a mouseover event occurs.
The triggering canvas interaction event
Options that customize event handling
Optional
updateLegend?: booleanHighlight corresponding entry in the RegionLegend.
Protected
_onProtected
Callback action which occurs on a long press.
The triggering canvas interaction event
The local canvas coordinates of the mousepress.
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
_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 border of the Region.
Protected
_refreshProtected
Refresh the state of the Region.
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
A Region is an implementation of PlaceableObject which represents a Region document within a viewed Scene on the game canvas.
See