@league-of-foundry-developers/foundry-vtt-types 9.249.4 → 9.255.2
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 +1 -1
- package/package.json +2 -2
- package/src/foundry/common/constants.mjs.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -3
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +8 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +7 -1
- package/src/foundry/common/types.mjs.d.ts +125 -10
- package/src/foundry/common/utils/helpers.mjs.d.ts +0 -1
- package/src/foundry/common/utils/http.mjs.d.ts +52 -0
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +2 -2
- package/src/foundry/common/utils/semaphore.mjs.d.ts +6 -3
- package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +18 -57
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +8 -6
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
- package/src/foundry/foundry.js/applications/notifications.d.ts +2 -5
- 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/avClient.d.ts +15 -1
- package/src/foundry/foundry.js/avClients/index.d.ts +0 -1
- package/src/foundry/foundry.js/avClients/simplePeerAVClient.d.ts +31 -4
- package/src/foundry/foundry.js/avMaster.d.ts +21 -48
- package/src/foundry/foundry.js/avSettings.d.ts +19 -46
- package/src/foundry/foundry.js/canvas.d.ts +0 -8
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +6 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +4 -4
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +28 -6
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +13 -70
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +42 -9
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +23 -21
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +5 -23
- package/src/foundry/foundry.js/clientDocuments/macro.d.ts +10 -0
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +24 -14
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +16 -14
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +12 -7
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +2 -12
- package/src/foundry/foundry.js/clientSettings.d.ts +203 -230
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +4 -2
- package/src/foundry/foundry.js/config.d.ts +3 -0
- package/src/foundry/foundry.js/game.d.ts +1 -1
- package/src/foundry/foundry.js/gamepadManager.d.ts +12 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +0 -31
- 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/baseGrid.d.ts +21 -6
- package/src/foundry/foundry.js/pixi/containers/baseGrids/hexagonalGrid.d.ts +13 -8
- package/src/foundry/foundry.js/pixi/containers/baseGrids/squareGrid.d.ts +5 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +14 -5
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +9 -55
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +29 -4
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +37 -20
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +12 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +42 -12
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +4 -2
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +31 -17
- package/src/foundry/foundry.js/rollTerms/diceTerms/die.d.ts +0 -5
- package/src/foundry/foundry.js/rollTerms/diceTerms/fateDie.d.ts +21 -1
- package/src/foundry/foundry.js/videoHelper.d.ts +0 -7
- package/src/foundry/index.d.ts +0 -4
- package/src/types/helperTypes.d.ts +6 -0
- package/src/foundry/foundry.js/avClients/easyRTCClient.d.ts +0 -392
- package/src/foundry/foundry.js/features.d.ts +0 -0
- package/src/foundry/foundry.js/fonts.d.ts +0 -24
@@ -96,7 +96,7 @@ declare class MouseInteractionManager<Object extends PIXI.Container = PIXI.Conta
|
|
96
96
|
|
97
97
|
/**
|
98
98
|
* The throttling time below which a mouse move event will not be handled
|
99
|
-
* @defaultValue `Math.ceil(1000 / canvas.app.ticker.maxFPS)
|
99
|
+
* @defaultValue `Math.ceil(1000 / (canvas.app.ticker.maxFPS || 60));`
|
100
100
|
* @internal
|
101
101
|
*/
|
102
102
|
protected _dragThrottleMS: number;
|
@@ -22,7 +22,12 @@ declare class BaseGrid extends PIXI.Container {
|
|
22
22
|
*/
|
23
23
|
highlight: PIXI.Container;
|
24
24
|
|
25
|
-
|
25
|
+
/**
|
26
|
+
* Draw the grid. Subclasses are expected to override this method to perform their type-specific drawing logic.
|
27
|
+
* @param preview - Override settings used in place of those saved to the scene data.
|
28
|
+
* (default: `{}`)
|
29
|
+
*/
|
30
|
+
draw(preview?: BaseGrid.Preview | undefined): this;
|
26
31
|
|
27
32
|
/**
|
28
33
|
* Highlight a grid position for a certain coordinates
|
@@ -94,7 +99,7 @@ declare class BaseGrid extends PIXI.Container {
|
|
94
99
|
* (default: `{}`)
|
95
100
|
* @returns An Array of distance measurements for each segment
|
96
101
|
*/
|
97
|
-
measureDistances(segments: GridLayer.Segment[], options?:
|
102
|
+
measureDistances(segments: GridLayer.Segment[], options?: MeasureDistancesOptions | undefined): number[];
|
98
103
|
|
99
104
|
/**
|
100
105
|
* Get the grid row and column positions which are neighbors of a certain position
|
@@ -114,6 +119,20 @@ declare namespace BaseGrid {
|
|
114
119
|
even?: boolean;
|
115
120
|
}
|
116
121
|
|
122
|
+
interface Preview {
|
123
|
+
/**
|
124
|
+
* The grid color.
|
125
|
+
* @defaultValue `null`
|
126
|
+
*/
|
127
|
+
gridColor?: string | null | undefined;
|
128
|
+
|
129
|
+
/**
|
130
|
+
* The grid transparency.
|
131
|
+
* @defaultValue `null`
|
132
|
+
*/
|
133
|
+
gridAlpha?: number | null | undefined;
|
134
|
+
}
|
135
|
+
|
117
136
|
interface HighlightGridPositionOptions {
|
118
137
|
/**
|
119
138
|
* The x-coordinate of the highlighted position
|
@@ -149,8 +168,4 @@ declare namespace BaseGrid {
|
|
149
168
|
*/
|
150
169
|
shape?: PIXI.Polygon | null;
|
151
170
|
}
|
152
|
-
|
153
|
-
interface MeasureDistancesOptions {
|
154
|
-
gridSpaces?: boolean;
|
155
|
-
}
|
156
171
|
}
|
@@ -28,7 +28,7 @@ declare class HexagonalGrid extends BaseGrid {
|
|
28
28
|
get hexPoints(): PointArray[];
|
29
29
|
|
30
30
|
/** @override */
|
31
|
-
draw(): this;
|
31
|
+
draw(preview?: BaseGrid.Preview | undefined): this;
|
32
32
|
|
33
33
|
/**
|
34
34
|
* A convenience method for getting all the polygon points relative to a top-left [x,y] coordinate pair
|
@@ -39,10 +39,17 @@ declare class HexagonalGrid extends BaseGrid {
|
|
39
39
|
*/
|
40
40
|
getPolygon(x: number, y: number, w?: number, h?: number): PointArray[];
|
41
41
|
|
42
|
-
|
42
|
+
/**
|
43
|
+
* Draw the grid lines.
|
44
|
+
* @param preview - Override settings used in place of those saved to the scene data.
|
45
|
+
* @internal
|
46
|
+
*/
|
47
|
+
protected _drawGrid(preview?: BaseGrid.Preview | undefined): PIXI.Graphics;
|
43
48
|
|
49
|
+
/** @internal */
|
44
50
|
protected _drawRows(grid: PIXI.Graphics, nrows: number, ncols: number): void;
|
45
51
|
|
52
|
+
/** @internal */
|
46
53
|
protected _drawColumns(grid: PIXI.Graphics, nrows: number, ncols: number): void;
|
47
54
|
|
48
55
|
/**
|
@@ -67,7 +74,8 @@ declare class HexagonalGrid extends BaseGrid {
|
|
67
74
|
*/
|
68
75
|
getSnappedPosition(x: number, y: number, interval?: number | null): { x: number; y: number };
|
69
76
|
|
70
|
-
|
77
|
+
/** @internal */
|
78
|
+
protected _getClosestVertex(xc: number, yc: number, ox: number, oy: number): { x: number; y: number };
|
71
79
|
|
72
80
|
/** @override */
|
73
81
|
shiftPosition(x: number, y: number, dx: number, dy: number): PointArray;
|
@@ -81,11 +89,8 @@ declare class HexagonalGrid extends BaseGrid {
|
|
81
89
|
/** @override */
|
82
90
|
getNeighbors(row: number, col: number): PointArray[];
|
83
91
|
|
84
|
-
/**
|
85
|
-
|
86
|
-
* @param options - (default: `{}`)
|
87
|
-
*/
|
88
|
-
measureDistances(segments: GridLayer.Segment[], options?: BaseGrid.MeasureDistancesOptions): number[];
|
92
|
+
/** @override */
|
93
|
+
measureDistances(segments: GridLayer.Segment[], options?: MeasureDistancesOptions): number[];
|
89
94
|
|
90
95
|
/**
|
91
96
|
* Convert an offset coordinate (row, col) into a cube coordinate (q, r, s).
|
@@ -3,9 +3,10 @@
|
|
3
3
|
*/
|
4
4
|
declare class SquareGrid extends BaseGrid {
|
5
5
|
/** @override */
|
6
|
-
draw(): this;
|
6
|
+
draw(preview?: BaseGrid.Preview | undefined): this;
|
7
7
|
|
8
|
-
|
8
|
+
/** @internal */
|
9
|
+
protected _drawLine(
|
9
10
|
points: [x1: number, y1: number, x2: number, y2: number],
|
10
11
|
lineColor: number,
|
11
12
|
lineAlpha: number
|
@@ -35,6 +36,7 @@ declare class SquareGrid extends BaseGrid {
|
|
35
36
|
*/
|
36
37
|
shiftPosition(x: number, y: number, dx: number, dy: number): PointArray;
|
37
38
|
|
39
|
+
/** @internal */
|
38
40
|
protected _getNearestVertex(x: number, y: number): PointArray;
|
39
41
|
|
40
42
|
/**
|
@@ -47,7 +49,7 @@ declare class SquareGrid extends BaseGrid {
|
|
47
49
|
* @override
|
48
50
|
* @param options - (default: `{}`)
|
49
51
|
*/
|
50
|
-
measureDistances(segments: GridLayer.Segment[], options?:
|
52
|
+
measureDistances(segments: GridLayer.Segment[], options?: MeasureDistancesOptions): number[];
|
51
53
|
|
52
54
|
/** @override */
|
53
55
|
getNeighbors(row: number, col: number): PointArray[];
|
@@ -92,9 +92,11 @@ declare class GridLayer extends CanvasLayer<GridLayer.LayerOptions> {
|
|
92
92
|
getCenter(x: number, y: number): PointArray;
|
93
93
|
|
94
94
|
/**
|
95
|
-
* Measure the
|
96
|
-
* @param origin
|
97
|
-
* @param target
|
95
|
+
* Measure the distance between two point coordinates.
|
96
|
+
* @param origin - The origin point
|
97
|
+
* @param target - The target point
|
98
|
+
* @param options - Additional options which modify the measurement
|
99
|
+
* (default: `{}`)
|
98
100
|
* @returns The measured distance between these points
|
99
101
|
*
|
100
102
|
* @example
|
@@ -110,15 +112,17 @@ declare class GridLayer extends CanvasLayer<GridLayer.LayerOptions> {
|
|
110
112
|
target: {
|
111
113
|
x: number;
|
112
114
|
y: number;
|
113
|
-
}
|
115
|
+
},
|
116
|
+
options?: MeasureDistancesOptions | undefined
|
114
117
|
): number;
|
115
118
|
|
116
119
|
/**
|
117
120
|
* Measure the distance traveled over an array of distance segments.
|
118
121
|
* @param segments - An array of measured segments
|
119
122
|
* @param options - Additional options which modify the measurement
|
123
|
+
* (default: `{}`)
|
120
124
|
*/
|
121
|
-
measureDistances(segments: GridLayer.Segment[], options?:
|
125
|
+
measureDistances(segments: GridLayer.Segment[], options?: MeasureDistancesOptions | undefined): number[];
|
122
126
|
|
123
127
|
/**
|
124
128
|
* Define a new Highlight graphic
|
@@ -194,3 +198,8 @@ interface DrawOptions {
|
|
194
198
|
*/
|
195
199
|
gridAlpha?: number | null;
|
196
200
|
}
|
201
|
+
|
202
|
+
interface MeasureDistancesOptions {
|
203
|
+
/** Return the distance in grid increments rather than the co-ordinate distance. */
|
204
|
+
gridSpaces?: boolean;
|
205
|
+
}
|
@@ -4,7 +4,7 @@ import { Document } from '../../../common/abstract/module.mjs';
|
|
4
4
|
|
5
5
|
declare global {
|
6
6
|
/**
|
7
|
-
* An Abstract Base Class which defines a Placeable Object which represents
|
7
|
+
* An Abstract Base Class which defines a Placeable Object which represents a Document placed on the Canvas
|
8
8
|
*/
|
9
9
|
abstract class PlaceableObject<
|
10
10
|
D extends Document<any, InstanceType<ConfiguredDocumentClass<typeof Scene>>> = Document<
|
@@ -68,8 +68,8 @@ declare global {
|
|
68
68
|
protected _hover: boolean;
|
69
69
|
|
70
70
|
/**
|
71
|
-
* Identify the official
|
72
|
-
* @remarks This
|
71
|
+
* Identify the official Document name for this PlaceableObject class
|
72
|
+
* @remarks This is abstract in {@link PlaceableObject}.
|
73
73
|
*/
|
74
74
|
static embeddedName: string;
|
75
75
|
|
@@ -77,7 +77,7 @@ declare global {
|
|
77
77
|
* The bounding box for this PlaceableObject.
|
78
78
|
* This is required if the layer uses a Quadtree, otherwise it is optional
|
79
79
|
*/
|
80
|
-
get bounds(): Rectangle;
|
80
|
+
abstract get bounds(): Rectangle;
|
81
81
|
|
82
82
|
/**
|
83
83
|
* The central coordinate pair of the placeable object based on it's own width and height
|
@@ -106,8 +106,8 @@ declare global {
|
|
106
106
|
get los(): this['vision']['los'];
|
107
107
|
|
108
108
|
/**
|
109
|
-
* A Form Application which is used to configure the properties of this Placeable Object or the
|
110
|
-
*
|
109
|
+
* A Form Application which is used to configure the properties of this Placeable Object or the Document it
|
110
|
+
* represents.
|
111
111
|
*/
|
112
112
|
get sheet(): 'sheet' extends keyof D ? D['sheet'] : FormApplication | null;
|
113
113
|
|
@@ -151,7 +151,7 @@ declare global {
|
|
151
151
|
protected _canView(user: InstanceType<ConfiguredDocumentClass<typeof User>>, event?: any): boolean;
|
152
152
|
|
153
153
|
/**
|
154
|
-
* Does the User have permission to create the underlying
|
154
|
+
* Does the User have permission to create the underlying Document?
|
155
155
|
* @param event - (unused)
|
156
156
|
*/
|
157
157
|
protected _canCreate(user: InstanceType<ConfiguredDocumentClass<typeof User>>, event?: any): boolean;
|
@@ -169,13 +169,13 @@ declare global {
|
|
169
169
|
protected _canHover(user: InstanceType<ConfiguredDocumentClass<typeof User>>, event?: any): boolean;
|
170
170
|
|
171
171
|
/**
|
172
|
-
* Does the User have permission to update the underlying
|
172
|
+
* Does the User have permission to update the underlying Document?
|
173
173
|
* @param event - (unused)
|
174
174
|
*/
|
175
175
|
protected _canUpdate(user: InstanceType<ConfiguredDocumentClass<typeof User>>, event?: any): boolean;
|
176
176
|
|
177
177
|
/**
|
178
|
-
* Does the User have permission to delete the underlying
|
178
|
+
* Does the User have permission to delete the underlying Document?
|
179
179
|
* @param event - (unused)
|
180
180
|
*/
|
181
181
|
protected _canDelete(user: InstanceType<ConfiguredDocumentClass<typeof User>>, event?: any): boolean;
|
@@ -378,52 +378,6 @@ declare global {
|
|
378
378
|
* @param event - The triggering mouse click event
|
379
379
|
*/
|
380
380
|
protected _onDragLeftCancel(event: MouseEvent): void;
|
381
|
-
|
382
|
-
/**
|
383
|
-
* @deprecated since 0.8.0
|
384
|
-
* @param options - (default: `{}`)
|
385
|
-
*/
|
386
|
-
static create(
|
387
|
-
data:
|
388
|
-
| Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>[1]
|
389
|
-
| Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>[1][],
|
390
|
-
options?: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>[1]
|
391
|
-
): ReturnType<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>;
|
392
|
-
|
393
|
-
/**
|
394
|
-
* @deprecated since 0.8.0
|
395
|
-
*/
|
396
|
-
update(data: Parameters<D['update']>[0], options: Parameters<D['update']>[1]): ReturnType<D['update']>;
|
397
|
-
|
398
|
-
/**
|
399
|
-
* @deprecated since 0.8.0
|
400
|
-
*/
|
401
|
-
delete(options: Parameters<D['delete']>[0]): ReturnType<D['delete']>;
|
402
|
-
|
403
|
-
/**
|
404
|
-
* @deprecated since 0.8.0
|
405
|
-
*/
|
406
|
-
getFlag(scope: string, key: string): ReturnType<D['getFlag']>;
|
407
|
-
|
408
|
-
/**
|
409
|
-
* @deprecated since 0.8.0
|
410
|
-
*/
|
411
|
-
setFlag(scope: string, key: string, value: unknown): ReturnType<D['setFlag']>;
|
412
|
-
|
413
|
-
/**
|
414
|
-
* @deprecated since 0.8.0
|
415
|
-
*/
|
416
|
-
unsetFlag(scope: string, key: string): ReturnType<D['unsetFlag']>;
|
417
|
-
|
418
|
-
/**
|
419
|
-
* @deprecated since 0.8.0
|
420
|
-
*/
|
421
|
-
get uuid(): string;
|
422
|
-
|
423
|
-
/**
|
424
|
-
* @deprecated since 0.8.2
|
425
|
-
*/
|
426
|
-
static get layer(): PlaceablesLayer<any>;
|
427
381
|
}
|
428
382
|
|
429
383
|
namespace PlaceableObject {
|
@@ -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
|
|
@@ -27,10 +32,13 @@ declare global {
|
|
27
32
|
*/
|
28
33
|
get isAudible(): boolean;
|
29
34
|
|
35
|
+
/** @override */
|
36
|
+
get bounds(): Rectangle;
|
37
|
+
|
30
38
|
/**
|
31
|
-
*
|
39
|
+
* The named identified for the source object associated with this ambient sound
|
32
40
|
*/
|
33
|
-
get
|
41
|
+
get sourceId(): string;
|
34
42
|
|
35
43
|
/**
|
36
44
|
* A convenience accessor for the sound radius in pixels
|
@@ -51,6 +59,9 @@ declare global {
|
|
51
59
|
/** @override */
|
52
60
|
draw(): Promise<this>;
|
53
61
|
|
62
|
+
/** @override */
|
63
|
+
destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
|
64
|
+
|
54
65
|
/**
|
55
66
|
* Draw the graphical preview of the audio source area of effect
|
56
67
|
* @internal
|
@@ -73,9 +84,9 @@ declare global {
|
|
73
84
|
|
74
85
|
/**
|
75
86
|
* Compute the field-of-vision for an object, determining its effective line-of-sight and field-of-vision polygons
|
76
|
-
* @
|
87
|
+
* @param options - (default: `{}`)
|
77
88
|
*/
|
78
|
-
updateSource(
|
89
|
+
updateSource(options?: AmbientSound.UpdateSourceOptions | undefined): void;
|
79
90
|
|
80
91
|
/** @override */
|
81
92
|
protected _onCreate(
|
@@ -115,5 +126,19 @@ declare global {
|
|
115
126
|
*/
|
116
127
|
fade: number;
|
117
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
|
+
}
|
118
143
|
}
|
119
144
|
}
|
@@ -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
|
@@ -59,6 +66,9 @@ declare global {
|
|
59
66
|
*/
|
60
67
|
static FREEHAND_SAMPLE_RATE: number;
|
61
68
|
|
69
|
+
/** @override */
|
70
|
+
get bounds(): Rectangle;
|
71
|
+
|
62
72
|
/**
|
63
73
|
* A Boolean flag for whether or not the Drawing utilizes a tiled texture background
|
64
74
|
*/
|
@@ -74,6 +84,7 @@ declare global {
|
|
74
84
|
|
75
85
|
/**
|
76
86
|
* Clean the drawing data to constrain its allowed position
|
87
|
+
* @internal
|
77
88
|
*/
|
78
89
|
protected _cleanData(): void;
|
79
90
|
|
@@ -84,11 +95,13 @@ declare global {
|
|
84
95
|
|
85
96
|
/**
|
86
97
|
* Create elements for the foreground text
|
98
|
+
* @internal
|
87
99
|
*/
|
88
100
|
protected _createText(): PreciseText;
|
89
101
|
|
90
102
|
/**
|
91
103
|
* Create elements for the Drawing border and handles
|
104
|
+
* @internal
|
92
105
|
*/
|
93
106
|
protected _createFrame(): void;
|
94
107
|
|
@@ -97,21 +110,25 @@ declare global {
|
|
97
110
|
|
98
111
|
/**
|
99
112
|
* Draw rectangular shapes
|
113
|
+
* @internal
|
100
114
|
*/
|
101
115
|
protected _drawRectangle(): void;
|
102
116
|
|
103
117
|
/**
|
104
118
|
* Draw ellipsoid shapes
|
119
|
+
* @internal
|
105
120
|
*/
|
106
121
|
protected _drawEllipse(): void;
|
107
122
|
|
108
123
|
/**
|
109
124
|
* Draw polygonal shapes
|
125
|
+
* @internal
|
110
126
|
*/
|
111
127
|
protected _drawPolygon(): void;
|
112
128
|
|
113
129
|
/**
|
114
130
|
* Draw freehand shapes with bezier spline smoothing
|
131
|
+
* @internal
|
115
132
|
*/
|
116
133
|
protected _drawFreehand(): void;
|
117
134
|
|
@@ -122,6 +139,7 @@ declare global {
|
|
122
139
|
* @param previous - The prior point
|
123
140
|
* @param point - The current point
|
124
141
|
* @param next - The next point
|
142
|
+
* @internal
|
125
143
|
*/
|
126
144
|
protected _getBezierControlPoints(
|
127
145
|
factor: number,
|
@@ -141,17 +159,20 @@ declare global {
|
|
141
159
|
|
142
160
|
/**
|
143
161
|
* Refresh the boundary frame which outlines the Drawing shape
|
162
|
+
* @internal
|
144
163
|
*/
|
145
164
|
protected _refreshFrame({ x, y, width, height }: Rectangle): void;
|
146
165
|
|
147
166
|
/**
|
148
167
|
* Add a new polygon point to the drawing, ensuring it differs from the last one
|
149
168
|
* @param temporary - (default: `true`)
|
169
|
+
* @internal
|
150
170
|
*/
|
151
171
|
protected _addPoint(position: Point, temporary?: boolean): void;
|
152
172
|
|
153
173
|
/**
|
154
174
|
* Remove the last fixed point from the polygon
|
175
|
+
* @internal
|
155
176
|
*/
|
156
177
|
protected _removePoint(): void;
|
157
178
|
|
@@ -166,13 +187,9 @@ declare global {
|
|
166
187
|
|
167
188
|
/**
|
168
189
|
* Handle text entry in an active text tool
|
190
|
+
* @internal
|
169
191
|
*/
|
170
|
-
protected _onDrawingTextKeydown(
|
171
|
-
event: KeyboardEvent
|
172
|
-
):
|
173
|
-
| ReturnType<InstanceType<ConfiguredDocumentClass<typeof DrawingDocument>>['update']>
|
174
|
-
| ReturnType<InstanceType<ConfiguredDocumentClass<typeof DrawingDocument>>['delete']>
|
175
|
-
| void;
|
192
|
+
protected _onDrawingTextKeydown(event: KeyboardEvent): void;
|
176
193
|
|
177
194
|
/** @override */
|
178
195
|
protected _onUpdate(data: DeepPartial<foundry.data.DrawingData['_source']>): void;
|
@@ -181,20 +198,21 @@ declare global {
|
|
181
198
|
* @override
|
182
199
|
* @param event - unused
|
183
200
|
*/
|
184
|
-
protected _canControl(user: User
|
201
|
+
protected _canControl(user: InstanceType<ConfiguredDocumentClassForName<'User'>>, event?: any): boolean;
|
185
202
|
|
186
203
|
/**
|
187
204
|
* @override
|
188
205
|
* @param user - unused
|
189
206
|
* @param event - unused
|
190
207
|
*/
|
191
|
-
protected _canConfigure(user: User
|
208
|
+
protected _canConfigure(user: InstanceType<ConfiguredDocumentClassForName<'User'>>, event?: any): boolean;
|
192
209
|
|
193
210
|
/** @override */
|
194
211
|
activateListeners(): void;
|
195
212
|
|
196
213
|
/**
|
197
214
|
* Handle mouse movement which modifies the dimensions of the drawn shape
|
215
|
+
* @internal
|
198
216
|
*/
|
199
217
|
protected _onMouseDraw(event: PIXI.InteractionEvent): void;
|
200
218
|
|
@@ -213,35 +231,41 @@ declare global {
|
|
213
231
|
/**
|
214
232
|
* Handle mouse-over event on a control handle
|
215
233
|
* @param event - The mouseover event
|
234
|
+
* @internal
|
216
235
|
*/
|
217
236
|
protected _onHandleHoverIn(event: PIXI.InteractionEvent): void;
|
218
237
|
|
219
238
|
/**
|
220
239
|
* Handle mouse-out event on a control handle
|
221
240
|
* @param event - The mouseout event
|
241
|
+
* @internal
|
222
242
|
*/
|
223
243
|
protected _onHandleHoverOut(event: PIXI.InteractionEvent): void;
|
224
244
|
|
225
245
|
/**
|
226
246
|
* When we start a drag event - create a preview copy of the Tile for re-positioning
|
227
247
|
* @param event - The mousedown event
|
248
|
+
* @internal
|
228
249
|
*/
|
229
250
|
protected _onHandleMouseDown(event: PIXI.InteractionEvent): void;
|
230
251
|
|
231
252
|
/**
|
232
253
|
* Handle the beginning of a drag event on a resize handle
|
254
|
+
* @internal
|
233
255
|
*/
|
234
256
|
protected _onHandleDragStart(event: PIXI.InteractionEvent): void;
|
235
257
|
|
236
258
|
/**
|
237
259
|
* Handle mousemove while dragging a tile scale handler
|
238
260
|
* @param event - The mousemove event
|
261
|
+
* @internal
|
239
262
|
*/
|
240
263
|
protected _onHandleDragMove(event: PIXI.InteractionEvent): void;
|
241
264
|
|
242
265
|
/**
|
243
266
|
* Handle mouseup after dragging a tile scale handler
|
244
267
|
* @param event - The mouseup event
|
268
|
+
* @internal
|
245
269
|
*/
|
246
270
|
protected _onHandleDragDrop(
|
247
271
|
event: PIXI.InteractionEvent
|
@@ -249,6 +273,7 @@ declare global {
|
|
249
273
|
|
250
274
|
/**
|
251
275
|
* Handle cancellation of a drag event for one of the resizing handles
|
276
|
+
* @internal
|
252
277
|
*/
|
253
278
|
protected _onHandleDragCancel(event: PIXI.InteractionEvent): void;
|
254
279
|
|
@@ -257,6 +282,7 @@ declare global {
|
|
257
282
|
* @param original - The original drawing data
|
258
283
|
* @param dx - The pixel distance dragged in the horizontal direction
|
259
284
|
* @param dy - The pixel distance dragged in the vertical direction
|
285
|
+
* @internal
|
260
286
|
*/
|
261
287
|
protected _rescaleDimensions(
|
262
288
|
original: Pick<foundry.data.DrawingData['_source'], 'x' | 'y' | 'points' | 'width' | 'height'>,
|
@@ -269,19 +295,10 @@ declare global {
|
|
269
295
|
* @param data - The Drawing data pending update
|
270
296
|
* @returns The adjusted data
|
271
297
|
* @remarks This is intentionally public because it is called by the DrawingsLayer
|
298
|
+
* @internal
|
272
299
|
*/
|
273
300
|
static normalizeShape(
|
274
301
|
data: Pick<foundry.data.DrawingData['_source'], 'x' | 'y' | 'width' | 'height' | 'points'>
|
275
302
|
): Pick<foundry.data.DrawingData['_source'], 'x' | 'y' | 'width' | 'height' | 'points'>;
|
276
|
-
|
277
|
-
/**
|
278
|
-
* @deprecated since 0.8.0
|
279
|
-
*/
|
280
|
-
get author(): InstanceType<ConfiguredDocumentClass<typeof User>>;
|
281
|
-
|
282
|
-
/**
|
283
|
-
* @deprecated since 0.8.0
|
284
|
-
*/
|
285
|
-
get owner(): boolean;
|
286
303
|
}
|
287
304
|
}
|