@league-of-foundry-developers/foundry-vtt-types 0.8.9-3 → 0.8.9-4
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/package.json +1 -1
- package/src/foundry/common/constants.mjs.d.ts +31 -30
- package/src/foundry/common/data/data.mjs/index.d.ts +2 -0
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +182 -0
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +162 -0
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +8 -1
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +20 -1
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +34 -33
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +4 -1
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +4 -4
- package/src/foundry/foundry.js/chatBubbles.d.ts +5 -0
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +211 -6
- package/src/foundry/foundry.js/clientDocuments/tableResult.d.ts +30 -0
- package/src/foundry/foundry.js/config.d.ts +1 -1
- package/src/foundry/foundry.js/globalVariables.d.ts +13 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +47 -68
- package/src/foundry/foundry.js/pixi/filters/abstractBaseMaskFilter.d.ts +4 -3
- package/src/foundry/foundry.js/pixi/filters/abstractBaseMaskFilters/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/filters/abstractBaseMaskFilters/inverseOcclusionMaskFilter.d.ts +18 -0
- package/src/foundry/foundry.js/pixi/filters/index.d.ts +1 -0
- package/src/foundry/foundry.js/specialEffect.d.ts +34 -12
- package/src/foundry/foundry.js/specialEffects/autumnLeavesWeatherEffect.d.ts +28 -7
- package/src/foundry/foundry.js/specialEffects/index.d.ts +3 -0
- package/src/foundry/foundry.js/specialEffects/rainWeatherEffect.d.ts +16 -6
- package/src/foundry/foundry.js/specialEffects/snowWeatherEffect.d.ts +11 -4
- package/src/foundry/foundry.js/videoHelper.d.ts +9 -14
- package/src/foundry/index.d.ts +2 -4
@@ -1,16 +1,221 @@
|
|
1
|
-
|
1
|
+
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
|
+
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
+
|
2
4
|
declare global {
|
3
5
|
/**
|
4
|
-
* The client-side RollTable document which extends the common BaseRollTable
|
6
|
+
* The client-side RollTable document which extends the common BaseRollTable model.
|
5
7
|
* Each RollTable document contains RollTableData which defines its data schema.
|
6
8
|
*
|
7
9
|
* @see {@link data.RollTableData} The RollTable data schema
|
8
10
|
* @see {@link documents.RollTables} The world-level collection of RollTable documents
|
9
11
|
* @see {@link applications.RollTableConfig} The RollTable configuration application
|
10
|
-
*
|
11
|
-
* @param data - Initial data provided to construct the RollTable document
|
12
12
|
*/
|
13
|
-
class RollTable extends ClientDocumentMixin(foundry.documents.BaseRollTable) {
|
14
|
-
|
13
|
+
class RollTable extends ClientDocumentMixin(foundry.documents.BaseRollTable) {
|
14
|
+
/**
|
15
|
+
* @param data - Initial data provided to construct the RollTable document
|
16
|
+
* @param context - The document context, see {@link foundry.abstract.Document}
|
17
|
+
*/
|
18
|
+
constructor(
|
19
|
+
data: ConstructorParameters<typeof foundry.documents.BaseRollTable>[0],
|
20
|
+
context?: ConstructorParameters<typeof foundry.documents.BaseRollTable>[1]
|
21
|
+
);
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Display a result drawn from a RollTable in the Chat Log along.
|
25
|
+
* Optionally also display the Roll which produced the result and configure aspects of the displayed messages.
|
26
|
+
*
|
27
|
+
* @param results - An Array of one or more TableResult Documents which were drawn and should be displayed
|
28
|
+
* @param options - Additional options which modify message creation
|
29
|
+
*/
|
30
|
+
toMessage(
|
31
|
+
results: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseTableResult>>[],
|
32
|
+
options?: Partial<RollTable.ToMessageOptions>
|
33
|
+
): Promise<InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseChatMessage>> | undefined>;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Draw a result from the RollTable based on the table formula or a provided Roll instance
|
37
|
+
* @param options - Optional arguments which customize the draw behavior
|
38
|
+
* @returns A Promise which resolves to an object containing the executed roll and the produced results
|
39
|
+
*/
|
40
|
+
draw(options?: RollTable.DrawOptions): Promise<RollTableDraw>;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Draw multiple results from a RollTable, constructing a final synthetic Roll as a dice pool of inner rolls.
|
44
|
+
* @param number - The number of results to draw
|
45
|
+
* @param options - Optional arguments which customize the draw
|
46
|
+
* @returns The drawn results
|
47
|
+
*/
|
48
|
+
drawMany(number: number, options?: Partial<RollTable.DrawOptions>): Promise<RollTableDraw>;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Normalize the probabilities of rolling each item in the RollTable based on their assigned weights
|
52
|
+
*/
|
53
|
+
normalize(): Promise<this | undefined>;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Reset the state of the RollTable to return any drawn items to the table
|
57
|
+
* @remarks Actually, returns list of TableEntries updated, not the RollTable.
|
58
|
+
* As written, it force updates all records, not just the ones already drawn.
|
59
|
+
*/
|
60
|
+
reset(): Promise<InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseTableResult>>[]>;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Evaluate a RollTable by rolling its formula and retrieving a drawn result.
|
64
|
+
*
|
65
|
+
* Note that this function only performs the roll and identifies the result, the RollTable#draw function should be
|
66
|
+
* called to formalize the draw from the table.
|
67
|
+
*
|
68
|
+
* @example
|
69
|
+
* ```typescript
|
70
|
+
* // Draw results using the default table formula
|
71
|
+
* const defaultResults = await table.roll();
|
72
|
+
*
|
73
|
+
* // Draw results using a custom roll formula
|
74
|
+
* const roll = new Roll("1d20 + @abilities.wis.mod", actor.getRollData());
|
75
|
+
* const customResults = await table.roll({roll});
|
76
|
+
* ```
|
77
|
+
*/
|
78
|
+
roll(options?: RollTable.RollOptions): Promise<RollTableDraw>;
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Get an Array of valid results for a given rolled total
|
82
|
+
* @param value - The rolled value
|
83
|
+
* @returns An Array of results
|
84
|
+
*/
|
85
|
+
getResultsForRoll(value: number): InstanceType<ConfiguredDocumentClass<typeof TableResult>>[];
|
86
|
+
|
87
|
+
/** @override */
|
88
|
+
protected _onCreateEmbeddedDocuments(
|
89
|
+
embeddedName: string,
|
90
|
+
documents: foundry.abstract.Document<any, any>[],
|
91
|
+
result: Record<string, unknown>[],
|
92
|
+
options: DocumentModificationOptions,
|
93
|
+
userId: string
|
94
|
+
): void;
|
95
|
+
|
96
|
+
/** @override */
|
97
|
+
_onDeleteEmbeddedDocuments(
|
98
|
+
embeddedName: string,
|
99
|
+
documents: InstanceType<ConfiguredDocumentClass<typeof TableResult>>[],
|
100
|
+
result: string[],
|
101
|
+
options: DocumentModificationContext,
|
102
|
+
userId: string
|
103
|
+
): void;
|
104
|
+
|
105
|
+
/** @override */
|
106
|
+
toCompendium(pack?: CompendiumCollection<CompendiumCollection.Metadata>): Omit<
|
107
|
+
foundry.data.RollTableData['_source'],
|
108
|
+
'_id' | 'folder' | 'permission'
|
109
|
+
> & {
|
110
|
+
permission?: foundry.data.RollTableData extends { toObject(): infer U } ? U : never;
|
111
|
+
};
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Create a new RollTable entity using all of the Entities from a specific Folder as new results.
|
115
|
+
* @param folder - The Folder entity from which to create a roll table
|
116
|
+
* @param options - Additional options passed to the RollTable.create method
|
117
|
+
*/
|
118
|
+
static fromFolder(
|
119
|
+
folder: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseFolder>>,
|
120
|
+
options?: DocumentModificationOptions
|
121
|
+
): Promise<InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseRollTable>> | undefined>;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* The RollTable#getTableResult method is deprecated in favor of RollTable#results#get and will be removed in 0.9.0
|
125
|
+
* @deprecated since 0.8.0
|
126
|
+
*/
|
127
|
+
getTableResult(id: string): ReturnType<this['results']['get']>;
|
128
|
+
}
|
15
129
|
|
130
|
+
namespace RollTable {
|
131
|
+
/**
|
132
|
+
* Optional arguments which customize the draw
|
133
|
+
*/
|
134
|
+
interface DrawOptions {
|
135
|
+
/**
|
136
|
+
* An existing Roll instance to use for drawing from the table
|
137
|
+
*/
|
138
|
+
roll: Roll;
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Allow drawing recursively from inner RollTable results
|
142
|
+
* @defaultValue `true`
|
143
|
+
*/
|
144
|
+
recursive: boolean;
|
145
|
+
|
146
|
+
/**
|
147
|
+
* One or more table results which have been drawn
|
148
|
+
* @defaultValue `[]`
|
149
|
+
*/
|
150
|
+
results: foundry.data.TableResultData[];
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Whether to automatically display the results in chat
|
154
|
+
* @defaultValue `true`
|
155
|
+
*/
|
156
|
+
displayChat: boolean;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* The chat roll mode to use when displaying the result
|
160
|
+
*/
|
161
|
+
rollMode: foundry.CONST.DiceRollMode;
|
162
|
+
}
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Additional options which modify message creation
|
166
|
+
*/
|
167
|
+
interface ToMessageOptions {
|
168
|
+
/**
|
169
|
+
* An optional Roll instance which produced the drawn results
|
170
|
+
*/
|
171
|
+
roll: Roll | null;
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Additional data which customizes the created messages
|
175
|
+
* @defaultValue `{}`
|
176
|
+
*/
|
177
|
+
messageData: ConstructorParameters<typeof foundry.documents.BaseChatMessage>[0];
|
178
|
+
|
179
|
+
/**
|
180
|
+
* Additional options which customize the created messages
|
181
|
+
* @defaultValue `{}`
|
182
|
+
*/
|
183
|
+
messageOptions: ConstructorParameters<typeof foundry.documents.BaseChatMessage>[1];
|
184
|
+
}
|
185
|
+
|
186
|
+
interface RollOptions {
|
187
|
+
/**
|
188
|
+
* An alternative dice Roll to use instead of the default formula for the table
|
189
|
+
*/
|
190
|
+
roll?: Roll;
|
191
|
+
|
192
|
+
/**
|
193
|
+
* If a RollTable entity is drawn as a result, recursively roll it
|
194
|
+
* @defaultValue `true`
|
195
|
+
*/
|
196
|
+
recursive?: boolean;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* An internal flag used to track recursion depth
|
200
|
+
* @defaultValue `0`
|
201
|
+
*/
|
202
|
+
_depth?: number;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
|
206
|
+
/**
|
207
|
+
* An object containing the executed Roll and the produced results
|
208
|
+
*/
|
209
|
+
interface RollTableDraw {
|
210
|
+
/**
|
211
|
+
* The Dice roll which generated the draw
|
212
|
+
*/
|
213
|
+
roll: Roll;
|
214
|
+
|
215
|
+
/**
|
216
|
+
* An array of drawn TableResult documents
|
217
|
+
*/
|
218
|
+
results: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseTableResult>>[];
|
219
|
+
}
|
220
|
+
}
|
16
221
|
export {};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
declare global {
|
2
|
+
/**
|
3
|
+
* The client-side TableResult document which extends the common BaseTableResult model.
|
4
|
+
* Each TableResult belongs to the results collection of a RollTable entity.
|
5
|
+
* Each TableResult contains a TableResultData object which provides its source data.
|
6
|
+
*
|
7
|
+
* @see {@link data.TableResultData} The TableResult data schema
|
8
|
+
* @see {@link documents.RollTable} The RollTable document which contains TableResult embedded documents
|
9
|
+
*/
|
10
|
+
class TableResult extends ClientDocumentMixin(foundry.documents.BaseTableResult) {
|
11
|
+
/**
|
12
|
+
* @param data - Initial data provided to construct the TableResult document
|
13
|
+
* @param parent - The parent RollTable document to which this result belongs
|
14
|
+
*/
|
15
|
+
constructor(...args: ConstructorParameters<typeof foundry.documents.BaseTableResult>);
|
16
|
+
|
17
|
+
/**
|
18
|
+
* A path reference to the icon image used to represent this result
|
19
|
+
*/
|
20
|
+
get icon(): string;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Prepare a string representation for the result which (if possible) will be a dynamic link or otherwise plain text
|
24
|
+
* @returns The text to display
|
25
|
+
*/
|
26
|
+
getChatText(): string;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
export {};
|
@@ -1562,7 +1562,7 @@ declare global {
|
|
1562
1562
|
/**
|
1563
1563
|
* @defaultValue `TableResult`
|
1564
1564
|
*/
|
1565
|
-
documentClass: ConfiguredDocumentClassOrDefault<typeof
|
1565
|
+
documentClass: ConfiguredDocumentClassOrDefault<typeof TableResult>;
|
1566
1566
|
};
|
1567
1567
|
|
1568
1568
|
/**
|
@@ -113,6 +113,19 @@ declare global {
|
|
113
113
|
* This is only for debugging, and may be removed in the future, so it's not safe to use.
|
114
114
|
*/
|
115
115
|
let _token: InstanceType<CONFIG['Token']['objectClass']> | null;
|
116
|
+
|
117
|
+
/*
|
118
|
+
* Global Vairables
|
119
|
+
* The following variables are declared directly in foundry's HTML file (or more concretely, in `main.hbs`)
|
120
|
+
*/
|
121
|
+
|
122
|
+
const SIGNED_EULA: boolean;
|
123
|
+
|
124
|
+
const ROUTE_PREFIX: string;
|
125
|
+
|
126
|
+
const MESSAGES:
|
127
|
+
| { type: Notifications.Notification['type']; message: string; options: Notifications.Options }[]
|
128
|
+
| null;
|
116
129
|
}
|
117
130
|
|
118
131
|
export {};
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import type { ConfiguredDocumentClass } from '../../../../../types/helperTypes';
|
2
|
+
import type { DocumentModificationOptions } from '../../../../common/abstract/document.mjs';
|
3
|
+
import type { WallData } from '../../../../common/data/data.mjs';
|
4
|
+
import type { HoverInOptions } from '../placeableObject';
|
2
5
|
|
3
6
|
declare global {
|
4
7
|
/**
|
@@ -6,35 +9,35 @@ declare global {
|
|
6
9
|
* Walls are used to restrict Token movement or visibility as well as to define the areas of effect for ambient lights
|
7
10
|
* and sounds.
|
8
11
|
*
|
12
|
+
* @see {@link WallDocument}
|
9
13
|
* @see {@link WallsLayer}
|
10
14
|
* @see {@link WallConfig}
|
11
|
-
*
|
12
|
-
* @example
|
13
|
-
* ```typescript
|
14
|
-
* Wall.create<Wall>({
|
15
|
-
* c = [100, 200, 400, 600],
|
16
|
-
* move: CONST.WALL_MOVEMENT_TYPES.NORMAL,
|
17
|
-
* sense: CONST.WALL_SENSE_TYPES.NORMAL,
|
18
|
-
* dir: CONST.WALL_DIRECTIONS.BOTH,
|
19
|
-
* door: CONST.WALL_DOOR_TYPES.DOOR,
|
20
|
-
* ds: CONST.WALL_DOOR_STATES.CLOSED
|
21
|
-
* });
|
22
|
-
* ```
|
23
15
|
*/
|
24
|
-
class Wall extends PlaceableObject<
|
16
|
+
class Wall extends PlaceableObject<ConcreteWallDocument> {
|
25
17
|
/**
|
26
18
|
* @remarks Not used for `Wall`
|
27
19
|
*/
|
28
20
|
controlIcon: null;
|
21
|
+
|
29
22
|
/**
|
30
23
|
* @remarks Type is `MouseInteractionManager<this, this['endpoints']>`
|
31
24
|
*/
|
32
25
|
mouseInteractionManager: MouseInteractionManager<this, any> | null;
|
33
26
|
|
27
|
+
constructor(document: ConcreteWallDocument);
|
28
|
+
|
34
29
|
/**
|
35
30
|
* An reference the Door Control icon associated with this Wall, if any
|
31
|
+
* @internal
|
32
|
+
* @defaultValue `null`
|
36
33
|
*/
|
37
|
-
|
34
|
+
doorControl: DoorControl | null;
|
35
|
+
|
36
|
+
/**
|
37
|
+
* A reference to an overhead Tile that is a roof, interior to which this wall is contained
|
38
|
+
* @defaultValue `undefined`
|
39
|
+
*/
|
40
|
+
roof: Tile | undefined;
|
38
41
|
|
39
42
|
/** @override */
|
40
43
|
static get embeddedName(): 'Wall';
|
@@ -42,7 +45,7 @@ declare global {
|
|
42
45
|
/**
|
43
46
|
* A convenience reference to the coordinates Array for the Wall endpoints, [x0,y0,x1,y1].
|
44
47
|
*/
|
45
|
-
get coords(): Wall
|
48
|
+
get coords(): Wall['data']['c'];
|
46
49
|
|
47
50
|
/** @override */
|
48
51
|
get bounds(): NormalizedRectangle;
|
@@ -50,7 +53,7 @@ declare global {
|
|
50
53
|
/**
|
51
54
|
* Return the coordinates [x,y] at the midpoint of the wall segment
|
52
55
|
*/
|
53
|
-
get midpoint():
|
56
|
+
get midpoint(): PointArray;
|
54
57
|
|
55
58
|
/** @override */
|
56
59
|
get center(): PIXI.Point;
|
@@ -70,8 +73,6 @@ declare global {
|
|
70
73
|
/** @override */
|
71
74
|
draw(): Promise<this>;
|
72
75
|
|
73
|
-
endpoints: PIXI.Graphics;
|
74
|
-
|
75
76
|
/** @override */
|
76
77
|
protected _createInteractionManager(): NonNullable<this['mouseInteractionManager']>;
|
77
78
|
|
@@ -82,7 +83,7 @@ declare global {
|
|
82
83
|
* Draw a directional prompt icon for one-way walls to illustrate their direction of effect.
|
83
84
|
* @returns The drawn icon
|
84
85
|
*/
|
85
|
-
protected _drawDirection(): PIXI.Sprite |
|
86
|
+
protected _drawDirection(): PIXI.Sprite | null;
|
86
87
|
|
87
88
|
/** @override */
|
88
89
|
refresh(): this;
|
@@ -92,26 +93,33 @@ declare global {
|
|
92
93
|
* @param coords - The original wall coordinates
|
93
94
|
* @param pad - The amount of padding to apply
|
94
95
|
* @returns A constructed Polygon for the line
|
96
|
+
* @internal
|
95
97
|
*/
|
96
98
|
protected _getWallHitPolygon(coords: [number, number, number, number], pad: number): PIXI.Polygon;
|
97
99
|
|
98
100
|
/**
|
99
101
|
* Given the properties of the wall - decide upon a color to render the wall for display on the WallsLayer
|
102
|
+
* @internal
|
100
103
|
*/
|
101
104
|
protected _getWallColor(): number;
|
102
105
|
|
103
|
-
/**
|
106
|
+
/**
|
107
|
+
* @override
|
108
|
+
* @param chain - (default: `false`)
|
109
|
+
*/
|
104
110
|
protected _onControl({ chain }?: PlaceableObject.ControlOptions & { chain?: boolean }): void;
|
105
111
|
|
106
112
|
/** @override */
|
107
|
-
protected _onRelease(): void;
|
113
|
+
protected _onRelease(options?: PlaceableObject.ReleaseOptions): void;
|
108
114
|
|
109
115
|
/** @override */
|
110
|
-
destroy(options?:
|
116
|
+
destroy(options?: Parameters<PIXI.Container['destroy']>[0]): void;
|
111
117
|
|
112
118
|
/**
|
113
119
|
* Test whether the Wall direction lies between two provided angles
|
114
120
|
* This test is used for collision and vision checks against one-directional walls
|
121
|
+
* @param lower - The lower-bound limiting angle in radians
|
122
|
+
* @param upper - The upper-bound limiting angle in radians
|
115
123
|
*/
|
116
124
|
isDirectionBetweenAngles(lower: number, upper: number): boolean;
|
117
125
|
|
@@ -127,37 +135,44 @@ declare global {
|
|
127
135
|
* @returns An object reporting ids and endpoints of the linked segments
|
128
136
|
*/
|
129
137
|
getLinkedSegments(): {
|
130
|
-
ids: string;
|
131
|
-
walls:
|
138
|
+
ids: string[];
|
139
|
+
walls: WallsLayer['placeables'];
|
132
140
|
endpoints: Array<[number, number]>;
|
133
141
|
};
|
134
142
|
|
135
143
|
/** @override */
|
136
|
-
protected _onCreate(): void;
|
144
|
+
protected _onCreate(data: WallData['_source'], options: DocumentModificationOptions, userId: string): void;
|
137
145
|
|
138
146
|
/** @override */
|
139
|
-
protected _onUpdate(
|
147
|
+
protected _onUpdate(
|
148
|
+
changed: DeepPartial<WallData['_source']>,
|
149
|
+
options?: DocumentModificationOptions,
|
150
|
+
userId?: string
|
151
|
+
): void;
|
140
152
|
|
141
153
|
/** @override */
|
142
|
-
protected _onDelete(): void;
|
154
|
+
protected _onDelete(options: DocumentModificationOptions, userId: string): void;
|
143
155
|
|
144
156
|
/**
|
145
157
|
* Callback actions when a wall that contains a door is moved or its state is changed
|
146
158
|
* @param doorChange - Update vision and sound restrictions
|
159
|
+
* (default: `false`)
|
160
|
+
* @internal
|
147
161
|
*/
|
148
162
|
protected _onModifyWall(doorChange?: boolean): Promise<void>;
|
149
163
|
|
150
164
|
/** @override */
|
151
|
-
protected _canControl(user
|
165
|
+
protected _canControl(user: InstanceType<ConfiguredDocumentClass<typeof User>>, event?: any): boolean;
|
152
166
|
|
153
167
|
/** @override */
|
154
|
-
protected _onHoverIn(event: PIXI.InteractionEvent, options?:
|
168
|
+
protected _onHoverIn(event: PIXI.InteractionEvent, options?: HoverInOptions): false | void;
|
155
169
|
|
156
170
|
/** @override */
|
157
|
-
protected _onHoverOut(event: PIXI.InteractionEvent): void;
|
171
|
+
protected _onHoverOut(event: PIXI.InteractionEvent): false | void;
|
158
172
|
|
159
173
|
/**
|
160
174
|
* Handle mouse-hover events on the line segment itself, pulling the Wall to the front of the container stack
|
175
|
+
* @internal
|
161
176
|
*/
|
162
177
|
protected _onMouseOverLine(event: PIXI.InteractionEvent): void;
|
163
178
|
|
@@ -179,42 +194,6 @@ declare global {
|
|
179
194
|
/** @override */
|
180
195
|
protected _onDragLeftDrop(event: PIXI.InteractionEvent): Promise<any>;
|
181
196
|
}
|
182
|
-
|
183
|
-
namespace Wall {
|
184
|
-
interface Data {
|
185
|
-
/**
|
186
|
-
* Coordinates of the endpoints
|
187
|
-
*/
|
188
|
-
c: [number, number, number, number];
|
189
|
-
/**
|
190
|
-
* 0 - both
|
191
|
-
* 1 - left
|
192
|
-
* 2 - right
|
193
|
-
*/
|
194
|
-
dir?: foundry.CONST.WallDirection;
|
195
|
-
/**
|
196
|
-
* 0 - wall
|
197
|
-
* 1 - door
|
198
|
-
* 2 - secret
|
199
|
-
*/
|
200
|
-
door: foundry.CONST.WallDoorType;
|
201
|
-
/**
|
202
|
-
* 0 - closed
|
203
|
-
* 1 - open
|
204
|
-
* 2 - locked
|
205
|
-
*/
|
206
|
-
ds: foundry.CONST.WallDoorState;
|
207
|
-
/**
|
208
|
-
* 0 - blocked
|
209
|
-
* 1 - allowed
|
210
|
-
*/
|
211
|
-
move: foundry.CONST.WallMovementType;
|
212
|
-
/**
|
213
|
-
* 0 - opaque
|
214
|
-
* 1 - transparent
|
215
|
-
* 2 - terrain
|
216
|
-
*/
|
217
|
-
sense: foundry.CONST.WallSenseType;
|
218
|
-
}
|
219
|
-
}
|
220
197
|
}
|
198
|
+
|
199
|
+
type ConcreteWallDocument = InstanceType<ConfiguredDocumentClass<typeof WallDocument>>;
|
@@ -18,12 +18,13 @@ declare abstract class AbstractBaseMaskFilter extends PIXI.Filter {
|
|
18
18
|
* @param defaultUniforms - Initial uniforms provided to the filter
|
19
19
|
* (default: `{}`)
|
20
20
|
* @param channel - A color channel to target for masking.
|
21
|
-
* (default: `r`)
|
21
|
+
* (default: `'r'`)
|
22
22
|
*/
|
23
|
-
static create(
|
23
|
+
static create<T extends AbstractBaseMaskFilter>(
|
24
|
+
this: ConstructorOf<T>,
|
24
25
|
defaultUniforms?: ConstructorParameters<typeof PIXI.Filter>[2],
|
25
26
|
channel?: 'r' | 'g' | 'b'
|
26
|
-
):
|
27
|
+
): T;
|
27
28
|
|
28
29
|
/**
|
29
30
|
* @override
|
@@ -0,0 +1 @@
|
|
1
|
+
import './inverseOcclusionMaskFilter';
|
package/src/foundry/foundry.js/pixi/filters/abstractBaseMaskFilters/inverseOcclusionMaskFilter.d.ts
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* A filter used to control channels intensity using an externally provided mask texture.
|
3
|
+
* The mask channel used must be provided at filter creation.
|
4
|
+
* Contributed by SecretFire#4843
|
5
|
+
*/
|
6
|
+
declare class InverseOcclusionMaskFilter extends AbstractBaseMaskFilter {
|
7
|
+
static fragmentShader(channel: 'r' | 'g' | 'b'): string;
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @param defaultUniforms - (default: `{}`)
|
11
|
+
* @param channel - (default `'r'`)
|
12
|
+
*/
|
13
|
+
static create<T extends InverseOcclusionMaskFilter>(
|
14
|
+
this: ConstructorOf<T>,
|
15
|
+
defaultUniforms?: ConstructorParameters<typeof PIXI.Filter>[2],
|
16
|
+
channel?: 'r' | 'g' | 'b'
|
17
|
+
): T;
|
18
|
+
}
|
@@ -12,21 +12,10 @@ declare class SpecialEffect {
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* Use this flag as a way to pass a stop signal into the animation frame
|
15
|
+
* @internal
|
15
16
|
*/
|
16
17
|
protected _stop: boolean | null;
|
17
18
|
|
18
|
-
static get label(): string;
|
19
|
-
|
20
|
-
static get effectOptions(): SpecialEffect.Options;
|
21
|
-
|
22
|
-
getParticleEmitters(): PIXI.particles.Emitter[];
|
23
|
-
|
24
|
-
play(duration: number): void;
|
25
|
-
|
26
|
-
stop(): void;
|
27
|
-
|
28
|
-
protected _startEmitter(emitter: PIXI.particles.Emitter): void;
|
29
|
-
|
30
19
|
static OPTION_TYPES: {
|
31
20
|
VALUE: 1;
|
32
21
|
CHECKBOX: 2;
|
@@ -51,6 +40,39 @@ declare class SpecialEffect {
|
|
51
40
|
* ```
|
52
41
|
*/
|
53
42
|
static DEFAULT_CONFIG: PIXI.particles.EmitterConfig | PIXI.particles.OldEmitterConfig;
|
43
|
+
|
44
|
+
/**
|
45
|
+
* @defaultValue `'Special Effect'`
|
46
|
+
*/
|
47
|
+
static get label(): string;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* @defaultValue
|
51
|
+
* ```typescript
|
52
|
+
* {
|
53
|
+
* density: {
|
54
|
+
* label: "Particle Density",
|
55
|
+
* type: this.OPTION_TYPES.RANGE,
|
56
|
+
* value: 0.5,
|
57
|
+
* min: 0.1,
|
58
|
+
* max: 5,
|
59
|
+
* step: 0.1
|
60
|
+
* }
|
61
|
+
* }
|
62
|
+
* ```
|
63
|
+
*/
|
64
|
+
static get effectOptions(): SpecialEffect.Options;
|
65
|
+
|
66
|
+
getParticleEmitters(): PIXI.particles.Emitter[];
|
67
|
+
|
68
|
+
play(duration: number): void;
|
69
|
+
|
70
|
+
stop(): void;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* @internal
|
74
|
+
*/
|
75
|
+
protected _startEmitter(emitter: PIXI.particles.Emitter): void;
|
54
76
|
}
|
55
77
|
|
56
78
|
declare namespace SpecialEffect {
|
@@ -1,17 +1,14 @@
|
|
1
1
|
/**
|
2
2
|
* A special full-screen weather effect which uses one Emitters to render gently falling autumn leaves
|
3
3
|
*/
|
4
|
-
|
5
4
|
declare class AutumnLeavesWeatherEffect extends SpecialEffect {
|
5
|
+
/**
|
6
|
+
* @defaultValue `'Autumn Leaves'`
|
7
|
+
*/
|
6
8
|
static get label(): string;
|
7
9
|
|
8
|
-
static get effectOptions(): SpecialEffect.Options;
|
9
|
-
|
10
|
-
getParticleEmitters(): PIXI.particles.Emitter[];
|
11
|
-
|
12
|
-
protected _getLeafEmitter(parent: PIXI.Container): PIXI.particles.Emitter;
|
13
|
-
|
14
10
|
/**
|
11
|
+
* Configuration for the falling leaves particle effect
|
15
12
|
* @defaultValue
|
16
13
|
* ```typescript
|
17
14
|
* {
|
@@ -55,4 +52,28 @@ declare class AutumnLeavesWeatherEffect extends SpecialEffect {
|
|
55
52
|
* ```
|
56
53
|
*/
|
57
54
|
static LEAF_CONFIG: PIXI.particles.EmitterConfig | PIXI.particles.OldEmitterConfig;
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @defaultValue
|
58
|
+
* ```typescript
|
59
|
+
* {
|
60
|
+
* density: {
|
61
|
+
* label: "Particle Density",
|
62
|
+
* type: this.OPTION_TYPES.RANGE,
|
63
|
+
* value: 1,
|
64
|
+
* min: 0.05,
|
65
|
+
* max: 1,
|
66
|
+
* step: 0.05
|
67
|
+
* }
|
68
|
+
* }
|
69
|
+
* ```
|
70
|
+
*/
|
71
|
+
static get effectOptions(): SpecialEffect.Options;
|
72
|
+
|
73
|
+
getParticleEmitters(): PIXI.particles.Emitter[];
|
74
|
+
|
75
|
+
/**
|
76
|
+
* @internal
|
77
|
+
*/
|
78
|
+
protected _getLeafEmitter(parent: PIXI.Container): PIXI.particles.Emitter;
|
58
79
|
}
|