@league-of-foundry-developers/foundry-vtt-types 9.238.1 → 9.242.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.
Files changed (95) hide show
  1. package/package.json +1 -1
  2. package/src/foundry/common/constants.mjs.d.ts +1 -0
  3. package/src/foundry/common/data/data.mjs/adventureData.d.ts +21 -21
  4. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -3
  5. package/src/foundry/common/data/data.mjs/userData.d.ts +10 -3
  6. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +2 -4
  7. package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
  8. package/src/foundry/common/utils/helpers.mjs.d.ts +37 -37
  9. package/src/foundry/common/utils/module.mjs.d.ts +1 -0
  10. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +1 -1
  11. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +2 -2
  12. package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
  13. package/src/foundry/foundry.js/canvasAnimation.d.ts +30 -7
  14. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -13
  15. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +2 -2
  16. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -44
  17. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +14 -17
  18. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
  19. package/src/foundry/foundry.js/clientKeybindings.d.ts +12 -2
  20. package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
  21. package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
  22. package/src/foundry/foundry.js/config.d.ts +33 -34
  23. package/src/foundry/foundry.js/hooks.d.ts +154 -85
  24. package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
  25. package/src/foundry/foundry.js/keyboardManager.d.ts +2 -2
  26. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
  27. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +2 -2
  28. package/src/foundry/foundry.js/pixi/index.d.ts +1 -0
  29. package/src/foundry/foundry.js/pixi/points/index.d.ts +1 -0
  30. package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +92 -0
  31. package/src/foundry/foundry.js/pixi/polygons/index.d.ts +2 -1
  32. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +98 -0
  33. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +388 -0
  34. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -0
  35. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +11 -37
  36. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShader.d.ts +114 -0
  37. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveBackgroundShader.d.ts +57 -0
  38. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShader.d.ts +47 -0
  39. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/bewitchingWaveColorationShader.d.ts +6 -0
  40. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/chromaColorationShader.d.ts +6 -0
  41. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/emanationColorationShader.d.ts +6 -0
  42. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/energyFieldColorationShader.d.ts +6 -0
  43. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fairyLightColorationShader.d.ts +6 -0
  44. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fogColorationShader.d.ts +6 -0
  45. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/ghostLightColorationShader.d.ts +1 -1
  46. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/hexaDomeColorationShader.d.ts +6 -0
  47. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/index.d.ts +5 -0
  48. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/lightDomeColorationShader.d.ts +6 -0
  49. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/pulseColorationShader.d.ts +1 -1
  50. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/radialRainbowColorationShader.d.ts +6 -0
  51. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/sunburstColorationShader.d.ts +1 -1
  52. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/swirlingRainbowColorationShader.d.ts +6 -0
  53. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/torchColorationShader.d.ts +3 -2
  54. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/vortexColorationShader.d.ts +6 -0
  55. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/waveColorationShader.d.ts +1 -1
  56. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShader.d.ts +63 -0
  57. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/bewitchingWaveIlluminationShader.d.ts +6 -0
  58. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/blackHoleIlluminationShader.d.ts +1 -1
  59. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/fairyLightIlluminationShader.d.ts +6 -0
  60. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/ghostLightIlluminationShader.d.ts +1 -1
  61. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/index.d.ts +3 -0
  62. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/pulseIlluminationShader.d.ts +1 -1
  63. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/roilingIlluminationShader.d.ts +1 -1
  64. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/sunburstIlluminationShader.d.ts +1 -2
  65. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/torchIlluminationShader.d.ts +1 -1
  66. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/vortexIlluminationShader.d.ts +6 -0
  67. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/waveIlluminationShader.d.ts +1 -1
  68. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/index.d.ts +5 -0
  69. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/baseSamplerShader.d.ts +22 -0
  70. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/index.d.ts +3 -4
  71. package/src/foundry/foundry.js/pixi/texts/preciseText.d.ts +10 -2
  72. package/src/foundry/foundry.js/pointSource.d.ts +59 -328
  73. package/src/foundry/foundry.js/pointSources/index.d.ts +3 -0
  74. package/src/foundry/foundry.js/pointSources/lightSource.d.ts +417 -0
  75. package/src/foundry/foundry.js/pointSources/soundSource.d.ts +46 -0
  76. package/src/foundry/foundry.js/pointSources/visionSource.d.ts +125 -0
  77. package/src/foundry/foundry.js/polygonEdge.d.ts +26 -0
  78. package/src/foundry/foundry.js/polygonVertex.d.ts +89 -0
  79. package/src/foundry/foundry.js/quadtreeCulling.d.ts +11 -0
  80. package/src/foundry/foundry.js/ray.d.ts +156 -162
  81. package/src/foundry/foundry.js/rays/index.d.ts +1 -0
  82. package/src/foundry/foundry.js/rays/sightRay.d.ts +34 -0
  83. package/src/foundry/foundry.js/roll.d.ts +27 -32
  84. package/src/foundry/foundry.js/screenCulling.d.ts +19 -0
  85. package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
  86. package/src/foundry/index.d.ts +26 -27
  87. package/src/foundry/foundry.js/pixi/polygons/sourcePolygon.d.ts +0 -25
  88. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShader.d.ts +0 -21
  89. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/chromaColorationShader.d.ts +0 -18
  90. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/emanationColorationShader.d.ts +0 -17
  91. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/energyFieldColorationShader.d.ts +0 -18
  92. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/fogColorationShader.d.ts +0 -17
  93. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/hexaDomeColorationShader.d.ts +0 -17
  94. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/lightDomeColorationShader.d.ts +0 -17
  95. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardIlluminationShader.d.ts +0 -22
@@ -1,31 +1,28 @@
1
1
  /**
2
2
  * A helper class used by the Sight Layer to represent a source of vision or illumination.
3
3
  */
4
- declare class PointSource {
4
+ declare abstract class PointSource {
5
5
  /**
6
6
  * @param object - The object responsible for the PointSource
7
7
  */
8
- constructor(object: PlaceableObject, sourceType: PointSource.SourceType);
8
+ constructor(object: PlaceableObject);
9
9
 
10
10
  /**
11
- * The object responsible for the PointSource
11
+ * The object responsible for this source.
12
12
  */
13
13
  object: PlaceableObject;
14
14
 
15
15
  /**
16
- * The type of source
16
+ * The type of source represented by this data structure.
17
+ * Each subclass must implement this attribute.
18
+ * @remarks This is undefined in PointSource.
17
19
  */
18
- sourceType: PointSource.SourceType;
20
+ static sourceType: string | undefined;
19
21
 
20
22
  /**
21
- * The light or darkness container for this source
22
- */
23
- illumination: PIXI.Container;
24
-
25
- /**
26
- * This visible color container for this source
23
+ * The default Geometry stored in the GPU for all Point Source meshes.
27
24
  */
28
- coloration: PIXI.Container;
25
+ static GEOMETRY: PIXI.Geometry;
29
26
 
30
27
  /**
31
28
  * A flag for whether this source is currently active (rendered) or not
@@ -34,22 +31,10 @@ declare class PointSource {
34
31
  active: boolean;
35
32
 
36
33
  /**
37
- * The range of Scene darkness values for which this Source should be active
38
- * @defaultValue `{ min: 0, max: 0 }`
34
+ * The object of data which configures how this source is rendered
35
+ * @defaultValue `{}`
39
36
  */
40
- darkness: { min: number; max: number };
41
-
42
- /**
43
- * Internal flag for whether this is a darkness source
44
- * @defaultValue `false`
45
- */
46
- isDarkness: boolean;
47
-
48
- /**
49
- * Is the light source limited by an angle of emission?
50
- * @defaultValue `false`
51
- */
52
- limited: boolean;
37
+ data: Partial<PointSource.Data>;
53
38
 
54
39
  /**
55
40
  * The maximum radius of emission for this source
@@ -58,357 +43,103 @@ declare class PointSource {
58
43
  radius: number;
59
44
 
60
45
  /**
61
- * Internal flag for animation throttling time
62
- * @defaultValue `0`
63
- * @internal
64
- */
65
- protected _animateTime: number;
66
-
67
- /**
68
- * An integer seed which de-synchronizes otherwise similar animations
69
- * @defaultValue `null`
70
- * @internal
71
- */
72
- protected _animateSeed: number | null;
73
-
74
- /**
75
- * A flag for the lighting channels version that this source is using.
76
- * @defaultValue `0`
77
- * @internal
78
- */
79
- protected _lightingVersion: number;
80
-
81
- /**
82
- * A flag for whether to re-initialize illumination shader uniforms the next time the light is rendered.
83
- * @defaultValue `true`
84
- * @internal
85
- */
86
- protected _resetIlluminationUniforms: boolean;
87
-
88
- /**
89
- * A flag for whether to re-initialize coloration shader uniforms the next time the light is rendered.
90
- * @defaultValue `true`
91
- *@internal
92
- */
93
- protected _resetColorationUniforms: boolean;
94
-
95
- /**
96
- * An internal flag for whether to render coloration for this source
97
- * @defaultValue `false`
98
- * @internal
99
- */
100
- protected _hasColor: boolean;
101
-
102
- /**
103
- * The default Geometry stored in the GPU for all Point Source meshes.
104
- */
105
- static GEOMETRY: PIXI.Geometry;
106
-
107
- /**
108
- * Create the structure of a source Container which can be rendered to the sight layer shadow-map
109
- * @returns The constructed light source container
110
- * @internal
111
- */
112
- protected _createContainer(shaderCls: ConstructorOf<AbstractBaseShader>): PIXI.Container;
113
-
114
- /**
115
- * Initialize the source with provided object data.
116
- *
117
- * @param data - Input data which configures the source.
118
- *
119
- * @returns A reference to the initialized source
120
- */
121
- initialize(data?: PointSource.Data): PointSource.Initialized<this>;
122
-
123
- /**
124
- * The x-coordinate of the source location
125
- * @defaultValue `undefined`
126
- */
127
- x?: number;
128
-
129
- /**
130
- * The y-coordinate of the source location
46
+ * The restricted line-of-sight polygon that is generated by the origin and radius of this source.
131
47
  * @defaultValue `undefined`
132
48
  */
133
- y?: number;
49
+ los: PointSourcePolygon | undefined;
134
50
 
135
51
  /**
136
- * An optional z-index sorting for the source
137
- * @defaultValue `undefined`
52
+ * A Graphics object with pre-computed geometry used for masking based on line-of-sight.
53
+ * @defaultValue `new PIXI.LegacyGraphics()`
138
54
  */
139
- z?: number | null;
55
+ losMask: PIXI.Graphics;
140
56
 
141
57
  /**
142
- * The allowed radius of dim vision or illumination
143
- * @defaultValue `undefined`
144
- */
145
- dim?: number;
146
-
147
- /**
148
- * The allowed radius of bright vision or illumination
149
- * @defaultValue `undefined`
150
- */
151
- bright?: number;
152
-
153
- /**
154
- * The angle of emission for this point source
155
- * @defaultValue `undefined`
156
- */
157
- angle?: number;
158
-
159
- /**
160
- * The angle of rotation for this point source
161
- * @defaultValue `undefined`
162
- */
163
- rotation?: number;
164
-
165
- /**
166
- * A tint color for the emitted light, if any
167
- * @defaultValue `undefined`
168
- */
169
- color?: number | null;
170
-
171
- /**
172
- * An opacity for the emitted light, if any
173
- * @defaultValue `undefined`
174
- */
175
- alpha?: number;
176
-
177
- /**
178
- * The source type from CONST.SOURCE_TYPES
179
- * @defaultValue `undefined`
180
- */
181
- type?: foundry.CONST.SOURCE_TYPES;
182
-
183
- /**
184
- * An animation configuration for the source
185
- * @defaultValue `undefined`
186
- */
187
- animation?: PointSource.Animation;
188
-
189
- /**
190
- * An integer seed to synchronize (or de-synchronize) animations
191
- * @defaultValue `undefined`
192
- */
193
- seed?: number;
194
-
195
- /**
196
- * @defaultValue `undefined`
58
+ * Is the angle of emission for this source limited?
59
+ * @defaultValue `false`
197
60
  */
198
- colorRGB?: [r: number, g: number, b: number];
61
+ limited: boolean;
199
62
 
200
63
  /**
201
- * @defaultValue `undefined`
64
+ * Boolean flags which control whether certain behaviors of the source must be enforced
65
+ * @defaultValue `{}`
202
66
  */
203
- ratio?: number;
67
+ protected _flags: {
68
+ renderFOV?: boolean;
69
+ } & Record<string, boolean>;
204
70
 
205
71
  /**
206
- * @defaultValue `undefined`
72
+ * The x-coordinate of the point source origin.
207
73
  */
208
- fov?: PIXI.Polygon;
74
+ get x(): number | undefined;
209
75
 
210
76
  /**
211
- * @defaultValue `undefined`
77
+ * The y-coordinate of the point source origin.
212
78
  */
213
- los?: PIXI.Polygon;
79
+ get y(): number | undefined;
214
80
 
215
81
  /**
216
- * Initialize the shaders used for this animation.
217
- * Reset the current shader values back to defaults.
218
- * Swap to a different Shader instance if necessary.
219
- * @internal
82
+ * The type of source represented by this data structure.
220
83
  */
221
- protected _initializeShaders(): void;
84
+ get sourceType(): typeof PointSource['sourceType'];
222
85
 
223
86
  /**
224
- * Initialize the blend mode and vertical sorting of this source relative to others in the container.
225
- * @internal
87
+ * A point is contained with the area of the source if it is within both the FOV circle as well as the LOS polygon.
88
+ * @param point - The point to test
89
+ * @returns Is the point contained
226
90
  */
227
- protected _initializeBlending(): void;
91
+ containsPoint(point: Point): boolean;
228
92
 
229
93
  /**
230
- * Draw the display of this source for the darkness/light container of the SightLayer.
231
- * @returns The rendered light container
94
+ * Steps that must be performed when the base source is destroyed.
232
95
  */
233
- drawLight(): PIXI.Container;
96
+ destroy(): void;
234
97
 
235
- /**
236
- * Draw and return a container used to depict the visible color tint of the light source on the LightingLayer
237
- * @returns An updated color container for the source
238
- */
239
- drawColor(): PIXI.Container;
98
+ fovTexture?: PIXI.RenderTexture | undefined;
240
99
 
241
- /**
242
- * A common helper function for updating the display of a source container.
243
- * Assign the container position, dimensions, and polygons.
244
- * @internal
245
- */
246
- protected _drawContainer(c: PIXI.Container): PIXI.Container;
100
+ abstract initialize(data?: Partial<PointSource.Data>): this;
247
101
 
248
102
  /**
249
- * Animate the PointSource, if an animation is enabled and if it currently has rendered containers.
250
- * @param dt - Delta time
103
+ * Get power of 2 size pertaining to base-source radius and performance modes
104
+ * @returns The computed power of 2 size
251
105
  */
252
- animate(dt: number): void;
106
+ getPowerOf2Size(): number;
253
107
 
254
108
  /**
255
- * A torch animation where the luminosity and coloration decays each frame and is revitalized by flashes
256
- * @param dt - Delta time
257
- * @param speed - The animation speed, from 1 to 10
258
- * (default: `5`)
259
- * @param intensity - The animation intensity, from 1 to 10
260
- * (default: `5`)
109
+ * Create a new Mesh for this source using a provided shader class
110
+ * @param shaderCls - The subclass of AdaptiveLightingShader being used for this Mesh
111
+ * @returns The created Mesh
261
112
  */
262
- animateTorch(dt: number, { speed, intensity }?: PointSource.AnimationProperties): void;
113
+ protected _createMesh(shaderCls: ConstructorOf<AdaptiveLightingShader>): PIXI.Mesh;
263
114
 
264
115
  /**
265
- * A basic "pulse" animation which expands and contracts.
266
- * @param dt - Delta time
267
- * @param speed - The animation speed, from 1 to 10
268
- * (default: `5`)
269
- * @param intensity - The animation intensity, from 1 to 10
270
- * (default: `5`)
116
+ * Update the position and size of the mesh each time it is drawn.
117
+ * @param mesh - The Mesh being updated
118
+ * @returns The updated Mesh
271
119
  */
272
- animatePulse(dt: number, { speed, intensity }?: PointSource.AnimationProperties): void;
120
+ protected _updateMesh(mesh: PIXI.Mesh): PIXI.Mesh;
273
121
 
274
122
  /**
275
- * Emanate waves of light from the source origin point
276
- * @param dt - Delta time
277
- * @param speed - The animation speed, from 1 to 10
278
- * (default: `5`)
279
- * @param intensity - The animation intensity, from 1 to 10
280
- * (default: `5`)
123
+ * Render this source to a texture which can be used for masking and blurring.
281
124
  */
282
- animateTime(dt: number, { speed, intensity }?: PointSource.AnimationProperties): void;
125
+ protected _renderTexture(): PIXI.RenderTexture;
283
126
 
284
127
  /**
285
- * Evolve a value using a stochastic AR(1) process
286
- * @param y - The current value
287
- * @param phi - The decay rate of prior values
288
- * @param center - The stationary mean of the series
289
- * @param sigma - The volatility of the process - standard deviation of the error term
290
- * @param max - The maximum allowed outcome, or null
291
- * @param min - The minimum allowed outcome, or null
292
- * @returns The new value of the process
293
- * @internal
128
+ * Create a container that should be rendered to the fov texture for this source
129
+ * @returns The drawn container for the render texture
294
130
  */
295
- protected _ar1(
296
- y: number,
297
- {
298
- phi,
299
- center,
300
- sigma,
301
- max,
302
- min
303
- }: { phi?: number; center?: number; sigma?: number; max?: number | null; min?: number | null }
304
- ): number;
131
+ protected _drawRenderTextureContainer(): PIXI.Container;
305
132
  }
306
133
 
307
134
  declare namespace PointSource {
308
- type SourceType = 'light' | 'sight';
309
-
310
135
  interface Data {
311
- /**
312
- * The x-coordinate of the source location
313
- * @defaultValue `0`
314
- */
136
+ /** The x-coordinate of the source location */
315
137
  x?: number;
316
138
 
317
- /** The y-coordinate of the source location
318
- * @defaultValue `0`
319
- */
139
+ /** The y-coordinate of the source location */
320
140
  y?: number;
321
141
 
322
- /** An optional z-index sorting for the source
323
- * @defaultValue `null`
324
- */
325
- z?: number | null;
326
-
327
- /** The allowed radius of dim vision or illumination
328
- * @defaultValue `0`
329
- */
330
- dim?: number;
331
-
332
- /** The allowed radius of bright vision or illumination
333
- * @defaultValue `0`
334
- */
335
- bright?: number;
336
-
337
- /** The angle of emission for this point source
338
- * @defaultValue `360`
339
- */
340
- angle?: number;
341
-
342
- /**
343
- * The angle of rotation for this point source
344
- * @defaultValue `0`
345
- */
346
- rotation?: number;
347
-
348
- /**
349
- * A tint color for the emitted light, if any
350
- * @defaultValue `null`
351
- */
352
- color?: number | string | null;
353
-
354
- /** An opacity for the emitted light, if any
355
- * @defaultValue `0.5`
356
- */
357
- alpha: number;
358
-
359
- /**
360
- * A darkness range (min and max) for which the source should be active
361
- * @defaultValue `{ min: 0, max: 1 }`
362
- */
363
- darkness?: { min: number; max: number };
364
-
365
- /**
366
- * The source type from CONST.SOURCE_TYPES
367
- * @defaultValue `CONST.SOURCE_TYPES.LOCAL`
368
- */
369
- type?: foundry.CONST.SOURCE_TYPES;
370
-
371
- /**
372
- * An animation configuration for the source
373
- * @defaultValue `{ type: null }`
374
- */
375
- animation?: PointSource.Animation;
376
-
377
- /**
378
- * An integer seed to synchronize (or de-synchronize) animations
379
- */
380
- seed?: number;
142
+ /** Whether or not the source is constrained by walls */
143
+ walls?: boolean;
381
144
  }
382
-
383
- type Initialized<P extends PointSource> = P &
384
- Required<
385
- Pick<
386
- P,
387
- | 'animation'
388
- | 'angle'
389
- | 'alpha'
390
- | 'bright'
391
- | 'color'
392
- | 'dim'
393
- | 'rotation'
394
- | 'type'
395
- | 'x'
396
- | 'y'
397
- | 'z'
398
- | 'colorRGB'
399
- | 'ratio'
400
- | 'fov'
401
- | 'los'
402
- >
403
- >;
404
-
405
- interface AnimationProperties {
406
- speed?: number;
407
- intensity?: number;
408
- }
409
- interface Animation extends AnimationProperties {
410
- type: null | keyof typeof CONFIG.Canvas.lightAnimations;
411
- }
412
-
413
- type AnimationFunction = (this: PointSource, dt: number, { speed, intensity }?: AnimationProperties) => void;
414
145
  }
@@ -0,0 +1,3 @@
1
+ import './lightSource';
2
+ import './soundSource';
3
+ import './visionSource';