@league-of-foundry-developers/foundry-vtt-types 0.8.9-6 → 9.238.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 +44 -27
- package/index-lenient.d.ts +10 -0
- package/index.d.ts +2 -2
- package/package.json +43 -15
- package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +30 -12
- package/src/foundry/common/config.mjs/index.d.ts +1 -0
- package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
- package/src/foundry/common/constants.mjs.d.ts +402 -213
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
- package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
- package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
- package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
- package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +72 -66
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
- package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
- package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
- package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
- package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
- package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
- package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
- package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
- package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
- package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
- package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
- package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
- package/src/foundry/common/data/fields.mjs.d.ts +180 -83
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
- package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
- package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
- package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
- package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
- package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
- package/src/foundry/common/documents.mjs/index.d.ts +3 -0
- package/src/foundry/common/module.mjs.d.ts +3 -0
- package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
- package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
- package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
- package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
- package/src/foundry/common/types.mjs.d.ts +100 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
- package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
- package/src/foundry/foundry.js/application.d.ts +4 -7
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
- package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +116 -116
- package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +6 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +4 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +187 -148
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -3
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +142 -155
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
- package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
- package/src/foundry/foundry.js/canvas.d.ts +150 -47
- package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
- package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
- package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
- package/src/foundry/foundry.js/config.d.ts +494 -902
- package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
- package/src/foundry/foundry.js/game.d.ts +86 -11
- package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
- package/src/foundry/foundry.js/hooks.d.ts +57 -0
- package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
- package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
- package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
- package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- package/src/foundry/foundry.js/pointSource.d.ts +174 -86
- package/src/foundry/foundry.js/roll.d.ts +25 -36
- package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
- package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
- package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
- package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
- package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
- package/src/foundry/foundry.js/textEditor.d.ts +40 -9
- package/src/foundry/index.d.ts +5 -0
- package/src/types/utils.d.ts +11 -3
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -4,9 +4,9 @@
|
|
4
4
|
*/
|
5
5
|
declare class CameraPopoutAppWrapper {
|
6
6
|
/**
|
7
|
-
* @param view- The CameraViews application that this popout belongs to
|
8
|
-
* @param userId- ID of the user this popout belongs to
|
9
|
-
* @param element- The div element of this specific popout window
|
7
|
+
* @param view - The CameraViews application that this popout belongs to
|
8
|
+
* @param userId - ID of the user this popout belongs to
|
9
|
+
* @param element - The div element of this specific popout window
|
10
10
|
*/
|
11
11
|
constructor(view: CameraViews, userId: string, element: JQuery);
|
12
12
|
|
@@ -25,16 +25,21 @@ declare class CameraPopoutAppWrapper {
|
|
25
25
|
*/
|
26
26
|
userId: string;
|
27
27
|
|
28
|
+
/** @defaultValue `true` */
|
29
|
+
popOut: boolean;
|
30
|
+
|
31
|
+
/** @defaultValue `{}` */
|
32
|
+
options: Record<string, unknown>;
|
33
|
+
|
28
34
|
/**
|
29
35
|
* Get the current position of this popout window
|
30
36
|
*/
|
31
37
|
get position(): Application.Position;
|
32
38
|
|
33
|
-
|
34
|
-
setPosition({ left, top, width, height, scale }?: Partial<Application.Position>): void;
|
39
|
+
setPosition(options?: Partial<Application.Position>): (Application.Position & { height: number }) | void;
|
35
40
|
|
36
|
-
|
41
|
+
/** @internal */
|
42
|
+
protected _onResize(event: Event): void;
|
37
43
|
|
38
|
-
/** @override */
|
39
44
|
bringToTop(): void;
|
40
45
|
}
|
@@ -13,7 +13,7 @@ import { BaseScene } from '../common/documents.mjs';
|
|
13
13
|
* @example <caption>Example Canvas commands</caption>
|
14
14
|
* ```typescript
|
15
15
|
* canvas.ready; // Is the canvas ready for use?
|
16
|
-
* canvas.scene; // The currently viewed Scene
|
16
|
+
* canvas.scene; // The currently viewed Scene document.
|
17
17
|
* canvas.dimensions; // The dimensions of the current Scene.
|
18
18
|
* canvas.draw(); // Completely re-draw the game canvas (this is usually unnecessary).
|
19
19
|
* canvas.pan(x, y, zoom); // Pan the canvas to new coordinates and scale.
|
@@ -107,16 +107,44 @@ declare global {
|
|
107
107
|
*/
|
108
108
|
blurFilters: PIXI.filters.BlurFilter[];
|
109
109
|
|
110
|
+
/**
|
111
|
+
* A reference to the MouseInteractionManager that is currently controlling pointer-based interaction, or null.
|
112
|
+
*/
|
113
|
+
currentMouseManager: MouseInteractionManager<PIXI.Container> | null;
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Record framerate performance data
|
117
|
+
*/
|
118
|
+
fps: {
|
119
|
+
/** @defaultValue `[]` */
|
120
|
+
values: number[];
|
121
|
+
|
122
|
+
/** @defaultValue `0` */
|
123
|
+
last: number;
|
124
|
+
|
125
|
+
/** @defaultValue `0` */
|
126
|
+
average: number;
|
127
|
+
|
128
|
+
/** @defaultValue `0` */
|
129
|
+
render: number;
|
130
|
+
|
131
|
+
/** @defaultValue `document.getElementById("fps")` */
|
132
|
+
element: HTMLElement;
|
133
|
+
|
134
|
+
/** @defaultValue `undefined` */
|
135
|
+
fn: TickerCallback<void> | undefined;
|
136
|
+
};
|
137
|
+
|
110
138
|
/**
|
111
139
|
* The singleton interaction manager instance which handles mouse interaction on the Canvas.
|
112
140
|
*/
|
113
141
|
mouseInteractionManager: MouseInteractionManager<PIXI.Container> | undefined;
|
114
142
|
|
115
143
|
/**
|
116
|
-
*
|
117
|
-
* @defaultValue `
|
144
|
+
* The renderer screen dimensions.
|
145
|
+
* @defaultValue `[0, 0]`
|
118
146
|
*/
|
119
|
-
|
147
|
+
screenDimensions: [x: number, y: number];
|
120
148
|
|
121
149
|
/**
|
122
150
|
* Initialize the Canvas by creating the HTML element and PIXI application.
|
@@ -125,39 +153,53 @@ declare global {
|
|
125
153
|
*/
|
126
154
|
initialize(): void;
|
127
155
|
|
128
|
-
app
|
156
|
+
app?: PIXI.Application;
|
157
|
+
|
158
|
+
stage?: PIXI.Container;
|
159
|
+
|
160
|
+
protected _dragDrop?: DragDrop;
|
161
|
+
|
162
|
+
outline?: PIXI.Graphics;
|
163
|
+
|
164
|
+
msk?: PIXI.Graphics;
|
165
|
+
|
166
|
+
readonly primary?: PrimaryCanvasGroup;
|
129
167
|
|
130
|
-
|
168
|
+
readonly effects?: EffectsCanvasGroup;
|
131
169
|
|
132
|
-
|
170
|
+
readonly interface?: InterfaceCanvasGroup;
|
133
171
|
|
134
|
-
background
|
172
|
+
readonly background?: BackgroundLayer;
|
135
173
|
|
136
|
-
drawings
|
174
|
+
readonly drawings?: DrawingsLayer;
|
137
175
|
|
138
|
-
grid
|
176
|
+
readonly grid?: GridLayer;
|
139
177
|
|
140
|
-
walls
|
178
|
+
readonly walls?: WallsLayer;
|
141
179
|
|
142
|
-
templates
|
180
|
+
readonly templates?: TemplateLayer;
|
143
181
|
|
144
|
-
notes
|
182
|
+
readonly notes?: NotesLayer;
|
145
183
|
|
146
|
-
tokens
|
184
|
+
readonly tokens?: TokenLayer;
|
147
185
|
|
148
|
-
foreground
|
186
|
+
readonly foreground?: ForegroundLayer;
|
149
187
|
|
150
|
-
sounds
|
188
|
+
readonly sounds?: SoundsLayer;
|
151
189
|
|
152
|
-
lighting
|
190
|
+
readonly lighting?: LightingLayer;
|
153
191
|
|
154
|
-
sight
|
192
|
+
readonly sight?: SightLayer;
|
155
193
|
|
156
|
-
|
194
|
+
readonly weather?: WeatherLayer;
|
157
195
|
|
158
|
-
controls
|
196
|
+
readonly controls?: ControlsLayer;
|
159
197
|
|
160
|
-
|
198
|
+
/**
|
199
|
+
* Display warnings for known performance issues which may occur due to the user's hardware or browser configuration
|
200
|
+
* @internal
|
201
|
+
*/
|
202
|
+
protected _displayPerformanceWarnings(): void;
|
161
203
|
|
162
204
|
/**
|
163
205
|
* The id of the currently displayed Scene.
|
@@ -180,10 +222,10 @@ declare global {
|
|
180
222
|
get activeLayer(): CanvasLayer | null;
|
181
223
|
|
182
224
|
/**
|
183
|
-
*
|
184
|
-
* @
|
225
|
+
* Initialize the group containers of the game Canvas.
|
226
|
+
* @internal
|
185
227
|
*/
|
186
|
-
protected
|
228
|
+
protected _createGroups(): void;
|
187
229
|
|
188
230
|
/**
|
189
231
|
* When re-drawing the canvas, first tear down or discontinue some existing processes
|
@@ -197,6 +239,15 @@ declare global {
|
|
197
239
|
*/
|
198
240
|
draw(scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>>): Promise<this>;
|
199
241
|
|
242
|
+
performance?: PerformanceSettings;
|
243
|
+
|
244
|
+
/**
|
245
|
+
* Get the value of a GL parameter
|
246
|
+
* @param parameter - The GL parameter to retrieve
|
247
|
+
* @returns The returned value type depends of the parameter to retrieve
|
248
|
+
*/
|
249
|
+
getGLParameter(parameter: string): unknown;
|
250
|
+
|
200
251
|
/**
|
201
252
|
* Get the canvas active dimensions based on the size of the scene's map.
|
202
253
|
* We expand the image size by a factor of 1.5 and round to the nearest 2x grid size.
|
@@ -206,6 +257,12 @@ declare global {
|
|
206
257
|
*/
|
207
258
|
static getDimensions(data: Canvas.DimensionsData): Canvas.Dimensions;
|
208
259
|
|
260
|
+
/**
|
261
|
+
* Configure performance settings for hte canvas application based on the selected performance mode
|
262
|
+
* @internal
|
263
|
+
*/
|
264
|
+
protected _configurePerformanceMode(): PerformanceSettings;
|
265
|
+
|
209
266
|
/**
|
210
267
|
* Once the canvas is drawn, initialize control, visibility, and audio states
|
211
268
|
*/
|
@@ -229,25 +286,6 @@ declare global {
|
|
229
286
|
*/
|
230
287
|
protected _initializeTokenControl(): void;
|
231
288
|
|
232
|
-
/**
|
233
|
-
* Get a reference to the a specific CanvasLayer by it's name
|
234
|
-
* @param layerName - The name of the canvas layer to get
|
235
|
-
*/
|
236
|
-
getLayer(layerName: 'BackgroundLayer'): BackgroundLayer | null;
|
237
|
-
getLayer(layerName: 'DrawingsLayer'): DrawingsLayer | null;
|
238
|
-
getLayer(layerName: 'GridLayer'): GridLayer | null;
|
239
|
-
getLayer(layerName: 'WallsLayer'): WallsLayer | null;
|
240
|
-
getLayer(layerName: 'TemplateLayer'): TemplateLayer | null;
|
241
|
-
getLayer(layerName: 'NotesLayer'): NotesLayer | null;
|
242
|
-
getLayer(layerName: 'TokenLayer'): TokenLayer | null;
|
243
|
-
getLayer(layerName: 'ForegroundLayer'): ForegroundLayer | null;
|
244
|
-
getLayer(layerName: 'SoundsLayer'): SoundsLayer | null;
|
245
|
-
getLayer(layerName: 'LightingLayer'): LightingLayer | null;
|
246
|
-
getLayer(layerName: 'SightLayer'): SightLayer | null;
|
247
|
-
getLayer(layerName: 'EffectsLayer'): EffectsLayer | null;
|
248
|
-
getLayer(layerName: 'ControlsLayer'): ControlsLayer | null;
|
249
|
-
getLayer(layerName: string): CanvasLayer | null;
|
250
|
-
|
251
289
|
/**
|
252
290
|
* Given an embedded object name, get the canvas layer for that object
|
253
291
|
*/
|
@@ -261,6 +299,22 @@ declare global {
|
|
261
299
|
*/
|
262
300
|
activateLayer(layerName: LayerName): void;
|
263
301
|
|
302
|
+
/**
|
303
|
+
* Activate framerate tracking by adding an HTML element to the display and refreshing it every frame.
|
304
|
+
*/
|
305
|
+
activateFPSMeter(): void;
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Deactivate framerate tracking by canceling ticker updates and removing the HTML element.
|
309
|
+
*/
|
310
|
+
deactivateFPSMeter(): void;
|
311
|
+
|
312
|
+
/**
|
313
|
+
* Measure average framerate per second over the past 30 frames
|
314
|
+
* @internal
|
315
|
+
*/
|
316
|
+
protected _measureFPS(): void;
|
317
|
+
|
264
318
|
/**
|
265
319
|
* Pan the canvas to a certain \{x,y\} coordinate and a certain zoom level
|
266
320
|
* @param options - (default: `{}`)
|
@@ -285,6 +339,11 @@ declare global {
|
|
285
339
|
*/
|
286
340
|
recenter(coordinates?: PanView): ReturnType<this['animatePan']>;
|
287
341
|
|
342
|
+
/**
|
343
|
+
* Highlight objects on any layers which are visible
|
344
|
+
*/
|
345
|
+
highlightObjects(active: boolean): void;
|
346
|
+
|
288
347
|
/**
|
289
348
|
* Get the constrained zoom scale parameter which is allowed by the maxZoom parameter
|
290
349
|
* @param x - The requested x-coordinate
|
@@ -305,6 +364,12 @@ declare global {
|
|
305
364
|
*/
|
306
365
|
protected updateBlur(scale?: number): void;
|
307
366
|
|
367
|
+
/**
|
368
|
+
* Sets the background color.
|
369
|
+
* @param color - The color to set the canvas background to.
|
370
|
+
*/
|
371
|
+
setBackgroundColor(color: string): void;
|
372
|
+
|
308
373
|
/**
|
309
374
|
* Attach event listeners to the game canvas to handle click and interaction events
|
310
375
|
*/
|
@@ -399,8 +464,9 @@ declare global {
|
|
399
464
|
|
400
465
|
/**
|
401
466
|
* Event handler for the drop portion of a drag-and-drop event.
|
467
|
+
* @internal
|
402
468
|
*/
|
403
|
-
protected _onDrop(event: DragEvent):
|
469
|
+
protected _onDrop(event: DragEvent): void;
|
404
470
|
|
405
471
|
/**
|
406
472
|
* Add a pending canvas operation that should fire once the socket handling workflow concludes.
|
@@ -419,9 +485,25 @@ declare global {
|
|
419
485
|
triggerPendingOperations(): void;
|
420
486
|
|
421
487
|
/**
|
422
|
-
*
|
423
|
-
|
424
|
-
|
488
|
+
* Get a reference to the a specific CanvasLayer by it's name
|
489
|
+
* @param layerName - The name of the canvas layer to get
|
490
|
+
* (unused)
|
491
|
+
* @deprecated since v9, will be deleted in v10
|
492
|
+
*/
|
493
|
+
getLayer(layerName: any): {
|
494
|
+
BackgroundLayer: Canvas['background'];
|
495
|
+
DrawingsLayer: Canvas['drawings'];
|
496
|
+
GridLayer: Canvas['grid'];
|
497
|
+
TemplateLayer: Canvas['templates'];
|
498
|
+
TokenLayer: Canvas['tokens'];
|
499
|
+
WallsLayer: Canvas['walls'];
|
500
|
+
LightingLayer: Canvas['lighting'];
|
501
|
+
WeatherLayer: Canvas['weather'];
|
502
|
+
SightLayer: Canvas['sight'];
|
503
|
+
SoundsLayer: Canvas['sounds'];
|
504
|
+
NotesLayer: Canvas['notes'];
|
505
|
+
ControlsLayer: Canvas['controls'];
|
506
|
+
};
|
425
507
|
}
|
426
508
|
|
427
509
|
namespace Canvas {
|
@@ -454,6 +536,27 @@ declare global {
|
|
454
536
|
}
|
455
537
|
}
|
456
538
|
|
539
|
+
type TickerCallback<T> = (this: T, dt: number) => any;
|
540
|
+
|
541
|
+
interface PerformanceSettings {
|
542
|
+
mode: foundry.CONST.CANVAS_PERFORMANCE_MODES;
|
543
|
+
blur: {
|
544
|
+
enabled: boolean;
|
545
|
+
illumination: boolean;
|
546
|
+
};
|
547
|
+
mipmap: 'ON' | 'OFF';
|
548
|
+
msaa: boolean;
|
549
|
+
fps: number;
|
550
|
+
tokenAnimation: boolean;
|
551
|
+
lightAnimation: boolean;
|
552
|
+
textures: {
|
553
|
+
enabled: boolean;
|
554
|
+
maxSize: number;
|
555
|
+
p2Steps: number;
|
556
|
+
p2StepsMax: number;
|
557
|
+
};
|
558
|
+
}
|
559
|
+
|
457
560
|
interface PanView {
|
458
561
|
/**
|
459
562
|
* The x-coordinate of the pan destination
|
@@ -27,6 +27,13 @@ declare class CanvasDocumentMixin<T extends foundry.abstract.Document<any, any>>
|
|
27
27
|
*/
|
28
28
|
protected _object: PlaceableObject | null; // TODO: Replace with InstanceType<ObjectClass<T>> | null once the circular reference problem has been solved
|
29
29
|
|
30
|
+
/**
|
31
|
+
* Has this object been deliberately destroyed as part of the deletion workflow?
|
32
|
+
* @internal
|
33
|
+
* @defaultValue `false`
|
34
|
+
*/
|
35
|
+
protected _destroyed: boolean;
|
36
|
+
|
30
37
|
/**
|
31
38
|
* A lazily constructed PlaceableObject instance which can represent this Document on the game canvas.
|
32
39
|
*/
|
@@ -0,0 +1,210 @@
|
|
1
|
+
import type { ConfiguredDocumentClassForName } from '../../types/helperTypes';
|
2
|
+
import type { Request } from '../common/abstract/backend.mjs';
|
3
|
+
import type Document from '../common/abstract/document.mjs';
|
4
|
+
|
5
|
+
declare global {
|
6
|
+
/**
|
7
|
+
* The client-side database backend implementation which handles Document modification operations.
|
8
|
+
*/
|
9
|
+
class ClientDatabaseBackend extends foundry.abstract.DatabaseBackend {
|
10
|
+
/**
|
11
|
+
* Activate the Socket event listeners used to receive responses from events which modify database documents
|
12
|
+
* @param socket - The active game socket
|
13
|
+
*/
|
14
|
+
activateSocketListeners(socket: io.Socket): void;
|
15
|
+
|
16
|
+
/** @override */
|
17
|
+
protected _getDocuments<T extends Document<any, any>>(
|
18
|
+
documentClass: ConstructorOf<T>,
|
19
|
+
request: Request,
|
20
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
21
|
+
): Promise<T[]>;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @override
|
25
|
+
* @remarks
|
26
|
+
* Get operations for embedded Documents are currently un-supported.
|
27
|
+
* The returned promise always rejects.
|
28
|
+
*/
|
29
|
+
protected _getEmbeddedDocuments<T extends Document<any, any>>(
|
30
|
+
documentClass: ConstructorOf<T>,
|
31
|
+
parent: T extends Document<any, infer U> ? U : never,
|
32
|
+
request: Request,
|
33
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
34
|
+
): Promise<never>;
|
35
|
+
|
36
|
+
/** @override */
|
37
|
+
protected _createDocuments<T extends Document<any, any>>(
|
38
|
+
documentClass: ConstructorOf<T>,
|
39
|
+
request: Request,
|
40
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
41
|
+
): Promise<T[]>;
|
42
|
+
|
43
|
+
/** @override */
|
44
|
+
protected _createEmbeddedDocuments<T extends Document<any, any>>(
|
45
|
+
documentClass: ConstructorOf<T>,
|
46
|
+
parent: T extends Document<any, infer U> ? U : never,
|
47
|
+
request: Request,
|
48
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
49
|
+
): Promise<T[]>;
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Perform a standardized pre-creation workflow for all Document types. For internal use only.
|
53
|
+
* @internal
|
54
|
+
*/
|
55
|
+
protected _preCreateDocumentArray<T extends Document<any, any>>(
|
56
|
+
documentClass: ConstructorOf<T>,
|
57
|
+
{
|
58
|
+
data,
|
59
|
+
options,
|
60
|
+
pack,
|
61
|
+
parent,
|
62
|
+
user
|
63
|
+
}: Pick<Request, 'data' | 'pack' | 'parent' | 'options'> & {
|
64
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>;
|
65
|
+
}
|
66
|
+
): Promise<T[]>;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Handle a SocketResponse from the server when one or multiple documents were created
|
70
|
+
* @param response - The provided Socket response
|
71
|
+
* @returns An Array of created Document instances
|
72
|
+
*/
|
73
|
+
protected _handleCreateDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Handle a SocketResponse from the server when one or multiple documents were created
|
77
|
+
* @param response - The provided Socket response
|
78
|
+
* @returns An Array of created Document instances
|
79
|
+
*/
|
80
|
+
protected _handleCreateEmbeddedDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Perform a standardized post-creation workflow for all Document types. For internal use only.
|
84
|
+
* @returns An array of callback operations to perform once every Document is created
|
85
|
+
* @internal
|
86
|
+
*/
|
87
|
+
protected _postCreateDocumentCallbacks(
|
88
|
+
type: string,
|
89
|
+
collection: Collection<foundry.abstract.Document<any, any>>,
|
90
|
+
result: object[],
|
91
|
+
{ options, userId, parent, pack }: Pick<Request, 'options' | 'parent' | 'pack'> & { userId?: string }
|
92
|
+
): (() => void)[];
|
93
|
+
|
94
|
+
/** @override */
|
95
|
+
protected _updateDocuments<T extends Document<any, any>>(
|
96
|
+
documentClass: ConstructorOf<T>,
|
97
|
+
request: Request,
|
98
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
99
|
+
): Promise<T[]>;
|
100
|
+
|
101
|
+
/** @override */
|
102
|
+
protected _updateEmbeddedDocuments<T extends Document<any, any>>(
|
103
|
+
documentClass: ConstructorOf<T>,
|
104
|
+
parent: T extends Document<any, infer U> ? U : never,
|
105
|
+
request: Request,
|
106
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
107
|
+
): Promise<T[]>;
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Perform a standardized pre-update workflow for all Document types. For internal use only.
|
111
|
+
* @internal
|
112
|
+
*/
|
113
|
+
protected _preUpdateDocumentArray<T extends Document<any, any>>(
|
114
|
+
collection: Collection<T>,
|
115
|
+
{
|
116
|
+
updates,
|
117
|
+
options,
|
118
|
+
user
|
119
|
+
}: Pick<Request, 'updates' | 'options'> & {
|
120
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>;
|
121
|
+
}
|
122
|
+
): Promise<T[]>;
|
123
|
+
|
124
|
+
/**
|
125
|
+
* Handle a SocketResponse from the server when one or multiple documents were updated
|
126
|
+
* @param response - The provided Socket response
|
127
|
+
* @returns An Array of updated Document instances
|
128
|
+
*/
|
129
|
+
protected _handleUpdateDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
|
130
|
+
|
131
|
+
/**
|
132
|
+
* Handle a SocketResponse from the server when embedded Documents are updated in a parent Document.
|
133
|
+
* @param response - The provided Socket response
|
134
|
+
* @returns An Array of updated Document instances
|
135
|
+
*/
|
136
|
+
protected _handleUpdateEmbeddedDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Perform a standardized post-update workflow for all Document types. For internal use only.
|
140
|
+
* @returns An array of callback operations to perform after every Document is updated
|
141
|
+
* @internal
|
142
|
+
*/
|
143
|
+
protected _postUpdateDocumentCallbacks(
|
144
|
+
collection: Collection<foundry.abstract.Document<any, any>>,
|
145
|
+
result: object[],
|
146
|
+
{ options, userId }: Pick<Request, 'options'> & { userId?: string }
|
147
|
+
): () => void;
|
148
|
+
|
149
|
+
/** @override */
|
150
|
+
protected _deleteDocuments<T extends Document<any, any>>(
|
151
|
+
documentClass: ConstructorOf<T>,
|
152
|
+
request: Request,
|
153
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
154
|
+
): Promise<T[]>;
|
155
|
+
|
156
|
+
/** @override */
|
157
|
+
protected _deleteEmbeddedDocuments<T extends Document<any, any>>(
|
158
|
+
documentClass: ConstructorOf<T>,
|
159
|
+
parent: T extends Document<any, infer U> ? U : never,
|
160
|
+
request: Request,
|
161
|
+
user: InstanceType<ConfiguredDocumentClassForName<'User'>>
|
162
|
+
): Promise<T[]>;
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Perform a standardized pre-delete workflow for all Document types. For internal use only.
|
166
|
+
* @internal
|
167
|
+
*/
|
168
|
+
protected _preDeleteDocumentArray<T extends Document<any, any>>(
|
169
|
+
collection: Collection<T>,
|
170
|
+
{
|
171
|
+
ids,
|
172
|
+
options,
|
173
|
+
user
|
174
|
+
}: Pick<Request, 'ids' | 'options'> & { user: InstanceType<ConfiguredDocumentClassForName<'User'>> }
|
175
|
+
): Promise<T[]>;
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Handle a SocketResponse from the server where Documents are deleted.
|
179
|
+
* @param response - The provided Socket response
|
180
|
+
* @returns An Array of deleted Document instances
|
181
|
+
*/
|
182
|
+
protected _handleDeleteDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
|
183
|
+
|
184
|
+
/**
|
185
|
+
* Handle a SocketResponse from the server when embedded Documents are deleted from a parent Document.
|
186
|
+
* @param response - The provided Socket response
|
187
|
+
* @returns An Array of deleted Document instances
|
188
|
+
*/
|
189
|
+
protected _handleDeleteEmbeddedDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Perform a standardized post-deletion workflow for all Document types. For internal use only.
|
193
|
+
* @returns An array of callback operations to perform after every Document is deleted
|
194
|
+
* @internal
|
195
|
+
*/
|
196
|
+
protected _postDeleteDocumentCallbacks(
|
197
|
+
collection: Collection<foundry.abstract.Document<any, any>>,
|
198
|
+
result: object[],
|
199
|
+
{ options, userId }: Pick<Request, 'options'> & { userId?: string }
|
200
|
+
): (() => void)[];
|
201
|
+
|
202
|
+
/** @override */
|
203
|
+
getFlagScopes(): string[];
|
204
|
+
|
205
|
+
/** @override */
|
206
|
+
getCompendiumScopes(): string[];
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
export {};
|