A control icon for interacting with the object
The icon that indicates the direction of the Wall.
A reference to the Scene embedded Document instance which this object represents
A reference the Door Control icon associated with this Wall, if any
The endpoints of the Wall line segment.
A Graphics object used to highlight this wall segment. Only used when the wall is controlled.
The line segment that represents the Wall.
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
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
A convenience reference to the coordinates Array for the Wall endpoints, [x0,y0,x1,y1].
Get the direction of effect for a directional Wall
A set of optional DoorMesh instances used to render a door animation for this Wall.
The Edge instance which represents this Wall. The Edge is re-created when data for the Wall changes.
Is the HUD display active for this Placeable?
Should this Wall have a corresponding DoorMesh?
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 boolean for whether this wall contains a door
A boolean for whether the wall contains an open door
A convenient reference for whether the current User has full control over the document.
Is this placeable object a temporary preview?
Provide a reference to the CanvasLayer which contains this PlaceableObject.
Return the coordinates [x,y] at the midpoint of the wall segment
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.
Customize the audible radius of sounds emitted by this wall, for example when a door opens or closes.
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 control 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.
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 left-click event to assume control of the object
The triggering canvas interaction event
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
Callback actions which occur when a mouse-drag action is first begun.
The triggering canvas interaction event
If false, the start if prevented
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
Actions that should be taken for this Placeable Object when a mouseout event occurs
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
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
A simple test for whether a Ray can intersect a directional wall
The ray to test
Can an intersection occur?
Clear the door control if it exists.
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
Additional options which modify the control request
A flag denoting whether control was successful
Draw a control icon that is used to manipulate the door's open/closed state
Create and add a DoorMesh to the PrimaryCanvasContainer.
Remove and destroy a DoorMesh from the PrimaryCanvasContainer.
Draw the placeable object into its parent container
Optional
options: object = {}Options which may modify the draw and refresh workflow
The drawn object
Get an Array of Wall objects which are linked by a common coordinate
An object reporting ids and endpoints of the linked segments
Initialize the edge which represents this Wall.
Optional
options: { deleted?: boolean } = {}Options which modify how the edge is initialized
Optional
deleted?: booleanHas the edge been deleted?
Test whether the Wall direction lies between two provided angles This test is used for collision and vision checks against one-directional walls
The lower-bound limiting angle in radians
The upper-bound limiting angle in radians
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 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
_canHUDProtected
Can the User access the HUD for 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
_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
_getProtected
Given the properties of the wall - decide upon a color to render the wall for display on the WallsLayer
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 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
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 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
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
_playProtected
Play a door interaction sound. This plays locally, each client independently applies this workflow.
The door interaction: "open", "close", "lock", "unlock", or "test".
Protected
_propagateProtected
Should the placeable propagate left click downstream?
Protected
_propagateProtected
Should the placeable propagate right click downstream?
Protected
_refreshProtected
Draw a directional prompt icon for one-way walls to illustrate their direction of effect.
Protected
_refreshProtected
Refresh the display of wall endpoints which refreshes when the wall position or state changes.
Protected
_refreshProtected
Refresh the appearance of the wall control highlight graphic. Occurs when wall control or position changes.
Protected
_refreshProtected
Refresh the displayed position of the wall which refreshes when the wall coordinates or type changes.
Protected
_refreshProtected
Refresh the displayed state of the Wall.
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 Wall is an implementation of PlaceableObject which represents a physical or visual barrier within the Scene. Walls are used to restrict Token movement or visibility as well as to define the areas of effect for ambient lights and sounds.
See