@league-of-foundry-developers/foundry-vtt-types 9.255.1 → 9.268.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/package.json +3 -2
- package/src/foundry/common/data/data.mjs/index.d.ts +0 -1
- package/src/foundry/common/types.mjs.d.ts +4 -4
- package/src/foundry/common/utils/helpers.mjs.d.ts +1 -0
- package/src/foundry/foundry.js/application.d.ts +0 -1
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +7 -3
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +3 -3
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/compendium.d.ts +20 -11
- package/src/foundry/foundry.js/applications/controlsReference.d.ts +17 -2
- package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
- package/src/foundry/foundry.js/applications/filePicker.d.ts +67 -75
- package/src/foundry/foundry.js/applications/formApplication.d.ts +7 -2
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +19 -58
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -4
- package/src/foundry/foundry.js/applications/formApplications/{entitySheetConfig.d.ts → documentSheetConfig.d.ts} +36 -19
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +2 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardConfig.d.ts +51 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfig.d.ts +88 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsHand.d.ts +20 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsPile.d.ts +20 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/index.d.ts +2 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +2 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +17 -11
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +3 -9
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +10 -12
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +4 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +2 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +8 -12
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +2 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +10 -11
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +28 -15
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +17 -21
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +40 -7
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +10 -24
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +15 -3
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +23 -16
- package/src/foundry/foundry.js/applications/formApplications/{defaultTokenConfig.d.ts → tokenConfigs/defaultTokenConfig.d.ts} +29 -16
- package/src/foundry/foundry.js/applications/formApplications/tokenConfigs/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +22 -15
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
- package/src/foundry/foundry.js/applications/hotbar.d.ts +7 -3
- package/src/foundry/foundry.js/applications/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/invitationLinks.d.ts +25 -10
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
- package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +65 -38
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +17 -3
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +19 -16
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +0 -3
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +4 -18
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +2 -8
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +38 -5
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -1
- package/src/foundry/foundry.js/applications/supportDetails.d.ts +78 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +10 -2
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +87 -49
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +3 -7
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +6 -0
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +2 -2
- package/src/foundry/foundry.js/config.d.ts +21 -21
- package/src/foundry/foundry.js/contextMenu.d.ts +37 -28
- package/src/foundry/foundry.js/game.d.ts +2 -2
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
- package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/controlsLayer.d.ts +49 -48
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +51 -40
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/lightingLayer.d.ts +63 -20
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayer.d.ts +0 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +4 -4
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +21 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/notesLayer.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/soundsLayer.d.ts +10 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/tokenLayer.d.ts +41 -20
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +50 -121
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/sightLayer.d.ts +125 -107
- package/src/foundry/foundry.js/pixi/containers/controlIcon.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/objectHUD.d.ts +82 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +26 -4
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +34 -20
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +52 -15
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +9 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +50 -12
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +248 -87
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +107 -16
- package/src/foundry/foundry.js/pixi/filters/abstractFilter.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/fogColorFilter.d.ts +16 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/forceColorFilter.d.ts +17 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/glowFilter.d.ts +31 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/index.d.ts +4 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/roofMaskFilter.d.ts +20 -0
- package/src/foundry/foundry.js/pixi/filters/index.d.ts +2 -0
- package/src/foundry/foundry.js/roll.d.ts +2 -2
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +5 -0
- package/src/foundry/foundry.js/textEditor.d.ts +266 -231
- package/src/types/augments/index.d.ts +2 -0
- package/src/types/augments/pixiGraphicsSmooth.d.ts +7 -0
- package/src/types/augments/pixiLegacyGraphics.d.ts +7 -0
- package/src/types/utils.d.ts +5 -0
@@ -4,18 +4,17 @@
|
|
4
4
|
* @see PointSource
|
5
5
|
*
|
6
6
|
* The container structure of this layer is as follows:
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
* msk: PIXI.Graphics The masking rectangle that limits exploration to the Scene background
|
7
|
+
*
|
8
|
+
* unexplored The unexplored background which spans the entire canvas
|
9
|
+
* explored The exploration container which tracks exploration progress
|
10
|
+
* revealed A container of regions which have previously been revealed
|
11
|
+
* saved The saved fog exploration texture
|
12
|
+
* pending Pending exploration which has not yet been committed to the texture
|
13
|
+
* vision The container of current vision exploration
|
14
|
+
* vision.base Baseline provided vision
|
15
|
+
* vision.fov Current light source field-of-view polygons
|
16
|
+
* vision.los Current vision source line-of-sight polygons
|
17
|
+
* vision.roofs Roof textures which should temporarily be revealed
|
19
18
|
*
|
20
19
|
* @example <caption>The sightRefresh hook</caption>
|
21
20
|
* ```typescript
|
@@ -26,6 +25,21 @@ import { ConfiguredDocumentClass } from '../../../../../types/helperTypes';
|
|
26
25
|
|
27
26
|
declare global {
|
28
27
|
class SightLayer extends CanvasLayer<SightLayer.LayerOptions> {
|
28
|
+
/** The unexplored background which spans the entire canvas */
|
29
|
+
unexplored?: PIXI.Graphics;
|
30
|
+
|
31
|
+
/** The exploration container which tracks exploration progress */
|
32
|
+
explored?: PIXI.Container;
|
33
|
+
|
34
|
+
/** A container of regions which have previously been revealed */
|
35
|
+
revealed?: PIXI.Container;
|
36
|
+
|
37
|
+
/** The saved fog exploration texture */
|
38
|
+
saved?: PIXI.Sprite;
|
39
|
+
|
40
|
+
/** Pending exploration which has not yet been committed to the texture */
|
41
|
+
pending?: PIXI.Container;
|
42
|
+
|
29
43
|
constructor();
|
30
44
|
|
31
45
|
/**
|
@@ -39,46 +53,78 @@ declare global {
|
|
39
53
|
*/
|
40
54
|
sources: foundry.utils.Collection<PointSource>;
|
41
55
|
|
42
|
-
/**
|
43
|
-
* The canonical line-of-sight polygon which defines current Token visibility.
|
44
|
-
*/
|
45
|
-
los: PIXI.Graphics;
|
46
|
-
|
47
56
|
/**
|
48
57
|
* A status flag for whether the layer initialization workflow has succeeded
|
49
58
|
* @defaultValue `false`
|
59
|
+
* @internal
|
50
60
|
*/
|
51
61
|
protected _initialized: boolean;
|
52
62
|
|
53
63
|
/**
|
54
|
-
* A
|
55
|
-
* @defaultValue `[]`
|
64
|
+
* A debounced function to save fog of war exploration once a stream of updates have stopped
|
56
65
|
*/
|
57
|
-
|
66
|
+
debounceSaveFog: (...args: Parameters<this['saveFog']>) => void;
|
58
67
|
|
59
68
|
/**
|
60
|
-
*
|
61
|
-
* @defaultValue `
|
69
|
+
* The current vision container which provides line-of-sight for vision sources and field-of-view of light sources.
|
70
|
+
* @defaultValue `undefined`
|
62
71
|
*/
|
63
|
-
|
72
|
+
vision:
|
73
|
+
| (PIXI.Container & {
|
74
|
+
/** Baseline provided vision */
|
75
|
+
base: PIXI.Graphics;
|
76
|
+
|
77
|
+
/** Current light source field-of-view polygons */
|
78
|
+
fov: PIXI.Container;
|
79
|
+
|
80
|
+
/** Current vision source line-of-sight polygons */
|
81
|
+
los: PIXI.Graphics;
|
82
|
+
|
83
|
+
/** Roof textures which should temporarily be revealed */
|
84
|
+
roofs: PIXI.Container;
|
85
|
+
})
|
86
|
+
| undefined;
|
64
87
|
|
65
88
|
/**
|
66
|
-
*
|
67
|
-
* @defaultValue `
|
89
|
+
* The canonical line-of-sight polygon which defines current Token visibility.
|
90
|
+
* @defaultValue `undefined`
|
68
91
|
*/
|
69
|
-
|
92
|
+
los: PIXI.Graphics | undefined;
|
70
93
|
|
71
94
|
/**
|
72
|
-
* A
|
95
|
+
* A cached container which creates a render texture used for the LOS mask.
|
96
|
+
* @defaultValue `undefined`
|
73
97
|
*/
|
74
|
-
|
98
|
+
losCache: CachedContainer | undefined;
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Track whether we have pending fog updates which have not yet been saved to the database
|
102
|
+
* @defaultValue `false`
|
103
|
+
* @internal
|
104
|
+
*/
|
105
|
+
protected _fogUpdated: boolean;
|
75
106
|
|
76
107
|
/**
|
77
108
|
* The configured resolution used for the saved fog-of-war texture
|
78
109
|
* @defaultValue `undefined`
|
110
|
+
* @internal
|
79
111
|
*/
|
80
112
|
protected _fogResolution: { resolution: number; width: number; height: number } | undefined;
|
81
113
|
|
114
|
+
/**
|
115
|
+
* A pool of RenderTexture objects which can be cycled through to save fog exploration progress.
|
116
|
+
* @defaultValue `[]`
|
117
|
+
* @internal
|
118
|
+
*/
|
119
|
+
protected _fogTextures: PIXI.RenderTexture[];
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Track whether there is a source of vision within the buffer region outside the primary scene canvas
|
123
|
+
* @defaultValue `false`
|
124
|
+
* @internal
|
125
|
+
*/
|
126
|
+
protected _inBuffer: boolean;
|
127
|
+
|
82
128
|
/**
|
83
129
|
* Define the threshold value for the number of distinct Wall endpoints.
|
84
130
|
* Below this threshold, exact vision computation is used by casting a Ray at every endpoint.
|
@@ -93,6 +139,12 @@ declare global {
|
|
93
139
|
*/
|
94
140
|
static FOG_COMMIT_THRESHOLD: number;
|
95
141
|
|
142
|
+
/**
|
143
|
+
* The maximum allowable fog of war texture size.
|
144
|
+
* @defaultValue `4096`
|
145
|
+
*/
|
146
|
+
static MAXIMUM_FOW_TEXTURE_SIZE: number;
|
147
|
+
|
96
148
|
/**
|
97
149
|
* @remarks This is not overridden in foundry but reflects the real behavior.
|
98
150
|
*/
|
@@ -123,18 +175,6 @@ declare global {
|
|
123
175
|
/** @override */
|
124
176
|
tearDown(): Promise<this>;
|
125
177
|
|
126
|
-
/**
|
127
|
-
* Initialize the Sight Layer. Initialization has the following hierarchical workflow:
|
128
|
-
*
|
129
|
-
* Initialize Layer (reset entire layer)
|
130
|
-
* InitializeLights (used to reset all lights)
|
131
|
-
* UpdateLight (update a single light)
|
132
|
-
* InitializeTokens (reset all tokens)
|
133
|
-
* UpdateToken (update a single token)
|
134
|
-
* Initialize Fog (reset FOW state)
|
135
|
-
*/
|
136
|
-
initialize(): Promise<void>;
|
137
|
-
|
138
178
|
/**
|
139
179
|
* Initialize fog of war - resetting it when switching scenes or re-drawing the canvas
|
140
180
|
*/
|
@@ -145,42 +185,45 @@ declare global {
|
|
145
185
|
*/
|
146
186
|
initializeSources(): Promise<void>;
|
147
187
|
|
148
|
-
/** @override */
|
149
|
-
draw(): Promise<this>;
|
150
|
-
|
151
188
|
/**
|
152
|
-
*
|
153
|
-
* These containers are placed into the _visionPool and recycled as needed.
|
189
|
+
* Update FoW unexplored and explored colors
|
154
190
|
*/
|
155
|
-
|
191
|
+
updateFogExplorationColors(): void;
|
192
|
+
|
193
|
+
/** @override */
|
194
|
+
draw(): Promise<this>;
|
156
195
|
|
157
196
|
/**
|
158
|
-
*
|
159
|
-
*
|
197
|
+
* Create the cached container and sprite used to provide a LOS mask
|
198
|
+
* @internal
|
160
199
|
*/
|
161
|
-
protected
|
200
|
+
protected _createCachedMask(): void;
|
162
201
|
|
163
202
|
/**
|
164
|
-
*
|
165
|
-
* @
|
203
|
+
* Construct a vision container that is used to render a single view position.
|
204
|
+
* @internal
|
166
205
|
*/
|
167
|
-
protected
|
206
|
+
protected _createVisionContainer(): PIXI.Container;
|
168
207
|
|
169
208
|
/**
|
170
209
|
* Update the display of the sight layer.
|
171
210
|
* Organize sources into rendering queues and draw lighting containers for each source
|
172
|
-
*
|
173
|
-
* @param forceUpdateFog - Always update the Fog exploration progress for this update
|
174
|
-
* (default: `false`)
|
175
|
-
* @param noUpdateFog - Never update the Fog exploration progress for this update
|
176
|
-
* (default: `false`)
|
177
211
|
*/
|
178
212
|
refresh({
|
179
213
|
forceUpdateFog,
|
180
|
-
|
214
|
+
skipUpdateFog
|
181
215
|
}?: {
|
216
|
+
/**
|
217
|
+
* Always update the Fog exploration progress for this update
|
218
|
+
* (default: `false`)
|
219
|
+
*/
|
182
220
|
forceUpdateFog?: boolean;
|
183
|
-
|
221
|
+
|
222
|
+
/**
|
223
|
+
* Never update the Fog exploration progress for this update
|
224
|
+
* (default: `false`)
|
225
|
+
*/
|
226
|
+
skipUpdateFog?: boolean;
|
184
227
|
}): void | ReturnType<this['restrictVisibility']>;
|
185
228
|
|
186
229
|
/**
|
@@ -192,21 +235,34 @@ declare global {
|
|
192
235
|
/**
|
193
236
|
* Test whether a point on the Canvas is visible based on the current vision and LOS polygons
|
194
237
|
*
|
195
|
-
* @param point
|
196
|
-
* @param tolerance - A numeric radial offset which allows for a non-exact match. For example, if
|
197
|
-
* tolerance is 2 then the test will pass if the point is within 2px of a vision
|
198
|
-
* polygon.
|
199
|
-
* (defaultValue: `2`)
|
200
|
-
* @param object - An optional reference to the object whose visibility is being tested
|
201
|
-
* (defaultValue: `null`)
|
202
|
-
*
|
238
|
+
* @param point - The point in space to test, an object with coordinates x and y.
|
203
239
|
* @returns Whether the point is currently visible.
|
204
240
|
*/
|
205
241
|
testVisibility(
|
206
242
|
point: Point,
|
207
|
-
{
|
243
|
+
{
|
244
|
+
tolerance,
|
245
|
+
object
|
246
|
+
}?: {
|
247
|
+
/**
|
248
|
+
* A numeric radial offset which allows for a non-exact match. For example, if
|
249
|
+
* tolerance is 2 then the test will pass if the point is within 2px of a vision
|
250
|
+
* polygon.
|
251
|
+
* (defaultValue: `2`)
|
252
|
+
*/
|
253
|
+
tolerance?: number;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* An optional reference to the object whose visibility is being tested
|
257
|
+
* (defaultValue: `null`)
|
258
|
+
*/
|
259
|
+
object?: PIXI.DisplayObject | null;
|
260
|
+
}
|
208
261
|
): boolean;
|
209
262
|
|
263
|
+
/** @internal */
|
264
|
+
protected _getFogTexture(): PIXI.RenderTexture;
|
265
|
+
|
210
266
|
/**
|
211
267
|
* Once a new Fog of War location is explored, composite the explored container with the current staging sprite
|
212
268
|
* Save that staging Sprite as the rendered fog exploration and swap it out for a fresh staging texture
|
@@ -242,6 +298,7 @@ declare global {
|
|
242
298
|
/**
|
243
299
|
* Choose an adaptive fog rendering resolution which downscales the saved fog textures for larger dimension Scenes.
|
244
300
|
* It is important that the width and height of the fog texture is evenly divisible by the downscaling resolution.
|
301
|
+
* @internal
|
245
302
|
*/
|
246
303
|
protected _configureFogResolution(): { resolution: number; width: number; height: number };
|
247
304
|
|
@@ -249,50 +306,11 @@ declare global {
|
|
249
306
|
* If fog of war data is reset from the server, re-draw the canvas
|
250
307
|
*/
|
251
308
|
protected _handleResetFog(): Promise<void>;
|
252
|
-
|
253
|
-
/**
|
254
|
-
* Visualize the sight layer to understand algorithm performance.
|
255
|
-
* @param bounds - The initial rectangular bounds of the vision check
|
256
|
-
* @param endpoints - The wall endpoints being tested
|
257
|
-
* @param rays - The array of cast vision Rays
|
258
|
-
* @param los - The resulting line-of-sight polygon
|
259
|
-
* @param fov - The resulting field-of-vision polygon
|
260
|
-
*/
|
261
|
-
protected static _visualizeSight(
|
262
|
-
bounds: Rectangle,
|
263
|
-
endpoints: PointArray[],
|
264
|
-
rays: Ray[],
|
265
|
-
los: PIXI.Polygon,
|
266
|
-
fov: PIXI.Polygon
|
267
|
-
): void;
|
268
|
-
|
269
|
-
/**
|
270
|
-
* @deprecated since 0.8.2
|
271
|
-
* @see WallsLayer#computePolygon
|
272
|
-
* Compute line-of-sight and field-of-vision polygons for a given origin position and visibility radius.
|
273
|
-
* The line-of-sight polygon defines the unrestricted area of visibility for the source.
|
274
|
-
* The field-of-vision polygon defines the restricted area of visibility for the source.
|
275
|
-
* @param angle - (default: `360`)
|
276
|
-
* @param density - (default: `6`)
|
277
|
-
* @param rotation - (default: `0`)
|
278
|
-
* @param unrestricted - (default: `false`)
|
279
|
-
*/
|
280
|
-
static computeSight(
|
281
|
-
origin: Point,
|
282
|
-
radius: number,
|
283
|
-
{
|
284
|
-
angle,
|
285
|
-
density,
|
286
|
-
rotation,
|
287
|
-
unrestricted
|
288
|
-
}?: { angle?: number; density?: number; rotation?: number; unrestricted?: boolean }
|
289
|
-
): { rays: Ray[]; los: PIXI.Polygon; fov: PIXI.Polygon };
|
290
309
|
}
|
291
310
|
|
292
311
|
namespace SightLayer {
|
293
312
|
interface LayerOptions extends CanvasLayer.LayerOptions {
|
294
313
|
name: 'sight';
|
295
|
-
zIndex: 400;
|
296
314
|
}
|
297
315
|
}
|
298
316
|
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/**
|
2
|
+
* An extension of PIXI.Container used as the interface frame for a PlaceableObject on the ControlsLayer
|
3
|
+
*
|
4
|
+
* @see {@link PlaceableObject}
|
5
|
+
* @see {@link ControlsLayer}
|
6
|
+
*/
|
7
|
+
declare class ObjectHUD extends PIXI.Container {
|
8
|
+
constructor(object: PIXI.DisplayObject);
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The object that this HUD container is linked to
|
12
|
+
*/
|
13
|
+
object: PIXI.DisplayObject;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Use the linked object's transform matrix to easily synchronize position
|
17
|
+
*/
|
18
|
+
transform: PIXI.Transform;
|
19
|
+
|
20
|
+
/** @override */
|
21
|
+
// @ts-expect-error this is a property in `PIXI.Container` but foundry overrides it as an accessor.
|
22
|
+
get visible(): boolean;
|
23
|
+
set visible(value: boolean);
|
24
|
+
|
25
|
+
/** @override */
|
26
|
+
// @ts-expect-error this is a property in `PIXI.Container` but foundry overrides it as an accessor.
|
27
|
+
get renderable(): boolean;
|
28
|
+
set renderable(value: boolean);
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Display scrolling status text originating from this ObjectHUD container.
|
32
|
+
* @param content - The text content to display
|
33
|
+
* @param options - (default: `{}`)
|
34
|
+
* @returns The created PreciseText object which is scrolling
|
35
|
+
*/
|
36
|
+
createScrollingText(
|
37
|
+
content: string,
|
38
|
+
options?: ObjectHUD.CreateScrollingTextOptions | undefined
|
39
|
+
): Promise<PreciseText | null>;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Orchestrate the animation of the scrolling text in this HUD
|
43
|
+
* @param text - The PrecisText instance to animate
|
44
|
+
* @param duration - A desired duration of animation
|
45
|
+
* @param dx - A horizontal distance to animate the text
|
46
|
+
* (default: `0`)
|
47
|
+
* @param dy - A vertical distance to animate the text
|
48
|
+
* (default: `0`)
|
49
|
+
* @internal
|
50
|
+
*/
|
51
|
+
protected _animateScrollText(text: PreciseText, duration: number, dx?: number, dy?: number): Promise<void>;
|
52
|
+
}
|
53
|
+
|
54
|
+
type TextStyleProperties = Exclude<ConstructorParameters<typeof PIXI.TextStyle>[0], undefined>;
|
55
|
+
|
56
|
+
declare namespace ObjectHUD {
|
57
|
+
interface CreateScrollingTextOptions extends TextStyleProperties {
|
58
|
+
/**
|
59
|
+
* The original anchor point where the text first appears
|
60
|
+
* @defaultValue `CONST.TEXT_ANCHOR_POINTS.CENTER`
|
61
|
+
*/
|
62
|
+
anchor?: foundry.CONST.TEXT_ANCHOR_POINTS | undefined;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* The direction in which the text scrolls
|
66
|
+
* @defaultValue `CONST.TEXT_ANCHOR_POINTS.TOP`
|
67
|
+
*/
|
68
|
+
direction?: foundry.CONST.TEXT_ANCHOR_POINTS | undefined;
|
69
|
+
|
70
|
+
/**
|
71
|
+
* The duration of the scrolling effect in milliseconds
|
72
|
+
* @defaultValue `2000`
|
73
|
+
*/
|
74
|
+
duration?: number | undefined;
|
75
|
+
|
76
|
+
/**
|
77
|
+
* An amount of randomization between 0 and 1 to apply to the initial Position
|
78
|
+
* @defaultValue `0`
|
79
|
+
*/
|
80
|
+
jitter?: number | undefined;
|
81
|
+
}
|
82
|
+
}
|
@@ -11,7 +11,7 @@ declare global {
|
|
11
11
|
/**
|
12
12
|
* A reference to the PointSource object which defines this light source area of effect
|
13
13
|
*/
|
14
|
-
source:
|
14
|
+
source: LightSource;
|
15
15
|
|
16
16
|
/**
|
17
17
|
* A reference to the ControlIcon used to configure this light
|
@@ -25,6 +25,11 @@ declare global {
|
|
25
25
|
/** @override */
|
26
26
|
get bounds(): NormalizedRectangle;
|
27
27
|
|
28
|
+
/**
|
29
|
+
* A convenience accessor to the LightData configuration object
|
30
|
+
*/
|
31
|
+
get config(): foundry.data.LightData;
|
32
|
+
|
28
33
|
/**
|
29
34
|
* Test whether a specific AmbientLight source provides global illumination
|
30
35
|
*/
|
@@ -53,6 +58,9 @@ declare global {
|
|
53
58
|
/** @override */
|
54
59
|
draw(): Promise<this>;
|
55
60
|
|
61
|
+
/** @override */
|
62
|
+
destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
|
63
|
+
|
56
64
|
/**
|
57
65
|
* Draw the ControlIcon for the AmbientLight
|
58
66
|
* @internal
|
@@ -74,12 +82,9 @@ declare global {
|
|
74
82
|
|
75
83
|
/**
|
76
84
|
* Update the source object associated with this light
|
77
|
-
* @param
|
78
|
-
* (default: `false`)
|
79
|
-
* @param deleted - Indicate that this light source has been deleted.
|
80
|
-
* (default: `false`)
|
85
|
+
* @param options - (default: `{}}`)
|
81
86
|
*/
|
82
|
-
updateSource(
|
87
|
+
updateSource(options?: AmbientLight.UpdateSourceOptions | undefined): void;
|
83
88
|
|
84
89
|
/** @override */
|
85
90
|
protected _onCreate(
|
@@ -116,4 +121,20 @@ declare global {
|
|
116
121
|
/** @override */
|
117
122
|
protected _onDragLeftCancel(event: MouseEvent): void;
|
118
123
|
}
|
124
|
+
|
125
|
+
namespace AmbientLight {
|
126
|
+
interface UpdateSourceOptions {
|
127
|
+
/**
|
128
|
+
* Defer refreshing the LightingLayer to manually call that refresh later.
|
129
|
+
* @defaultValue `false`
|
130
|
+
*/
|
131
|
+
defer?: boolean | undefined;
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Indicate that this light source has been deleted.
|
135
|
+
* @defaultValue `false`
|
136
|
+
*/
|
137
|
+
deleted?: boolean | undefined;
|
138
|
+
}
|
139
|
+
}
|
119
140
|
}
|
@@ -13,6 +13,11 @@ declare global {
|
|
13
13
|
*/
|
14
14
|
sound: Sound | null;
|
15
15
|
|
16
|
+
/**
|
17
|
+
* A SoundSource object which manages the area of effect for this ambient sound
|
18
|
+
*/
|
19
|
+
source: SoundSource;
|
20
|
+
|
16
21
|
/** @override */
|
17
22
|
static embeddedName: 'AmbientSound';
|
18
23
|
|
@@ -31,9 +36,9 @@ declare global {
|
|
31
36
|
get bounds(): Rectangle;
|
32
37
|
|
33
38
|
/**
|
34
|
-
*
|
39
|
+
* The named identified for the source object associated with this ambient sound
|
35
40
|
*/
|
36
|
-
get
|
41
|
+
get sourceId(): string;
|
37
42
|
|
38
43
|
/**
|
39
44
|
* A convenience accessor for the sound radius in pixels
|
@@ -54,6 +59,9 @@ declare global {
|
|
54
59
|
/** @override */
|
55
60
|
draw(): Promise<this>;
|
56
61
|
|
62
|
+
/** @override */
|
63
|
+
destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
|
64
|
+
|
57
65
|
/**
|
58
66
|
* Draw the graphical preview of the audio source area of effect
|
59
67
|
* @internal
|
@@ -76,9 +84,9 @@ declare global {
|
|
76
84
|
|
77
85
|
/**
|
78
86
|
* Compute the field-of-vision for an object, determining its effective line-of-sight and field-of-vision polygons
|
79
|
-
* @
|
87
|
+
* @param options - (default: `{}`)
|
80
88
|
*/
|
81
|
-
updateSource(
|
89
|
+
updateSource(options?: AmbientSound.UpdateSourceOptions | undefined): void;
|
82
90
|
|
83
91
|
/** @override */
|
84
92
|
protected _onCreate(
|
@@ -118,5 +126,19 @@ declare global {
|
|
118
126
|
*/
|
119
127
|
fade: number;
|
120
128
|
}
|
129
|
+
|
130
|
+
interface UpdateSourceOptions {
|
131
|
+
/**
|
132
|
+
* Defer refreshing the SoundsLayer to manually call that refresh later.
|
133
|
+
* @defaultValue `false`
|
134
|
+
*/
|
135
|
+
defer?: boolean | undefined;
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Indicate that this SoundSource has been deleted.
|
139
|
+
* @defaultValue `false`
|
140
|
+
*/
|
141
|
+
deleted?: boolean | undefined;
|
142
|
+
}
|
121
143
|
}
|
122
144
|
}
|