@league-of-foundry-developers/foundry-vtt-types 9.255.3 → 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/utils/helpers.mjs.d.ts +1 -0
- package/src/foundry/foundry.js/application.d.ts +0 -1
- 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/filePicker.d.ts +67 -75
- package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- 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/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/invitationLinks.d.ts +25 -10
- 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/clientDocuments/cards.d.ts +8 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +87 -49
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +2 -6
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +6 -0
- 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/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/placeableObjects/tile.d.ts +11 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +34 -27
- 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/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
@@ -1,69 +1,76 @@
|
|
1
|
-
|
2
|
-
* A CanvasLayer for displaying UI controls which are overlayed on top of other layers.
|
3
|
-
*
|
4
|
-
* We track three types of events:
|
5
|
-
* 1) Cursor movement
|
6
|
-
* 2) Ruler measurement
|
7
|
-
* 3) Map pings
|
8
|
-
*/
|
9
|
-
import { ConfiguredDocumentClass, ConfiguredObjectClassForName } from '../../../../../types/helperTypes';
|
1
|
+
import { ConfiguredDocumentClass } from '../../../../../types/helperTypes';
|
10
2
|
|
11
3
|
declare global {
|
4
|
+
/**
|
5
|
+
* A CanvasLayer for displaying UI controls which are overlayed on top of other layers.
|
6
|
+
*
|
7
|
+
* We track three types of events:
|
8
|
+
* 1) Cursor movement
|
9
|
+
* 2) Ruler measurement
|
10
|
+
* 3) Map pings
|
11
|
+
*/
|
12
12
|
class ControlsLayer extends CanvasLayer<ControlsLayer.LayerOptions> {
|
13
13
|
constructor();
|
14
14
|
|
15
15
|
/**
|
16
|
-
*
|
17
|
-
* @defaultValue `
|
16
|
+
* A container of DoorControl instances
|
17
|
+
* @defaultValue `this.addChild(new PIXI.Container())`
|
18
18
|
*/
|
19
|
-
|
19
|
+
doors: PIXI.Container;
|
20
20
|
|
21
21
|
/**
|
22
|
-
* A
|
23
|
-
* @defaultValue `
|
24
|
-
*/
|
25
|
-
protected _cursors: Partial<Record<string, Cursor>>;
|
26
|
-
|
27
|
-
/**
|
28
|
-
* Door control icons
|
29
|
-
* @defaultValue `null`
|
22
|
+
* A container of HUD interface elements
|
23
|
+
* @defaultValue `this.addChild(new PIXI.Container())`
|
30
24
|
*/
|
31
|
-
|
25
|
+
hud: PIXI.Container;
|
32
26
|
|
33
27
|
/**
|
34
|
-
*
|
35
|
-
*
|
28
|
+
* A container of cursor interaction elements.
|
29
|
+
* Contains cursors, rulers, interaction rectangles, and pings
|
30
|
+
* @defaultValue `this.addChild(new PIXI.Container())`
|
36
31
|
*/
|
37
|
-
|
32
|
+
cursors: PIXI.Container;
|
38
33
|
|
39
34
|
/**
|
40
35
|
* Ruler tools, one per connected user
|
41
|
-
* @defaultValue `
|
36
|
+
* @defaultValue `this.addChild(new PIXI.Container())`
|
42
37
|
*/
|
43
|
-
rulers: PIXI.Container
|
38
|
+
rulers: PIXI.Container;
|
44
39
|
|
45
40
|
/**
|
46
|
-
* A
|
41
|
+
* A graphics instance used for drawing debugging visualization
|
42
|
+
* @defaultValue `this.addChild(new PIXI.Graphics())`
|
47
43
|
*/
|
48
|
-
|
44
|
+
debug: PIXI.Graphics;
|
49
45
|
|
50
46
|
/**
|
51
47
|
* Canvas selection rectangle
|
52
|
-
* @defaultValue `
|
48
|
+
* @defaultValue `undefined`
|
53
49
|
*/
|
54
|
-
select: PIXI.Graphics |
|
50
|
+
select: PIXI.Graphics | undefined;
|
55
51
|
|
56
|
-
|
57
|
-
|
52
|
+
/**
|
53
|
+
* A mapping of user IDs to Cursor instances for quick access
|
54
|
+
* @defaultValue `{}`
|
55
|
+
*/
|
56
|
+
protected _cursors: Record<string, Cursor>;
|
58
57
|
|
59
58
|
/**
|
60
|
-
*
|
59
|
+
* A convenience mapping of user IDs to Ruler instances for quick access
|
60
|
+
* @internal
|
61
|
+
* @defaultValue `{}`
|
61
62
|
*/
|
62
|
-
|
63
|
+
protected _rulers: Record<string, Ruler>;
|
63
64
|
|
64
65
|
/**
|
65
66
|
* @override
|
66
|
-
* @defaultValue
|
67
|
+
* @defaultValue
|
68
|
+
* ```typescript
|
69
|
+
* foundry.utils.mergeObject(super.layerOptions, {
|
70
|
+
* name: "controls",
|
71
|
+
* zIndex: 1000
|
72
|
+
* })
|
73
|
+
* ```
|
67
74
|
*/
|
68
75
|
static get layerOptions(): ControlsLayer.LayerOptions;
|
69
76
|
|
@@ -78,24 +85,18 @@ declare global {
|
|
78
85
|
getRulerForUser(userId: string): Ruler | null;
|
79
86
|
|
80
87
|
/** @override */
|
81
|
-
draw(): this
|
82
|
-
|
83
|
-
/**
|
84
|
-
* Draw the cursors container
|
85
|
-
*/
|
86
|
-
drawCursors(): void;
|
88
|
+
draw(): Promise<this>;
|
87
89
|
|
88
90
|
/**
|
89
|
-
*
|
91
|
+
* @override
|
92
|
+
* @remarks This breaks polymorphism. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6939
|
90
93
|
*/
|
91
|
-
|
94
|
+
tearDown(): Promise<void>;
|
92
95
|
|
93
96
|
/**
|
94
|
-
*
|
95
|
-
* @param wall - The Wall for which to create a DoorControl
|
96
|
-
* @returns The created DoorControl
|
97
|
+
* Draw the cursors container
|
97
98
|
*/
|
98
|
-
|
99
|
+
drawCursors(): void;
|
99
100
|
|
100
101
|
/**
|
101
102
|
* Draw Ruler tools
|
@@ -118,7 +119,7 @@ declare global {
|
|
118
119
|
|
119
120
|
/**
|
120
121
|
* Create and draw the Cursor object for a given User
|
121
|
-
* @param user - The User
|
122
|
+
* @param user - The User document for whom to draw the cursor Container
|
122
123
|
*/
|
123
124
|
drawCursor(user: InstanceType<ConfiguredDocumentClass<typeof User>>): Cursor;
|
124
125
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
DataSourceForPlaceable,
|
3
|
-
ConfiguredDocumentClass,
|
4
3
|
ConfiguredObjectClassForName,
|
5
4
|
ConfiguredDocumentClassForName,
|
6
|
-
PlaceableDocumentType
|
5
|
+
PlaceableDocumentType,
|
6
|
+
ConstructorDataType
|
7
7
|
} from '../../../../../types/helperTypes';
|
8
8
|
import EmbeddedCollection from '../../../../common/abstract/embedded-collection.mjs';
|
9
9
|
|
@@ -78,6 +78,16 @@ declare global {
|
|
78
78
|
*/
|
79
79
|
static documentName: PlaceableDocumentType;
|
80
80
|
|
81
|
+
/**
|
82
|
+
* Creation states affected to placeables during their construction.
|
83
|
+
*/
|
84
|
+
static CREATION_STATES: Readonly<{
|
85
|
+
NONE: 0;
|
86
|
+
POTENTIAL: 1;
|
87
|
+
CONFIRMED: 2;
|
88
|
+
COMPLETED: 3;
|
89
|
+
}>;
|
90
|
+
|
81
91
|
/**
|
82
92
|
* Obtain a reference to the Collection of embedded Document instances within the currently viewed Scene
|
83
93
|
*/
|
@@ -130,7 +140,7 @@ declare global {
|
|
130
140
|
*/
|
131
141
|
createObject(
|
132
142
|
data: InstanceType<ConfiguredDocumentClassForName<DocumentName>>
|
133
|
-
): InstanceType<ConfiguredObjectClassForName<DocumentName
|
143
|
+
): InstanceType<ConfiguredObjectClassForName<DocumentName>> | null;
|
134
144
|
|
135
145
|
/** @override */
|
136
146
|
tearDown(): Promise<this>;
|
@@ -141,6 +151,11 @@ declare global {
|
|
141
151
|
/** @override */
|
142
152
|
deactivate(): this;
|
143
153
|
|
154
|
+
/**
|
155
|
+
* Clear the contents of the preview container, restoring visibility of original (non-preview) objects.
|
156
|
+
*/
|
157
|
+
clearPreviewContainer(): void;
|
158
|
+
|
144
159
|
/**
|
145
160
|
* Get a PlaceableObject contained in this layer by it's ID
|
146
161
|
*
|
@@ -246,7 +261,7 @@ declare global {
|
|
246
261
|
* @param transformation - An object of data or function to apply to all matched objects
|
247
262
|
* @param condition - A function which tests whether to target each object
|
248
263
|
* (default: `null`)
|
249
|
-
* @param options - Additional options passed to
|
264
|
+
* @param options - Additional options passed to Document.update
|
250
265
|
* (default: `{}`)
|
251
266
|
* @returns An array of updated data once the operation is complete
|
252
267
|
*/
|
@@ -268,6 +283,35 @@ declare global {
|
|
268
283
|
options?: DocumentModificationContext
|
269
284
|
): Promise<Array<InstanceType<ConfiguredDocumentClassForName<DocumentName>>>>;
|
270
285
|
|
286
|
+
/**
|
287
|
+
* Get the world-transformed drop position.
|
288
|
+
* @returns Returns the transformed x, y co-ordinates, or false if the drag event was outside the canvas.
|
289
|
+
*/
|
290
|
+
protected _canvasCoordinatesFromDrop(
|
291
|
+
event: DragEvent,
|
292
|
+
{
|
293
|
+
center
|
294
|
+
}?:
|
295
|
+
| {
|
296
|
+
/**
|
297
|
+
* Return the co-ordinates of the center of the nearest grid element.
|
298
|
+
* @defaultValue `true`
|
299
|
+
*/
|
300
|
+
center?: boolean | undefined;
|
301
|
+
}
|
302
|
+
| undefined
|
303
|
+
): [tx: number, ty: number] | false;
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Create a preview of this layer's object type from a world document and show its sheet so it can be finalized.
|
307
|
+
* @param createData - The data to create the object with.
|
308
|
+
* @param position - The position to render the sheet at.
|
309
|
+
*/
|
310
|
+
protected _createPreview(
|
311
|
+
createData: ConstructorDataType<InstanceType<ConfiguredDocumentClassForName<DocumentName>>['data']>,
|
312
|
+
{ top, left }: { top: number; left: number }
|
313
|
+
): Promise<void>;
|
314
|
+
|
271
315
|
/**
|
272
316
|
* Handle left mouse-click events which originate from the Canvas stage and are dispatched to this Layer.
|
273
317
|
* @param event - (unused)
|
@@ -327,35 +371,6 @@ declare global {
|
|
327
371
|
* (unused)
|
328
372
|
*/
|
329
373
|
protected _onDeleteKey(event?: any): void;
|
330
|
-
|
331
|
-
/**
|
332
|
-
* @deprecated since 0.8.0
|
333
|
-
*/
|
334
|
-
static get dataArray(): string;
|
335
|
-
|
336
|
-
/**
|
337
|
-
* @deprecated since 0.8.0
|
338
|
-
*/
|
339
|
-
createMany(
|
340
|
-
data: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>[1],
|
341
|
-
options: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>[2]
|
342
|
-
): ReturnType<InstanceType<ConfiguredDocumentClass<typeof Scene>>['createEmbeddedDocuments']>;
|
343
|
-
|
344
|
-
/**
|
345
|
-
* @deprecated since 0.8.0
|
346
|
-
*/
|
347
|
-
updateMany(
|
348
|
-
data: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['updateEmbeddedDocuments']>[1],
|
349
|
-
options: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['updateEmbeddedDocuments']>[2]
|
350
|
-
): ReturnType<InstanceType<ConfiguredDocumentClass<typeof Scene>>['updateEmbeddedDocuments']>;
|
351
|
-
|
352
|
-
/**
|
353
|
-
* @deprecated since 0.8.0
|
354
|
-
*/
|
355
|
-
deleteMany(
|
356
|
-
data: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['deleteEmbeddedDocuments']>[1],
|
357
|
-
options: Parameters<InstanceType<ConfiguredDocumentClass<typeof Scene>>['deleteEmbeddedDocuments']>[2]
|
358
|
-
): ReturnType<InstanceType<ConfiguredDocumentClass<typeof Scene>>['deleteEmbeddedDocuments']>;
|
359
374
|
}
|
360
375
|
|
361
376
|
interface CanvasHistory<Placeable extends PlaceableObject> {
|
@@ -373,6 +388,8 @@ declare global {
|
|
373
388
|
namespace PlaceablesLayer {
|
374
389
|
type HistoryEventType = 'create' | 'update' | 'delete';
|
375
390
|
|
391
|
+
type CreationState = ValueOf<typeof PlaceablesLayer['CREATION_STATES']>;
|
392
|
+
|
376
393
|
/**
|
377
394
|
* @typeParam DocumentName - The key of the configuration which defines the object and document class.
|
378
395
|
*/
|
@@ -409,15 +426,9 @@ declare global {
|
|
409
426
|
|
410
427
|
/**
|
411
428
|
* Does this layer use a quadtree to track object positions?
|
412
|
-
* @defaultValue `
|
429
|
+
* @defaultValue `true`
|
413
430
|
*/
|
414
431
|
quadtree: boolean;
|
415
|
-
|
416
|
-
/**
|
417
|
-
* The FormApplication class used to configure objects on this layer.
|
418
|
-
* @defaultValue `CONFIG[this.documentName].sheetClass`
|
419
|
-
*/
|
420
|
-
sheetClass: ConstructorOf<FormApplication>;
|
421
432
|
}
|
422
433
|
}
|
423
434
|
}
|
package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/lightingLayer.d.ts
CHANGED
@@ -20,7 +20,7 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
20
20
|
/**
|
21
21
|
* A mapping of light sources which are active within the rendered Scene
|
22
22
|
*/
|
23
|
-
sources: foundry.utils.Collection<
|
23
|
+
sources: foundry.utils.Collection<LightSource>;
|
24
24
|
|
25
25
|
/**
|
26
26
|
* Increment this whenever lighting channels are re-configured.
|
@@ -33,7 +33,7 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
33
33
|
* The currently displayed darkness level, which may override the saved Scene value
|
34
34
|
* @defaultValue `0`
|
35
35
|
*/
|
36
|
-
|
36
|
+
darknessLevel: number;
|
37
37
|
|
38
38
|
/**
|
39
39
|
* The current client setting for whether global illumination is used or not
|
@@ -54,21 +54,22 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
54
54
|
illumination: PIXI.Container | null;
|
55
55
|
|
56
56
|
/**
|
57
|
-
*
|
58
|
-
* @defaultValue `
|
57
|
+
* The background container which visualizes the background
|
58
|
+
* @defaultValue `null`
|
59
59
|
*/
|
60
|
-
|
60
|
+
background: PIXI.Container | null;
|
61
61
|
|
62
62
|
/**
|
63
63
|
* An array of light sources which are currently animated
|
64
|
+
* @internal
|
64
65
|
*/
|
65
|
-
protected _animatedSources:
|
66
|
+
protected _animatedSources: LightSource[];
|
66
67
|
|
67
68
|
/**
|
68
69
|
* A mapping of different light level channels
|
69
70
|
* @defaultValue `undefined`
|
70
71
|
*/
|
71
|
-
channels:
|
72
|
+
channels: ChannelConfig | undefined;
|
72
73
|
|
73
74
|
/** @override */
|
74
75
|
static documentName: 'AmbientLight';
|
@@ -85,7 +86,6 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
85
86
|
* foundry.utils.mergeObject(super.layerOptions, {
|
86
87
|
* name: "lighting",
|
87
88
|
* rotatableObjects: true,
|
88
|
-
* quadtree: true,
|
89
89
|
* zIndex: 300
|
90
90
|
* })
|
91
91
|
* ```
|
@@ -93,28 +93,47 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
93
93
|
static get layerOptions(): LightingLayer.LayerOptions;
|
94
94
|
|
95
95
|
/**
|
96
|
+
* TODO: Significant portions of this method may no longer be needed
|
96
97
|
* Configure the lighting channels which are inputs to the ShadowMap
|
98
|
+
* @internal
|
97
99
|
*/
|
98
|
-
protected _configureChannels(
|
99
|
-
darkness
|
100
|
-
|
100
|
+
protected _configureChannels({
|
101
|
+
darkness,
|
102
|
+
backgroundColor
|
103
|
+
}?: {
|
104
|
+
/** Darkness level override. */
|
105
|
+
darkness?: number;
|
106
|
+
|
107
|
+
/** Canvas background color override. */
|
108
|
+
backgroundColor?: number;
|
109
|
+
}): ChannelConfig;
|
101
110
|
|
102
111
|
/**
|
103
112
|
* @override
|
104
113
|
*/
|
105
114
|
draw(): Promise<this>;
|
106
115
|
|
116
|
+
masks?: PIXI.Container;
|
117
|
+
|
107
118
|
/**
|
108
119
|
* Draw the coloration container which is responsible for rendering the visible hue of a light source.
|
109
120
|
* Apply an additive blend to the entire container after each individual light source is blended via screen.
|
121
|
+
* @internal
|
110
122
|
*/
|
111
123
|
protected _drawColorationContainer(): PIXI.Container;
|
112
124
|
|
113
125
|
/**
|
114
126
|
* Draw the illumination container which is responsible for displaying darkness and light.
|
127
|
+
* @internal
|
115
128
|
*/
|
116
129
|
protected _drawIlluminationContainer(): PIXI.Container;
|
117
130
|
|
131
|
+
/**
|
132
|
+
* Draw the background container which is responsible for displaying altered background.
|
133
|
+
* @internal
|
134
|
+
*/
|
135
|
+
protected _drawBackgroundContainer(): PIXI.Container;
|
136
|
+
|
118
137
|
/**
|
119
138
|
* Does this scene currently benefit from global illumination?
|
120
139
|
*/
|
@@ -129,7 +148,19 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
129
148
|
* Refresh the active display of the LightingLayer.
|
130
149
|
* Update the scene background color, light sources, and darkness sources
|
131
150
|
*/
|
132
|
-
refresh(
|
151
|
+
refresh({
|
152
|
+
darkness,
|
153
|
+
backgroundColor
|
154
|
+
}?: {
|
155
|
+
/**
|
156
|
+
* An override darkness level to which the layer should be temporarily
|
157
|
+
* rendered.
|
158
|
+
*/
|
159
|
+
darkness?: number;
|
160
|
+
|
161
|
+
/** An override canvas background color. */
|
162
|
+
backgroundColor?: number;
|
163
|
+
}): void;
|
133
164
|
|
134
165
|
/** @override */
|
135
166
|
tearDown(): Promise<this>;
|
@@ -147,6 +178,7 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
147
178
|
/**
|
148
179
|
* The ticker handler which manages animation delegation
|
149
180
|
* @param dt - Delta time
|
181
|
+
* @internal
|
150
182
|
*/
|
151
183
|
protected _animateSource(dt: number): void;
|
152
184
|
|
@@ -155,16 +187,26 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
155
187
|
* Only begin animating if another animation is not already in progress.
|
156
188
|
* @param target - The target darkness level between 0 and 1
|
157
189
|
* (default: `1.0`)
|
158
|
-
* @param duration - The desired animation time in milliseconds. Default is 10 seconds
|
159
|
-
* (default: `10000`)
|
160
190
|
* @returns A Promise which resolves once the animation is complete
|
161
191
|
*/
|
162
|
-
animateDarkness(
|
192
|
+
animateDarkness(
|
193
|
+
target?: number,
|
194
|
+
{
|
195
|
+
duration
|
196
|
+
}?: {
|
197
|
+
/**
|
198
|
+
* The desired animation time in milliseconds. Default is 10 seconds
|
199
|
+
* @defaultValue `10000`
|
200
|
+
*/
|
201
|
+
duration?: number;
|
202
|
+
}
|
203
|
+
): Promise<void>;
|
163
204
|
|
164
205
|
/**
|
165
206
|
* Actions to take when the darkness level of the Scene is changed
|
166
207
|
* @param darkness - The new darkness level
|
167
208
|
* @param prior - The prior darkness level
|
209
|
+
* @internal
|
168
210
|
*/
|
169
211
|
protected _onDarknessChange(darkness: number, prior: number): void;
|
170
212
|
|
@@ -184,13 +226,14 @@ declare class LightingLayer extends PlaceablesLayer<'AmbientLight', LightingLaye
|
|
184
226
|
declare namespace LightingLayer {
|
185
227
|
interface LayerOptions extends PlaceablesLayer.LayerOptions<'AmbientLight'> {
|
186
228
|
name: 'lighting';
|
187
|
-
rotatableObjects: true;
|
188
|
-
quadtree: true;
|
189
|
-
zIndex: 300;
|
190
229
|
}
|
191
230
|
}
|
192
231
|
|
193
|
-
|
232
|
+
type ChannelConfig = Record<'canvas' | 'background' | 'black' | 'bright' | 'dark' | 'dim', LightChannel> & {
|
233
|
+
darkness: { level: number; rgb: [r: number, g: number, b: number] };
|
234
|
+
};
|
235
|
+
|
236
|
+
interface LightChannel {
|
194
237
|
hex: number;
|
195
|
-
rgb: [number, number, number];
|
238
|
+
rgb: [r: number, g: number, b: number];
|
196
239
|
}
|
@@ -119,9 +119,6 @@ declare global {
|
|
119
119
|
interface LayerOptions<Name extends 'background' | 'foreground' = 'background' | 'foreground'>
|
120
120
|
extends PlaceablesLayer.LayerOptions<'Tile'> {
|
121
121
|
name: Name;
|
122
|
-
zIndex: 0;
|
123
|
-
controllableObjects: true;
|
124
|
-
rotatableObjects: true;
|
125
122
|
}
|
126
123
|
|
127
124
|
type DropData =
|
@@ -20,16 +20,16 @@ declare global {
|
|
20
20
|
static get layerOptions(): MapLayer.LayerOptions<'background'>;
|
21
21
|
|
22
22
|
/**
|
23
|
-
* The outline of the scene
|
23
|
+
* The outline of the scene.
|
24
|
+
* Not rendered within the BackgroundLayer, but rather beneath it so it does not impact the PrimaryMesh texture.
|
24
25
|
*/
|
25
26
|
outline: PIXI.Graphics | undefined;
|
26
27
|
|
27
|
-
draw(): Promise<this>;
|
28
|
-
|
29
28
|
/**
|
30
29
|
* Draw a background outline which emphasizes what portion of the canvas is playable space and what is buffer.
|
30
|
+
* @param outline - The outline graphics to use
|
31
31
|
*/
|
32
|
-
|
32
|
+
drawOutline(outline: PIXI.Graphics): void;
|
33
33
|
|
34
34
|
getDocuments(): Exclude<this['documentCollection'], null> | InstanceType<ConfiguredDocumentClassForName<'Tile'>>[];
|
35
35
|
|
@@ -37,6 +37,15 @@ declare global {
|
|
37
37
|
*/
|
38
38
|
protected _drawOcclusionMask(): CachedContainer;
|
39
39
|
|
40
|
+
/**
|
41
|
+
* Perform one-time initialization actions which affect the foreground layer.
|
42
|
+
* These actions presume and require that the layer has already been drawn.
|
43
|
+
*/
|
44
|
+
initialize(): void;
|
45
|
+
|
46
|
+
/** @override */
|
47
|
+
activate(): this;
|
48
|
+
|
40
49
|
deactivate(): this;
|
41
50
|
|
42
51
|
tearDown(): Promise<this>;
|
@@ -50,6 +59,18 @@ declare global {
|
|
50
59
|
*/
|
51
60
|
refresh(): void;
|
52
61
|
|
62
|
+
/**
|
63
|
+
* Add a roof sprite to the occlusion roof mask container
|
64
|
+
* @param tile - The roof tile being added
|
65
|
+
*/
|
66
|
+
addRoofSprite(tile: InstanceType<ConfiguredObjectClassForName<'Tile'>>): void;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Remove a roof sprite from occlusion roof mask container
|
70
|
+
* @param tile - The roof tile being removed
|
71
|
+
*/
|
72
|
+
removeRoofSprite(tile: InstanceType<ConfiguredObjectClassForName<'Tile'>>): void;
|
73
|
+
|
53
74
|
/**
|
54
75
|
* Update occlusion for all tiles on the foreground layer
|
55
76
|
*/
|
package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/notesLayer.d.ts
CHANGED
@@ -47,7 +47,7 @@ declare global {
|
|
47
47
|
protected _onMouseDown(event: PIXI.InteractionEvent): void;
|
48
48
|
|
49
49
|
/**
|
50
|
-
* Handle JournalEntry
|
50
|
+
* Handle JournalEntry document drop data
|
51
51
|
*/
|
52
52
|
protected _onDropData(event: DragEvent, data: DropData<JournalEntry>): Promise<false | void>;
|
53
53
|
}
|
package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/soundsLayer.d.ts
CHANGED
@@ -9,6 +9,12 @@ declare class SoundsLayer extends PlaceablesLayer<'AmbientSound', SoundsLayer.La
|
|
9
9
|
*/
|
10
10
|
livePreview: boolean;
|
11
11
|
|
12
|
+
/**
|
13
|
+
* A mapping of ambient audio sources which are active within the rendered Scene
|
14
|
+
* @defaultValue `new foundry.utils.Collection()`
|
15
|
+
*/
|
16
|
+
sources: foundry.utils.Collection<SoundSource>;
|
17
|
+
|
12
18
|
/**
|
13
19
|
* @remarks This is not overridden in foundry but reflects the real behavior.
|
14
20
|
*/
|
@@ -97,9 +103,11 @@ declare class SoundsLayer extends PlaceablesLayer<'AmbientSound', SoundsLayer.La
|
|
97
103
|
protected _onDragLeftCancel(event: PointerEvent): void;
|
98
104
|
|
99
105
|
/**
|
100
|
-
*
|
106
|
+
* Handle PlaylistSound document drop data.
|
107
|
+
* @param event - The drag drop event
|
108
|
+
* @param data - The dropped transfer data.
|
101
109
|
*/
|
102
|
-
|
110
|
+
protected _onDropData(event: DragEvent, data: unknown): Promise<void>;
|
103
111
|
}
|
104
112
|
|
105
113
|
declare namespace SoundsLayer {
|
package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/tokenLayer.d.ts
CHANGED
@@ -75,18 +75,36 @@ declare global {
|
|
75
75
|
|
76
76
|
/**
|
77
77
|
* Target all Token instances which fall within a coordinate rectangle.
|
78
|
-
*
|
79
|
-
* @param x - The top-left x-coordinate of the selection rectangle
|
80
|
-
* @param y - The top-left y-coordinate of the selection rectangle
|
81
|
-
* @param width - The width of the selection rectangle
|
82
|
-
* @param height - The height of the selection rectangle
|
83
|
-
* @param releaseOthers - Whether or not to release other targeted tokens
|
84
|
-
* (default: `true`)
|
85
78
|
* @returns The number of Token instances which were targeted.
|
86
79
|
*/
|
87
80
|
targetObjects(
|
88
|
-
{
|
89
|
-
|
81
|
+
{
|
82
|
+
x,
|
83
|
+
y,
|
84
|
+
width,
|
85
|
+
height
|
86
|
+
}: {
|
87
|
+
/** The top-left x-coordinate of the selection rectangle */
|
88
|
+
x: number;
|
89
|
+
|
90
|
+
/** The top-left y-coordinate of the selection rectangle */
|
91
|
+
y: number;
|
92
|
+
|
93
|
+
/** The width of the selection rectangle */
|
94
|
+
width: number;
|
95
|
+
|
96
|
+
/** The height of the selection rectangle */
|
97
|
+
height: number;
|
98
|
+
},
|
99
|
+
{
|
100
|
+
releaseOthers
|
101
|
+
}?: {
|
102
|
+
/**
|
103
|
+
* Whether or not to release other targeted tokens
|
104
|
+
* @defaultValue `true`
|
105
|
+
*/
|
106
|
+
releaseOthers?: boolean;
|
107
|
+
}
|
90
108
|
): number;
|
91
109
|
|
92
110
|
/**
|
@@ -105,21 +123,21 @@ declare global {
|
|
105
123
|
* (default: `true`)
|
106
124
|
* @param combat - A Combat encounter from which to add or remove the Token
|
107
125
|
* (default: `null`)
|
108
|
-
* @
|
109
|
-
* (default: `null`)
|
110
|
-
* @returns The updated Combat encounter
|
111
|
-
* @remarks Returns the created Combatants or undefined if there is no combat and one can't be created
|
112
|
-
* or the combat if the user is no GM and wants to remove combatants.
|
126
|
+
* @returns The Combatants added or removed
|
113
127
|
*/
|
114
128
|
toggleCombat(
|
115
129
|
state?: boolean,
|
116
130
|
combat?: InstanceType<ConfiguredDocumentClass<typeof Combat>> | null,
|
117
|
-
{
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
131
|
+
{
|
132
|
+
token
|
133
|
+
}?: {
|
134
|
+
/**
|
135
|
+
* A specific Token which is the origin of the group toggle request
|
136
|
+
* @defaultValue `null`
|
137
|
+
*/
|
138
|
+
token?: InstanceType<ConfiguredObjectClassForName<'Token'>> | null;
|
139
|
+
}
|
140
|
+
): Promise<InstanceType<ConfiguredDocumentClass<typeof Combatant>>[]>;
|
123
141
|
|
124
142
|
/**
|
125
143
|
* Get the tab cycle order for tokens by sorting observable tokens based on their distance from top-left.
|
@@ -138,6 +156,9 @@ declare global {
|
|
138
156
|
event: DragEvent,
|
139
157
|
data: TokenLayer.DropData
|
140
158
|
): Promise<void | false | InstanceType<ConfiguredObjectClassForName<'Token'>>>;
|
159
|
+
|
160
|
+
/** @override */
|
161
|
+
protected _onClickLeft(event: PIXI.InteractionEvent): void;
|
141
162
|
}
|
142
163
|
|
143
164
|
namespace TokenLayer {
|