The Tile border frame
The primary tile image texture
The Tile image sprite
A Tile background which is displayed if no valid image texture is present
A flag which tracks whether the overhead tile is currently in an occluded state
A flag which tracks occluded state change for roof
A flag which tracks if the Tile is currently playing
Debounce assignment of the Tile occluded state to avoid cases like animated token movement which can rapidly change Tile appearance. Uses a 100ms debounce threshold.
Retain a reference to the Scene within which this Placeable Object resides
A reference to the Scene embedded Document instance which this object represents
Track the field of vision for the placeable object. This is necessary to determine whether a player has line-of-sight towards a placeable object or vice-versa
A control icon for interacting with the object
A mouse interaction manager instance which handles mouse workflows related to this object.
Know if a placeable is in the hover-in state.
Passthrough certain drag operations on locked objects.
Contains :
A map of all linked sprite(s) to this tile
A flag to capture whether this Tile has an unlinked video texture
Identify the official Document name for this PlaceableObject class
Roof types
Get the native aspect ratio of the base texture for the Tile sprite
The HTML source element for the primary Tile texture
Does this Tile depict an animated video texture?
Is this tile a roof?
The effective volume at which this Tile should be playing, including the global ambient volume modifier
The mouse interaction state of this placeable.
The central coordinate pair of the placeable object based on it's own width and height
The id of the corresponding Document which this PlaceableObject represents.
A unique identifier which is used to uniquely identify elements on the canvas related to this object.
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.
Is this placeable object a temporary preview?
The field-of-vision polygon for the object, if it has been computed
Provide a reference to the CanvasLayer which contains this PlaceableObject.
The line-of-sight polygon for the object, if it has been computed
A Form Application which is used to configure the properties of this Placeable Object or the Document it represents.
An indicator for whether the object is currently controlled
An indicator for whether the object is currently a hover target
An indicator for whether the object is currently a hover target
The inner _destroy method which may optionally be defined by each PlaceableObject subclass.
Test whether a specific Token occludes this overhead tile. Occlusion is tested against 9 points, the center, the four corners-, and the four cardinal directions
The Token to test
Additional options that affect testing
Is the Token occluded by the Tile?
Test whether the Tile pixel data contains a specific point in canvas space
Value from which the pixel is taken into account, in the range [0, 1].
Get alpha value at specific canvas coordinate.
The alpha value (-1 if outside of the bounds) or null if no mesh or texture is present.
Activate interactivity for the Placeable Object
Does the User have permission to configure the Placeable Object?
The User performing the action.
The event object.
The returned status.
Actions that should be taken for this Placeable Object when a mouseout event occurs
The triggering canvas interaction event
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 double left-click event to activate
The triggering canvas interaction event
Callback actions which occur when a mouse-drag action is first begun.
The triggering canvas interaction event
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
Begin a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Conclude a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Callback actions which occur on a mouse-move operation.
The triggering mouse click event
Test whether a user can perform a certain interaction regarding a Placeable Object
The User performing the action
The named action being attempted
Does the User have rights to perform the action?
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
Draw the placeable object into its parent container
The drawn object
Refresh the current display state of the Placeable Object
The refreshed object
Assume control over a PlaceableObject, flagging it as controlled and enabling downstream behaviors
Additional options which modify the control request
Release any other controlled objects first
A flag denoting whether control was successful
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
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
The new rotation angle for the object
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 shifted target coordinates
Actions that should be taken for this Placeable Object when a mouseover event occurs
The triggering canvas interaction event
Options which customize event handling
Callback actions which occur on a single right-click event to configure properties of the object
The triggering canvas interaction event
Callback actions which occur on a double right-click event to configure properties of the object
The triggering canvas interaction event
Refresh the display of the Tile resizing handle.
The bounds.
Handle mouse-over event on a control handle
The mouseover event
Handle mouse-out event on a control handle
The mouseout event
When we start a drag event - create a preview copy of the Tile for re-positioning
The mousedown event
Handle the beginning of a drag event on a resize handle
The mousedown event
Handle mousemove while dragging a tile scale handler
The mousemove event
Handle mouseup after dragging a tile scale handler
The mouseup event
Handle cancellation of a drag event for one of the resizing handles
Can the User access the HUD for this Placeable Object?
The User performing the action.
The event object.
The returned status.
Does the User have permission to control the Placeable Object?
The User performing the action.
The event object.
The returned status.
Does the User have permission to view details of the Placeable Object?
The User performing the action.
The event object.
The returned status.
Does the User have permission to create the underlying Document?
The User performing the action.
The event object.
The returned status.
Does the User have permission to drag this Placeable Object?
The User performing the action.
The event object.
The returned status.
Does the User have permission to hover on this Placeable Object?
The User performing the action.
The event object.
The returned status.
Does the User have permission to update the underlying Document?
The User performing the action.
The event object.
The returned status.
Does the User have permission to delete the underlying Document?
The User performing the action.
The event object.
The returned status.
Register pending canvas operations which should occur after a new PlaceableObject of this type is created
Define additional steps taken when an existing placeable object of this type is deleted
Additional events which trigger once control of the object is established
Optional parameters which apply for specific implementations
Additional events which trigger once control of the object is released
Options which modify the releasing workflow
Create a standard MouseInteractionManager for the PlaceableObject
Callback action which occurs on a long press.
The triggering canvas interaction event
The local canvas coordinates of the mousepress.
Refresh the appearance of the occlusion state for tiles which are affected by a Token beneath them.
Refresh the display of the Tile border
The bounds.
Get tile alpha map texture coordinate with canvas coordinate
Canvas x coordinate.
Canvas y coordinate.
The texture {x, y} coordinates, or null if not able to do the conversion.
Get alpha value at specific texture coordinate.
The alpha value (or -1 if outside of the bounds).
Process the tile texture : Use the texture to create a cached mapping of pixel alpha for this Tile with real base texture size. Cache the bounding box of non-transparent pixels for the un-rotated shape.
Compute the alpha-based bounding box for the tile, including an angle of rotation.
Update wall states and refresh lighting and vision when a tile becomes a roof, or when an existing roof tile's state changes.
Get resized Tile dimensions
Create 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. Tiles are drawn inside the TilesLayer container.
TileDocument
TilesLayer