Constructor
new AmbientLight()
Extends
Members
_controlled :boolean
- Overrides:
An indicator for whether the object is currently controlled
Type:
- boolean
_hover :boolean
- Overrides:
An indicator for whether the object is currently a hover target
Type:
- boolean
bounds
- Overrides:
The bounding box for this PlaceableObject. This is required if the layer uses a Quadtree, otherwise it is optional
brightRadius :number
Get the pixel radius of bright light emitted by this light source
Type:
- number
center :PIXI.Point
- Overrides:
The central coordinate pair of the placeable object based on it's own width and height
Type:
- PIXI.Point
controlIcon :ControlIcon
- Overrides:
A reference to the ControlIcon used to configure this light
Type:
data :abstract.DocumentData
- Overrides:
The underlying data object which provides the basis for this placeable object
Type:
dimRadius :number
Get the pixel radius of dim light emitted by this light source
Type:
- number
document :abstract.Document
- Overrides:
A reference to the Scene embedded Document instance which this object represents
Type:
embeddedName :string
- Overrides:
Identify the official EmbeddedEntity name for this PlaceableObject class
Type:
- string
fov :PIXI.Polygon
- Overrides:
The field-of-vision polygon for the object, if it has been computed
Type:
- PIXI.Polygon
global :boolean
Test whether a specific AmbientLight source provides global illumination
Type:
- boolean
id :string
- Overrides:
The id of the corresponding Document which this PlaceableObject represents.
Type:
- string
isVisible :boolean
Is this ambient light is currently visible based on its hidden state and the darkness level of the Scene?
Type:
- boolean
layer :PIXI.Container
- Overrides:
Provide a reference to the CanvasLayer which contains this PlaceableObject.
Type:
- PIXI.Container
los :PIXI.Polygon|null
- Overrides:
The line-of-sight polygon for the object, if it has been computed
Type:
- PIXI.Polygon | null
mouseInteractionManager :MouseInteractionManager
- Overrides:
A mouse interaction manager instance which handles mouse workflows related to this object.
Type:
radius :number
The maximum radius in pixels of the light field
Type:
- number
scene :Scene
- Overrides:
Retain a reference to the Scene within which this Placeable Object resides
Type:
sheet :FormApplication
- Overrides:
A Form Application which is used to configure the properties of this Placeable Object or the EmbeddedEntity it represents.
Type:
source :PointSource
A reference to the PointSource object which defines this light source area of effect
Type:
sourceId
The named identified for the source object associated with this light
vision :Object
- Overrides:
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
Type:
- Object
Methods
(protected) _canConfigure()
- Overrides:
Does the User have permission to configure the Placeable Object?
(protected) _canControl()
- Overrides:
Does the User have permission to control the Placeable Object?
(protected) _canCreate()
- Overrides:
Does the User have permission to create the underlying Embedded Entity?
(protected) _canDelete()
- Overrides:
Does the User have permission to delete the underlying Embedded Entity?
(protected) _canDrag()
- Overrides:
Does the User have permission to drag this Placeable Object?
(protected) _canHover()
- Overrides:
Does the User have permission to hover on this Placeable Object?
(protected) _canHUD()
- Overrides:
Can the User access the HUD for this Placeable Object?
(protected) _canUpdate()
- Overrides:
Does the User have permission to update the underlying Embedded Entity?
(protected) _canView()
- Overrides:
Does the User have permission to view details of the Placeable Object?
(protected) _createInteractionManager()
- Overrides:
Create a standard MouseInteractionManager for the PlaceableObject
_getShiftedPosition(dx, dy) → {Object}
- Overrides:
Obtain a shifted position for the Placeable Object
Parameters:
Name | Type | Description |
---|---|---|
dx |
number | The number of grid units to shift along the X-axis |
dy |
number | The number of grid units to shift along the Y-axis |
Returns:
The shifted target coordinates
- Type
- Object
_onClickLeft(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleClickLeft
Callback actions which occur on a single left-click event to assume control of the object
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
_onClickLeft2(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleClickLeft2
Callback actions which occur on a double left-click event to activate
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
_onClickRight(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleClickRight
Callback actions which occur on a single right-click event to configure properties of the object
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
_onClickRight2(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleClickRight2
Callback actions which occur on a double right-click event to configure properties of the object
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
(protected) _onControl(options)
- Overrides:
Additional events which trigger once control of the object is established
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Optional parameters which apply for specific implementations |
(protected) _onCreate()
- Overrides:
Register pending canvas operations which should occur after a new PlaceableObject of this type is created
(protected) _onDelete()
- Overrides:
Define additional steps taken when an existing placeable object of this type is deleted
_onDragLeftCancel(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleDragCancel
Callback actions which occur on a mouse-move operation.
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | The triggering mouse click event |
(async) _onDragLeftDrop(event) → {Promise.<*>}
- Overrides:
- See:
-
- MouseInteractionManager#_handleDragDrop
Callback actions which occur on a mouse-move operation.
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
Returns:
- Type
- Promise.<*>
_onDragLeftMove(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleDragMove
Callback actions which occur on a mouse-move operation.
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
_onDragLeftStart(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleDragStart
Callback actions which occur when a mouse-drag action is first begun.
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
_onHoverIn(event, options)
- Overrides:
- See:
-
- MouseInteractionManager#_handleMouseOver
Actions that should be taken for this Placeable Object when a mouseover event occurs
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
||||||||||
options |
object | Options which customize event handling Properties
|
_onHoverOut(event)
- Overrides:
- See:
-
- MouseInteractionManager#_handleMouseOut
Actions that should be taken for this Placeable Object when a mouseout event occurs
Parameters:
Name | Type | Description |
---|---|---|
event |
PIXI.InteractionEvent | The triggering canvas interaction event |
(protected) _onRelease(options)
- Overrides:
Additional events which trigger once control of the object is released
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Options which modify the releasing workflow |
(protected) _onUpdate()
- Overrides:
Define additional steps taken when an existing placeable object of this type is updated with new data
_updateRotation(options) → {number}
- Overrides:
Determine a new angle of rotation for a PlaceableObject either from an explicit angle or from a delta offset.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | An object which defines the rotation update parameters Properties
|
Returns:
The new rotation angle for the object
- Type
- number
activateListeners()
- Overrides:
Activate interactivity for the Placeable Object
can(user, action) → {boolean}
- Overrides:
Test whether a user can perform a certain interaction with regards to a Placeable Object
Parameters:
Name | Type | Description |
---|---|---|
user |
User | The User performing the action |
action |
string | The named action being attempted |
Returns:
Does the User have rights to perform the action?
- Type
- boolean
clear() → {PlaceableObject}
- Overrides:
Clear the display of the existing object
Returns:
The cleared object
- Type
- PlaceableObject
clone() → {PlaceableObject}
- Overrides:
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
Returns:
A new object with identical data
- Type
- PlaceableObject
control(options) → {boolean}
- Overrides:
Assume control over a PlaceableObject, flagging it as controlled and enabling downstream behaviors
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object | Additional options which modify the control request Properties
|
Returns:
A flag denoting whether or not control was successful
- Type
- boolean
destroy()
- Inherited From:
(async) draw() → {Promise.<PlaceableObject>}
- Overrides:
Draw the placeable object into its parent container
Returns:
The drawn object
- Type
- Promise.<PlaceableObject>
refresh() → {PlaceableObject}
- Overrides:
Refresh the current display state of the Placeable Object
Returns:
The refreshed object
- Type
- PlaceableObject
refreshControl()
Refresh the display of the ControlIcon for this AmbientLight source
release(options) → {boolean}
- Overrides:
Release control over a PlaceableObject, removing it from the controlled set
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Options which modify the releasing workflow |
Returns:
A Boolean flag confirming the object was released.
- Type
- boolean
(async) rotate(angle, snap) → {Promise.<PlaceableObject>}
- Overrides:
Rotate the PlaceableObject to a certain angle of facing
Parameters:
Name | Type | Description |
---|---|---|
angle |
number | The desired angle of rotation |
snap |
number | Snap the angle of rotation to a certain target degree increment |
Returns:
The rotated object
- Type
- Promise.<PlaceableObject>
updateSource(defer, deleted)
Update the source object associated with this light
Parameters:
Name | Type | Description |
---|---|---|
defer |
boolean | Defer refreshing the LightingLayer to manually call that refresh later. |
deleted |
boolean | Indicate that this light source has been deleted. |