Internal_The preview type, if any.
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
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.
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.
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?
Is this placeable currently visible?
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.
The preview type, if any.
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.
StaticimplementationReturn a reference to the configured subclass of this base PlaceableObject type.
Apply render flags before a render occurs.
The render flags which must be applied
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.
Clear the display of the existing object on redraw. This function is called in PlaceableObject#draw before the PlaceableObject#_draw 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
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 or DOM interaction event
Options which customize event handling
Actions that should be taken for this Placeable Object when a mouseout event occurs
The triggering canvas or DOM interaction event
Options which customize event handling
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
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
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
Optionaloptions: 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
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.
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
OptionalrenderSidebar?: booleanRe-render the sidebar.
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_ProtectedDoes 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_ProtectedDoes 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_ProtectedDoes 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_ProtectedDoes 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_Protected_ProtectedDoes the User have permission to hover on this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: Event | FederatedEvent<UIEvent | PixiTouch>The DOM interaction event or pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedCan 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_ProtectedDoes 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_ProtectedDoes 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_ProtectedCreate a standard MouseInteractionManager for the PlaceableObject
Protected_ProtectedFinalize the left-drag operation.
The triggering mouse click event
Protected_ProtectedFinalize the right-drag operation.
The triggering mouse click event
Protected_ProtectedGet the target opacity that should be used for a Placeable Object depending on its preview state.
Protected_ProtectedGiven the properties of the wall - decide upon a color to render the wall for display on the WallsLayer
Protected_ProtectedInitialize the left-drag operation.
The triggering canvas interaction event
Protected_ProtectedInitialize the right-drag operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a single right-click event to configure properties of the object
The triggering canvas interaction event
Protected_ProtectedAdditional events that trigger once control of the object is established
Optional parameters which apply for specific implementations
Protected_ProtectedRegister pending canvas operations which should occur after a new PlaceableObject of this type is created
Protected_ProtectedConclude a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected_ProtectedCallback actions which occur on a mouse-move operation.
The triggering mouse click event
If false, the cancellation is prevented
Protected_ProtectedCallback actions which occur on a mouse-move operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the cancellation is prevented
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Protected_ProtectedBegin a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected_ProtectedCallback action which occurs on a long press.
The triggering canvas interaction event
The local canvas coordinates of the mousepress.
Protected_ProtectedAdditional events which trigger once control of the object is released
Options which modify the releasing workflow
Protected_ProtectedCallback actions which occur on a single left-unclick event to assume control of the object
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a single right-unclick event
The triggering canvas interaction event
Protected_ProtectedPlay a door interaction sound. This plays locally, each client independently applies this workflow.
The door interaction: "open", "close", "lock", "unlock", or "test".
Protected_ProtectedShould the placeable propagate left click downstream?
Protected_ProtectedShould the placeable propagate right click downstream?
Protected_ProtectedDraw a directional prompt icon for one-way walls to illustrate their direction of effect.
Protected_ProtectedRefresh the display of wall endpoints which refreshes when the wall position or state changes.
Protected_ProtectedRefresh the appearance of the wall control highlight graphic. Occurs when wall control or position changes.
Protected_ProtectedRefresh the displayed position of the wall which refreshes when the wall coordinates or type changes.
Protected_ProtectedRefresh the displayed state of the placeable. Used to update aspects of the placeable which change based on the user interaction state.
Protected_ProtectedRefresh the visibility of the placeable.
Protected#onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Static_InternalGet the origin used for pasting the copied objects.
The objects that are copied
The offset
Static_InternalObtain 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