The Document instance represented by this object
A Tile background which is displayed if no valid image texture is present
A control icon for interacting with the object
A reference to the Scene embedded Document instance which this object represents
The Tile border frame
A reference to the SpriteMesh which displays this Tile in the PrimaryCanvasGroup.
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
The primary tile image texture
StaticembeddedIdentify the official Document name for this PlaceableObject class
StaticRENDER_The ticker priority when RenderFlags of this class are handled. Valid values are OBJECTS or PERCEPTION.
StaticRENDER_The object that this object is a preview of if this object is a preview.
Get the native aspect ratio of the base texture for the Tile sprite
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?
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?
Does this Tile depict an animated video texture?
Is this Tile 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.
Is this tile occluded?
Is the tile video playing?
A document sheet used to configure the properties of this Placeable Object or the Document it represents.
The HTML source element for the primary Tile texture
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.
The effective volume at which this Tile should be playing, including the global ambient volume modifier
StaticimplementationReturn a reference to the configured subclass of this base PlaceableObject type.
The inner _destroy method which may optionally be defined by each PlaceableObject subclass.
Options passed to the initial destroy call
InternalObtain 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 left-click event to assume control of the object
The triggering canvas interaction event
Callback actions which occur on a mouse-move operation.
The triggering mouse click event
If false, the cancellation is prevented
Callback actions which occur on a mouse-move operation.
The triggering canvas interaction event
Callback actions which occur on a mouse-move operation.
The triggering canvas interaction event
Callback actions which occur when a mouse-drag action is first begun.
The triggering canvas interaction event
If false, the start if prevented
Define additional steps taken when an existing placeable object of this type is updated with new data
InternalExecute a partial draw.
The draw function
The drawn object
InternalGet 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
Optionaloptions: { hidden?: boolean; snap?: boolean } = {}Optionalhidden?: booleanPaste in a hidden state, if applicable. Default is false.
Optionalsnap?: booleanSnap to the grid. Default is true.
The update data
InternalUpdate the quadtree.
InternalDetermine 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
Optionalangle?: numberAn explicit angle, either this or delta must be provided
Optionaldelta?: numberA relative angle delta, either this or the angle must be provided
Optionalsnap?: 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
Optionaloptions: { releaseOthers?: boolean } = {}Additional options which modify the control request
OptionalreleaseOthers?: booleanRelease any other controlled objects first
A flag denoting whether control was successful
Draw the placeable object into its parent container
Optionaloptions: 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.
Optionalposition: anyThe position to be used instead of the current position
The snapped position
Refresh all incremental render flags for the PlaceableObject. This method is no longer used by the core software but provided for backwards compatibility.
Optionaloptions: 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_canProtectedDoes the User have permission to configure the Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtectedDoes the User have permission to control the Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtectedDoes the User have permission to create the underlying Document?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtectedDoes the User have permission to delete the underlying Document?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtectedDoes the User have permission to drag this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtected_canProtectedDoes the User have permission to hover on this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canHUDProtectedCan the User access the HUD for this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtectedDoes the User have permission to update the underlying Document?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_canProtectedDoes the User have permission to view details of the Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_createProtectedCreate a standard MouseInteractionManager for the PlaceableObject
Protected_finalizeProtectedFinalize the left-drag operation.
The triggering mouse click event
Protected_finalizeProtectedFinalize the right-drag operation.
The triggering mouse click event
Protected_getProtectedGet the target opacity that should be used for a Placeable Object depending on its preview state.
Protected_initializeProtectedInitialize the left-drag operation.
The triggering canvas interaction event
Protected_initializeProtectedInitialize the right-drag operation.
The triggering canvas interaction event
Protected_onProtectedCallback actions which occur on a double left-click event to activate
The triggering canvas interaction event
Protected_onProtectedCallback actions which occur on a single right-click event to configure properties of the object
The triggering canvas interaction event
Protected_onProtectedCallback actions which occur on a double right-click event to configure properties of the object
The triggering canvas interaction event
Protected_onProtectedAdditional events that trigger once control of the object is established
Optional parameters which apply for specific implementations
Protected_onProtectedRegister pending canvas operations which should occur after a new PlaceableObject of this type is created
Protected_onProtectedDefine additional steps taken when an existing placeable object of this type is deleted
Protected_onProtectedConclude a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected_onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the cancellation is prevented
Protected_onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected_onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected_onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Protected_onProtectedBegin a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected_onProtectedHandle cancellation of a drag event for one of the resizing handles
The mouseup event
Protected_onProtectedHandle mouseup after dragging a tile scale handler
The mouseup event
Protected_onProtectedHandle mousemove while dragging a tile scale handler
The mousemove event
Protected_onProtectedHandle the beginning of a drag event on a resize handle.
The mousedown event
Protected_onProtectedHandle mouse-over event on a control handle
The mouseover event
Protected_onProtectedHandle mouse-out event on a control handle
The mouseout event
Protected_onProtectedActions 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
OptionalhoverOutOthers?: booleanTrigger hover-out behavior on sibling objects
Protected_onProtectedActions that should be taken for this Placeable Object when a mouseout event occurs
The triggering canvas interaction event
Protected_onProtectedCallback action which occurs on a long press.
The triggering canvas interaction event
The local canvas coordinates of the mousepress.
Protected_onProtectedAdditional events which trigger once control of the object is released
Options which modify the releasing workflow
Protected_onProtectedCallback actions which occur on a single left-unclick event to assume control of the object
The triggering canvas interaction event
Protected_onProtectedCallback actions which occur on a single right-unclick event
The triggering canvas interaction event
Protected_prepareProtectedPerform 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_propagateProtectedShould the placeable propagate left click downstream?
Protected_propagateProtectedShould the placeable propagate right click downstream?
Protected_refreshProtectedRefresh the elevation.
Protected_refreshProtectedRefresh the border frame that encloses the Tile.
Protected_refreshProtectedRefresh the appearance of the tile.
Protected_refreshProtectedRefresh the position.
Protected_refreshProtectedRefresh the rotation.
Protected_refreshProtectedRefresh the size.
Protected_refreshProtectedRefresh the displayed state of the Tile. Updated when the tile interaction state changes, when it is hidden, or when its elevation changes.
Protected_refreshProtectedRefresh changes to the video playback state.
Protected#onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Static_getInternalGet the origin used for pasting the copied objects.
The objects that are copied
The offset
Static_getInternalObtain 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
StaticcreateCreate a preview tile with a background texture instead of an image
Initial data with which to create the preview Tile
A Tile is an implementation of PlaceableObject which represents a static piece of artwork or prop within the Scene.
See