@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
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ConfiguredDocumentClass } from '../../../../../types/helperTypes';
|
1
|
+
import { ConfiguredDocumentClass, ConfiguredDocumentClassForName } from '../../../../../types/helperTypes';
|
2
2
|
import { DocumentModificationOptions } from '../../../../common/abstract/document.mjs';
|
3
3
|
|
4
4
|
declare global {
|
@@ -40,18 +40,25 @@ declare global {
|
|
40
40
|
/**
|
41
41
|
* Internal timestamp for the previous freehand draw time, to limit sampling
|
42
42
|
* @defaultValue `0`
|
43
|
+
* @internal
|
43
44
|
*/
|
44
45
|
protected _drawTime: number;
|
46
|
+
|
47
|
+
/**
|
48
|
+
* @defaultValue `0`
|
49
|
+
* @internal
|
50
|
+
*/
|
45
51
|
protected _sampleTime: number;
|
46
52
|
|
47
53
|
/**
|
48
54
|
* Internal flag for the permanent points of the polygon
|
49
55
|
* @defaultValue `foundry.utils.deepClone(this.data.points || [])`
|
56
|
+
* @internal
|
50
57
|
*/
|
51
58
|
protected _fixedPoints: Array<[x: number, y: number]>;
|
52
59
|
|
53
60
|
/** @override */
|
54
|
-
static
|
61
|
+
static embeddedName: 'Drawing';
|
55
62
|
|
56
63
|
/**
|
57
64
|
* The rate at which points are sampled (in milliseconds) during a freehand drawing workflow
|
@@ -77,6 +84,7 @@ declare global {
|
|
77
84
|
|
78
85
|
/**
|
79
86
|
* Clean the drawing data to constrain its allowed position
|
87
|
+
* @internal
|
80
88
|
*/
|
81
89
|
protected _cleanData(): void;
|
82
90
|
|
@@ -87,11 +95,13 @@ declare global {
|
|
87
95
|
|
88
96
|
/**
|
89
97
|
* Create elements for the foreground text
|
98
|
+
* @internal
|
90
99
|
*/
|
91
100
|
protected _createText(): PreciseText;
|
92
101
|
|
93
102
|
/**
|
94
103
|
* Create elements for the Drawing border and handles
|
104
|
+
* @internal
|
95
105
|
*/
|
96
106
|
protected _createFrame(): void;
|
97
107
|
|
@@ -100,21 +110,25 @@ declare global {
|
|
100
110
|
|
101
111
|
/**
|
102
112
|
* Draw rectangular shapes
|
113
|
+
* @internal
|
103
114
|
*/
|
104
115
|
protected _drawRectangle(): void;
|
105
116
|
|
106
117
|
/**
|
107
118
|
* Draw ellipsoid shapes
|
119
|
+
* @internal
|
108
120
|
*/
|
109
121
|
protected _drawEllipse(): void;
|
110
122
|
|
111
123
|
/**
|
112
124
|
* Draw polygonal shapes
|
125
|
+
* @internal
|
113
126
|
*/
|
114
127
|
protected _drawPolygon(): void;
|
115
128
|
|
116
129
|
/**
|
117
130
|
* Draw freehand shapes with bezier spline smoothing
|
131
|
+
* @internal
|
118
132
|
*/
|
119
133
|
protected _drawFreehand(): void;
|
120
134
|
|
@@ -125,6 +139,7 @@ declare global {
|
|
125
139
|
* @param previous - The prior point
|
126
140
|
* @param point - The current point
|
127
141
|
* @param next - The next point
|
142
|
+
* @internal
|
128
143
|
*/
|
129
144
|
protected _getBezierControlPoints(
|
130
145
|
factor: number,
|
@@ -144,17 +159,20 @@ declare global {
|
|
144
159
|
|
145
160
|
/**
|
146
161
|
* Refresh the boundary frame which outlines the Drawing shape
|
162
|
+
* @internal
|
147
163
|
*/
|
148
164
|
protected _refreshFrame({ x, y, width, height }: Rectangle): void;
|
149
165
|
|
150
166
|
/**
|
151
167
|
* Add a new polygon point to the drawing, ensuring it differs from the last one
|
152
168
|
* @param temporary - (default: `true`)
|
169
|
+
* @internal
|
153
170
|
*/
|
154
171
|
protected _addPoint(position: Point, temporary?: boolean): void;
|
155
172
|
|
156
173
|
/**
|
157
174
|
* Remove the last fixed point from the polygon
|
175
|
+
* @internal
|
158
176
|
*/
|
159
177
|
protected _removePoint(): void;
|
160
178
|
|
@@ -169,13 +187,9 @@ declare global {
|
|
169
187
|
|
170
188
|
/**
|
171
189
|
* Handle text entry in an active text tool
|
190
|
+
* @internal
|
172
191
|
*/
|
173
|
-
protected _onDrawingTextKeydown(
|
174
|
-
event: KeyboardEvent
|
175
|
-
):
|
176
|
-
| ReturnType<InstanceType<ConfiguredDocumentClass<typeof DrawingDocument>>['update']>
|
177
|
-
| ReturnType<InstanceType<ConfiguredDocumentClass<typeof DrawingDocument>>['delete']>
|
178
|
-
| void;
|
192
|
+
protected _onDrawingTextKeydown(event: KeyboardEvent): void;
|
179
193
|
|
180
194
|
/** @override */
|
181
195
|
protected _onUpdate(data: DeepPartial<foundry.data.DrawingData['_source']>): void;
|
@@ -184,20 +198,21 @@ declare global {
|
|
184
198
|
* @override
|
185
199
|
* @param event - unused
|
186
200
|
*/
|
187
|
-
protected _canControl(user: User
|
201
|
+
protected _canControl(user: InstanceType<ConfiguredDocumentClassForName<'User'>>, event?: any): boolean;
|
188
202
|
|
189
203
|
/**
|
190
204
|
* @override
|
191
205
|
* @param user - unused
|
192
206
|
* @param event - unused
|
193
207
|
*/
|
194
|
-
protected _canConfigure(user: User
|
208
|
+
protected _canConfigure(user: InstanceType<ConfiguredDocumentClassForName<'User'>>, event?: any): boolean;
|
195
209
|
|
196
210
|
/** @override */
|
197
211
|
activateListeners(): void;
|
198
212
|
|
199
213
|
/**
|
200
214
|
* Handle mouse movement which modifies the dimensions of the drawn shape
|
215
|
+
* @internal
|
201
216
|
*/
|
202
217
|
protected _onMouseDraw(event: PIXI.InteractionEvent): void;
|
203
218
|
|
@@ -216,35 +231,41 @@ declare global {
|
|
216
231
|
/**
|
217
232
|
* Handle mouse-over event on a control handle
|
218
233
|
* @param event - The mouseover event
|
234
|
+
* @internal
|
219
235
|
*/
|
220
236
|
protected _onHandleHoverIn(event: PIXI.InteractionEvent): void;
|
221
237
|
|
222
238
|
/**
|
223
239
|
* Handle mouse-out event on a control handle
|
224
240
|
* @param event - The mouseout event
|
241
|
+
* @internal
|
225
242
|
*/
|
226
243
|
protected _onHandleHoverOut(event: PIXI.InteractionEvent): void;
|
227
244
|
|
228
245
|
/**
|
229
246
|
* When we start a drag event - create a preview copy of the Tile for re-positioning
|
230
247
|
* @param event - The mousedown event
|
248
|
+
* @internal
|
231
249
|
*/
|
232
250
|
protected _onHandleMouseDown(event: PIXI.InteractionEvent): void;
|
233
251
|
|
234
252
|
/**
|
235
253
|
* Handle the beginning of a drag event on a resize handle
|
254
|
+
* @internal
|
236
255
|
*/
|
237
256
|
protected _onHandleDragStart(event: PIXI.InteractionEvent): void;
|
238
257
|
|
239
258
|
/**
|
240
259
|
* Handle mousemove while dragging a tile scale handler
|
241
260
|
* @param event - The mousemove event
|
261
|
+
* @internal
|
242
262
|
*/
|
243
263
|
protected _onHandleDragMove(event: PIXI.InteractionEvent): void;
|
244
264
|
|
245
265
|
/**
|
246
266
|
* Handle mouseup after dragging a tile scale handler
|
247
267
|
* @param event - The mouseup event
|
268
|
+
* @internal
|
248
269
|
*/
|
249
270
|
protected _onHandleDragDrop(
|
250
271
|
event: PIXI.InteractionEvent
|
@@ -252,6 +273,7 @@ declare global {
|
|
252
273
|
|
253
274
|
/**
|
254
275
|
* Handle cancellation of a drag event for one of the resizing handles
|
276
|
+
* @internal
|
255
277
|
*/
|
256
278
|
protected _onHandleDragCancel(event: PIXI.InteractionEvent): void;
|
257
279
|
|
@@ -260,6 +282,7 @@ declare global {
|
|
260
282
|
* @param original - The original drawing data
|
261
283
|
* @param dx - The pixel distance dragged in the horizontal direction
|
262
284
|
* @param dy - The pixel distance dragged in the vertical direction
|
285
|
+
* @internal
|
263
286
|
*/
|
264
287
|
protected _rescaleDimensions(
|
265
288
|
original: Pick<foundry.data.DrawingData['_source'], 'x' | 'y' | 'points' | 'width' | 'height'>,
|
@@ -272,19 +295,10 @@ declare global {
|
|
272
295
|
* @param data - The Drawing data pending update
|
273
296
|
* @returns The adjusted data
|
274
297
|
* @remarks This is intentionally public because it is called by the DrawingsLayer
|
298
|
+
* @internal
|
275
299
|
*/
|
276
300
|
static normalizeShape(
|
277
301
|
data: Pick<foundry.data.DrawingData['_source'], 'x' | 'y' | 'width' | 'height' | 'points'>
|
278
302
|
): Pick<foundry.data.DrawingData['_source'], 'x' | 'y' | 'width' | 'height' | 'points'>;
|
279
|
-
|
280
|
-
/**
|
281
|
-
* @deprecated since 0.8.0
|
282
|
-
*/
|
283
|
-
get author(): InstanceType<ConfiguredDocumentClass<typeof User>>;
|
284
|
-
|
285
|
-
/**
|
286
|
-
* @deprecated since 0.8.0
|
287
|
-
*/
|
288
|
-
get owner(): boolean;
|
289
303
|
}
|
290
304
|
}
|
@@ -3,30 +3,40 @@ import { DocumentModificationOptions } from '../../../../common/abstract/documen
|
|
3
3
|
|
4
4
|
declare global {
|
5
5
|
/**
|
6
|
-
* A
|
7
|
-
*
|
6
|
+
* A type of Placeable Object which highlights an area of the grid as covered by some area of effect.
|
7
|
+
* @see {@link MeasuredTemplateDocument}
|
8
|
+
* @see {@link TemplateLayer}
|
8
9
|
*/
|
9
10
|
class MeasuredTemplate extends PlaceableObject<
|
10
11
|
InstanceType<ConfiguredDocumentClass<typeof MeasuredTemplateDocument>>
|
11
12
|
> {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
/**
|
14
|
+
* The geometry shape used for testing point intersection
|
15
|
+
* @defaultValue `undefined`
|
16
|
+
*/
|
17
|
+
shape: PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.Rectangle | PIXI.RoundedRectangle | undefined;
|
17
18
|
|
18
19
|
/**
|
19
20
|
* The tiling texture used for this template, if any
|
20
21
|
*/
|
21
|
-
texture: PIXI.Texture |
|
22
|
+
texture: PIXI.Texture | undefined;
|
22
23
|
|
23
24
|
/**
|
24
|
-
* The template
|
25
|
+
* The template graphics
|
26
|
+
* @defaultValue `undefined`
|
25
27
|
*/
|
26
|
-
|
28
|
+
template: PIXI.Graphics | undefined;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* The UI frame container which depicts Token metadata and status, displayed in the ControlsLayer.
|
32
|
+
* @defaultValue `new ObjectHUD(this)`
|
33
|
+
*/
|
34
|
+
hud: MeasuredTemplate.ObjectHUD;
|
27
35
|
|
28
36
|
/**
|
29
37
|
* Internal property used to configure the control border thickness
|
38
|
+
* @defaultValue `3`
|
39
|
+
* @internal
|
30
40
|
*/
|
31
41
|
protected _borderThickness: number;
|
32
42
|
|
@@ -54,13 +64,24 @@ declare global {
|
|
54
64
|
/** @override */
|
55
65
|
draw(): Promise<this>;
|
56
66
|
|
67
|
+
/** @override */
|
68
|
+
destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Draw the HUD container which provides an interface for managing this template
|
72
|
+
* @internal
|
73
|
+
*/
|
74
|
+
protected _drawHUD(): MeasuredTemplate.InitializedObjectHUD;
|
75
|
+
|
57
76
|
/**
|
58
77
|
* Draw the ControlIcon for the MeasuredTemplate
|
78
|
+
* @internal
|
59
79
|
*/
|
60
80
|
protected _drawControlIcon(): ControlIcon;
|
61
81
|
|
62
82
|
/**
|
63
83
|
* Draw the Text label used for the MeasuredTemplate
|
84
|
+
* @internal
|
64
85
|
*/
|
65
86
|
protected _drawRulerText(): PreciseText;
|
66
87
|
|
@@ -69,31 +90,31 @@ declare global {
|
|
69
90
|
|
70
91
|
/**
|
71
92
|
* Get a Circular area of effect given a radius of effect
|
93
|
+
* @internal
|
72
94
|
*/
|
73
95
|
protected _getCircleShape(distance: number): PIXI.Circle;
|
74
96
|
|
75
97
|
/**
|
76
98
|
* Get a Conical area of effect given a direction, angle, and distance
|
99
|
+
* @internal
|
77
100
|
*/
|
78
101
|
protected _getConeShape(direction: number, angle: number, distance: number): PIXI.Polygon;
|
79
102
|
|
80
103
|
/**
|
81
104
|
* Get a Rectangular area of effect given a width and height
|
105
|
+
* @internal
|
82
106
|
*/
|
83
107
|
protected _getRectShape(direction: number, distance: number): NormalizedRectangle;
|
84
108
|
|
85
109
|
/**
|
86
110
|
* Get a rotated Rectangular area of effect given a width, height, and direction
|
111
|
+
* @internal
|
87
112
|
*/
|
88
113
|
protected _getRayShape(direction: number, distance: number, width: number): PIXI.Polygon;
|
89
114
|
|
90
|
-
/**
|
91
|
-
* Draw the rotation control handle and assign event listeners
|
92
|
-
*/
|
93
|
-
protected _drawRotationHandle(radius: number): void;
|
94
|
-
|
95
115
|
/**
|
96
116
|
* Update the displayed ruler tooltip text
|
117
|
+
* @internal
|
97
118
|
*/
|
98
119
|
protected _refreshRulerText(): void;
|
99
120
|
|
@@ -124,4 +145,20 @@ declare global {
|
|
124
145
|
/** @override */
|
125
146
|
protected _onDelete(options: DocumentModificationOptions, userId: string): void;
|
126
147
|
}
|
148
|
+
|
149
|
+
namespace MeasuredTemplate {
|
150
|
+
interface ObjectHUD extends globalThis.ObjectHUD {
|
151
|
+
/**
|
152
|
+
* Template control icon
|
153
|
+
*/
|
154
|
+
icon?: ControlIcon;
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Ruler text tooltip
|
158
|
+
*/
|
159
|
+
ruler?: PreciseText;
|
160
|
+
}
|
161
|
+
|
162
|
+
type InitializedObjectHUD = RequiredProps<ObjectHUD, 'icon' | 'ruler'>;
|
163
|
+
}
|
127
164
|
}
|
@@ -4,11 +4,11 @@ import { HoverInOptions } from '../placeableObject';
|
|
4
4
|
declare global {
|
5
5
|
/**
|
6
6
|
* A Note is an implementation of PlaceableObject which represents an annotated location within the Scene.
|
7
|
-
* Each Note links to a JournalEntry
|
7
|
+
* Each Note links to a JournalEntry document and represents its location on the map.
|
8
8
|
*/
|
9
9
|
class Note extends PlaceableObject<InstanceType<ConfiguredDocumentClass<typeof NoteDocument>>> {
|
10
10
|
/** @override */
|
11
|
-
static
|
11
|
+
static embeddedName: 'Note';
|
12
12
|
|
13
13
|
/** @override */
|
14
14
|
get bounds(): Rectangle;
|
@@ -28,6 +28,13 @@ declare global {
|
|
28
28
|
*/
|
29
29
|
get size(): number;
|
30
30
|
|
31
|
+
/**
|
32
|
+
* Determine whether the Note is visible to the current user based on their perspective of the Scene.
|
33
|
+
* Visibility depends on permission to the underlying journal entry, as well as the perspective of controlled Tokens.
|
34
|
+
* If Token Vision is required, the user must have a token with vision over the note to see it.
|
35
|
+
*/
|
36
|
+
get isVisible(): boolean;
|
37
|
+
|
31
38
|
/** @override */
|
32
39
|
draw(): Promise<this>;
|
33
40
|
|
@@ -36,6 +36,12 @@ declare global {
|
|
36
36
|
*/
|
37
37
|
tile: PIXI.Sprite | undefined;
|
38
38
|
|
39
|
+
/**
|
40
|
+
* The occlusion image sprite
|
41
|
+
* @defaultValue `undefined`
|
42
|
+
*/
|
43
|
+
occlusionTile: PIXI.Sprite | undefined;
|
44
|
+
|
39
45
|
/**
|
40
46
|
* A Tile background which is displayed if no valid image texture is present
|
41
47
|
* @defaultValue `undefined`
|
@@ -64,6 +70,12 @@ declare global {
|
|
64
70
|
*/
|
65
71
|
occluded: boolean;
|
66
72
|
|
73
|
+
/**
|
74
|
+
* A flag which tracks if the Tile is currently playing
|
75
|
+
* @defaultValue `false`
|
76
|
+
*/
|
77
|
+
playing: boolean;
|
78
|
+
|
67
79
|
/** @override */
|
68
80
|
static embeddedName: 'Tile';
|
69
81
|
|
@@ -90,11 +102,21 @@ declare global {
|
|
90
102
|
*/
|
91
103
|
get isRoof(): boolean;
|
92
104
|
|
105
|
+
/**
|
106
|
+
* The effective volume at which this Tile should be playing, including the global ambient volume modifier
|
107
|
+
*/
|
108
|
+
get volume(): number;
|
109
|
+
|
93
110
|
/** @override */
|
94
111
|
draw(): Promise<this>;
|
95
112
|
|
96
113
|
/** @override */
|
97
|
-
|
114
|
+
destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
|
115
|
+
|
116
|
+
/**
|
117
|
+
* @param options - (default: `{}`)
|
118
|
+
* @override */
|
119
|
+
refresh(options?: Tile.RefreshOptions | undefined): this;
|
98
120
|
|
99
121
|
/**
|
100
122
|
* Refresh the display of the Tile border
|
@@ -114,7 +136,14 @@ declare global {
|
|
114
136
|
* @param options - Additional options for modifying video playback
|
115
137
|
* (default: `{}`)
|
116
138
|
*/
|
117
|
-
play(playing: boolean, options?:
|
139
|
+
play(playing: boolean, options?: Tile.PlayOptions | undefined): void;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* Unlink the playback of this video tile from the playback of other tokens which are using the same base texture.
|
143
|
+
* @param source - The video element source
|
144
|
+
* @internal
|
145
|
+
*/
|
146
|
+
protected _unlinkVideoPlayback(source: HTMLVideoElement): Promise<void>;
|
118
147
|
|
119
148
|
/**
|
120
149
|
* Update the occlusion rendering for this overhead Tile for a given controlled Token.
|
@@ -131,7 +160,7 @@ declare global {
|
|
131
160
|
*/
|
132
161
|
testOcclusion(
|
133
162
|
token: InstanceType<ConfiguredObjectClassForName<'Token'>>,
|
134
|
-
options?:
|
163
|
+
options?: Tile.OcclusionOptions | undefined
|
135
164
|
): boolean;
|
136
165
|
|
137
166
|
/**
|
@@ -157,7 +186,7 @@ declare global {
|
|
157
186
|
* @param options - Options which customize the return value
|
158
187
|
* @internal
|
159
188
|
*/
|
160
|
-
protected _createAlphaMap(options:
|
189
|
+
protected _createAlphaMap(options: Tile.AlphaMapOptions): Exclude<Tile['_alphaMap'], undefined>;
|
161
190
|
|
162
191
|
/**
|
163
192
|
* Compute the alpha-based bounding box for the tile, including an angle of rotation.
|
@@ -242,7 +271,7 @@ declare global {
|
|
242
271
|
* Get resized Tile dimensions
|
243
272
|
* @internal
|
244
273
|
*/
|
245
|
-
protected _getResizedDimensions(event: MouseEvent, origin: Point, destination: Point):
|
274
|
+
protected _getResizedDimensions(event: MouseEvent, origin: Point, destination: Point): Rectangle;
|
246
275
|
|
247
276
|
/**
|
248
277
|
* Handle cancellation of a drag event for one of the resizing handles
|
@@ -251,18 +280,27 @@ declare global {
|
|
251
280
|
|
252
281
|
/**
|
253
282
|
* Create a preview tile with a background texture instead of an image
|
283
|
+
* @param data - Initial data with which to create the preview Tile
|
254
284
|
*/
|
255
|
-
static createPreview(data: TileDataConstructorData): Tile
|
285
|
+
static createPreview(data: TileDataConstructorData): InstanceType<ConfiguredObjectClassForName<'Tile'>>;
|
256
286
|
}
|
257
287
|
|
258
288
|
namespace Tile {
|
289
|
+
interface RefreshOptions {
|
290
|
+
/**
|
291
|
+
* Also refresh the perception layer.
|
292
|
+
* @defaultValue `false`
|
293
|
+
*/
|
294
|
+
refreshPerception?: boolean | undefined;
|
295
|
+
}
|
296
|
+
|
259
297
|
interface PlayOptions {
|
260
298
|
/** Should the video loop? */
|
261
|
-
loop
|
299
|
+
loop?: boolean | undefined;
|
262
300
|
/** A specific timestamp between 0 and the video duration to begin playback */
|
263
|
-
offset
|
301
|
+
offset?: number | undefined;
|
264
302
|
/** Desired volume level of the video's audio channel (if any) */
|
265
|
-
volume
|
303
|
+
volume?: number | undefined;
|
266
304
|
}
|
267
305
|
|
268
306
|
interface OcclusionOptions {
|
@@ -270,7 +308,7 @@ declare global {
|
|
270
308
|
* Test corners of the hit-box in addition to the token center?
|
271
309
|
* @defaultValue `true`
|
272
310
|
*/
|
273
|
-
corners
|
311
|
+
corners?: boolean | undefined;
|
274
312
|
}
|
275
313
|
|
276
314
|
interface AlphaMapOptions {
|
@@ -278,13 +316,13 @@ declare global {
|
|
278
316
|
* Keep the Uint8Array of pixel alphas?
|
279
317
|
* @defaultValue `false`
|
280
318
|
*/
|
281
|
-
keepPixels
|
319
|
+
keepPixels?: boolean | undefined;
|
282
320
|
|
283
321
|
/**
|
284
322
|
* Keep the pure white RenderTexture?
|
285
323
|
* @defaultValue `false`
|
286
324
|
*/
|
287
|
-
keepTexture
|
325
|
+
keepTexture?: boolean | undefined;
|
288
326
|
}
|
289
327
|
}
|
290
328
|
}
|