@drincs/pixi-vn 1.9.3 → 1.9.5

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/{ContainerMemory-BpDgacyr.d.cts → ContainerMemory-DNqSVzLY.d.cts} +12 -116
  3. package/dist/{ContainerMemory-BpDgacyr.d.ts → ContainerMemory-DNqSVzLY.d.ts} +12 -116
  4. package/dist/canvas.cjs +2 -2
  5. package/dist/canvas.d.cts +1375 -562
  6. package/dist/canvas.d.ts +1375 -562
  7. package/dist/canvas.mjs +2 -2
  8. package/dist/characters.mjs +1 -1
  9. package/dist/{chunk-7P46CLKX.mjs → chunk-5MVDNAT4.mjs} +1 -1
  10. package/dist/chunk-6OABTG5R.mjs +1 -0
  11. package/dist/chunk-AW5XWF24.mjs +1 -0
  12. package/dist/chunk-HD353M4B.mjs +1 -0
  13. package/dist/chunk-LXIKP2K5.mjs +1 -0
  14. package/dist/chunk-S7HZUIEI.mjs +1 -0
  15. package/dist/chunk-XLRCR56W.mjs +1 -0
  16. package/dist/core.cjs +1 -1
  17. package/dist/core.d.cts +63 -1
  18. package/dist/core.d.ts +63 -1
  19. package/dist/core.mjs +1 -1
  20. package/dist/filters.cjs +1 -0
  21. package/dist/filters.d.cts +196 -0
  22. package/dist/filters.d.ts +196 -0
  23. package/dist/filters.mjs +1 -0
  24. package/dist/history.mjs +1 -1
  25. package/dist/index.cjs +2 -2
  26. package/dist/index.d.cts +5 -2
  27. package/dist/index.d.ts +5 -2
  28. package/dist/index.mjs +2 -2
  29. package/dist/motion.cjs +1 -1
  30. package/dist/motion.d.cts +35 -8
  31. package/dist/motion.d.ts +35 -8
  32. package/dist/motion.mjs +1 -1
  33. package/dist/narration.mjs +1 -1
  34. package/dist/pixi/browser.js +170 -169
  35. package/dist/sound.mjs +1 -1
  36. package/dist/storage.mjs +1 -1
  37. package/dist/tickers.cjs +1 -0
  38. package/dist/tickers.d.cts +625 -0
  39. package/dist/tickers.d.ts +625 -0
  40. package/dist/tickers.mjs +1 -0
  41. package/dist/vite.cjs +6 -6
  42. package/dist/vite.mjs +6 -6
  43. package/dist/worker.cjs +1 -1
  44. package/dist/worker.mjs +1 -1
  45. package/package.json +22 -1
  46. package/dist/chunk-AWU37VV6.mjs +0 -1
  47. package/dist/chunk-QOBPVPCY.mjs +0 -1
  48. package/dist/chunk-U5BSF6X3.mjs +0 -1
  49. package/dist/chunk-YBA63R27.mjs +0 -1
package/dist/canvas.d.cts CHANGED
@@ -1,235 +1,19 @@
1
1
  import * as _drincs_pixi_vn_pixi_js from '@drincs/pixi-vn/pixi.js';
2
- import _drincs_pixi_vn_pixi_js__default, { Container as Container$1, ContainerChild, Ticker, UPDATE_PRIORITY as UPDATE_PRIORITY$1, Application, Rectangle as Rectangle$1, ApplicationOptions, PointData, ContainerOptions as ContainerOptions$1, SpriteOptions as SpriteOptions$1, CanvasTextOptions, Texture as Texture$1, TextureSourceLike, ContainerEvents, EventEmitter, ObservablePoint, TextureSource, TextOptions as TextOptions$1 } from '@drincs/pixi-vn/pixi.js';
2
+ import _drincs_pixi_vn_pixi_js__default, { Container as Container$1, ContainerChild, Application, Rectangle as Rectangle$1, ApplicationOptions, UPDATE_PRIORITY as UPDATE_PRIORITY$1, PointData, ContainerOptions as ContainerOptions$1, SpriteOptions as SpriteOptions$1, CanvasTextOptions, Texture as Texture$1, TextureSourceLike, ContainerEvents, EventEmitter, ObservablePoint, TextureSource, TextOptions as TextOptions$1 } from '@drincs/pixi-vn/pixi.js';
3
3
  export { TextureSourceLike, Ticker as TickerValue } from '@drincs/pixi-vn/pixi.js';
4
4
  import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion';
5
+ import { TickerInfo, TickersSequence, TickerArgs, Ticker, TickersInterface } from '@drincs/pixi-vn/tickers';
6
+ export * from '@drincs/pixi-vn/tickers';
7
+ export { TickersInterface as CanvasTickersInterface } from '@drincs/pixi-vn/tickers';
5
8
  import { Devtools } from '@pixi/devtools';
6
- import { T as TickerArgs, a as Ticker$1, C as CanvasBaseItemMemory, b as CanvasBaseItem, c as TickerInfo, d as TickersSequence, e as CanvasGameState, f as ContainerChild$1, A as AdditionalPositionsExtensionProps, L as ListenerExtensionMemory, g as ListenerExtension, h as AdditionalPositionsExtension, O as OnEventsHandlers, i as ContainerMemory, j as TickerHistory } from './ContainerMemory-BpDgacyr.cjs';
7
- export { k as addListenerHandler, l as analizePositionsExtensionProps } from './ContainerMemory-BpDgacyr.cjs';
9
+ import { C as CanvasBaseItemMemory, a as CanvasBaseItem, b as CanvasGameState, c as ContainerChild$1, A as AdditionalPositionsExtensionProps, L as ListenerExtensionMemory, d as ListenerExtension, e as AdditionalPositionsExtension, O as OnEventsHandlers, f as ContainerMemory } from './ContainerMemory-DNqSVzLY.cjs';
10
+ export { g as addListenerHandler, h as analizePositionsExtensionProps } from './ContainerMemory-DNqSVzLY.cjs';
8
11
  export { AnimationOptions as MotionAnimationOptions } from 'motion';
9
12
  import { OnErrorHandler } from '@drincs/pixi-vn/core';
13
+ import '@drincs/pixi-vn/filters';
10
14
 
11
15
  type Layer = Container$1<ContainerChild>;
12
16
 
13
- type TickerValue = Ticker;
14
-
15
- /**
16
- * A class is used to create a ticker element to add into a Pixi Application.
17
- * You can use {@link canvas.tickers.add()} to add this element into the application.
18
- * This class should be extended and the fn method should be overridden.
19
- * You must use the {@link tickerDecorator} to register the ticker in the game.
20
- * In Ren'Py is a transform.
21
- * @template TArgs The type of the arguments that you want to pass to the ticker.
22
- * @example
23
- * ```ts
24
- * \@tickerDecorator() // this is equivalent to tickerDecorator("RotateTicker")
25
- * export class RotateTicker extends TickerBase<{ speed?: number }> {
26
- * override fn(
27
- * t: TickerValue, // the ticker that is calling this method
28
- * args: { // the arguments that you passed when you added the ticker
29
- * speed?: number,
30
- * },
31
- * aliases: string[], // the aliases of the canvas elements that are connected to this ticker
32
- * tickerId: string, // the id of the ticker. You can use this to get the ticker from the canvas.tickers.currentTickers
33
- * ): void {
34
- * let speed = args.speed === undefined ? 0.1 : args.speed
35
- * aliases.forEach((alias) => {
36
- * let element = canvas.find(alias)
37
- * if (element && element instanceof Container) {
38
- * if (clockwise)
39
- * element.rotation += speed * t.deltaTime
40
- * else
41
- * element.rotation -= speed * t.deltaTime
42
- * }
43
- * })
44
- * }
45
- * }
46
- * ```
47
- */
48
- declare abstract class TickerBase<TArgs extends TickerArgs> implements Ticker$1<TArgs> {
49
- /**
50
- * @param args The arguments that you want to pass to the ticker.
51
- * @param options The options of the ticker.
52
- */
53
- constructor(args: TArgs, options?: {
54
- /**
55
- * The duration of the ticker in seconds. If is undefined, the step will end only when the animation is finished (if the animation doesn't have a goal to reach then it won't finish). @default undefined
56
- */
57
- duration?: number;
58
- /**
59
- * The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
60
- */
61
- priority?: UPDATE_PRIORITY$1;
62
- /**
63
- * The id of the ticker. This param is used by the system when will ber restoring the tickers from a save. If not provided, a random id will be generated. @default undefined
64
- */
65
- id?: string;
66
- /**
67
- * The aliases of the canvas elements that are connected to this ticker. This is used by the system to know which canvas elements are connected to this ticker, and to pass them to the fn method. @default []
68
- */
69
- canvasElementAliases?: string[];
70
- });
71
- readonly alias: string;
72
- readonly id: string;
73
- args: TArgs;
74
- duration?: number;
75
- priority?: UPDATE_PRIORITY$1;
76
- protected ticker: _drincs_pixi_vn_pixi_js.Ticker;
77
- canvasElementAliases: string[];
78
- private generateTickerId;
79
- /**
80
- * The method that will be called every frame.
81
- * This method should be overridden and you can use {@link canvas.add()} to get the canvas element of the canvas, and edit them.
82
- * @param _ticker The ticker that is calling this method
83
- * @param _args The arguments that you passed when you added the ticker
84
- * @param _alias The alias of the canvas elements that are connected to this ticker
85
- * @param _tickerId The id of the ticker. You can use this to get the ticker from the {@link canvas.tickers.currentTickers}
86
- */
87
- abstract fn(_ticker: TickerValue, _args: TArgs, _alias: string | string[], _tickerId: string): void;
88
- protected fnValue?: () => void;
89
- complete(_options?: {
90
- ignoreTickerSteps?: boolean;
91
- }): void;
92
- stop(): void;
93
- start(): void;
94
- pause(): void;
95
- play(): void;
96
- get paused(): boolean;
97
- }
98
-
99
- /**
100
- * Is a decorator that register a ticker in the game.
101
- * Is a required decorator for use the ticker in the game.
102
- * Thanks to this decoration the game has the possibility of updating the tickers to the latest modification and saving the game.
103
- * @param name is th identifier of the label, by default is the name of the class
104
- * @returns
105
- */
106
- declare function tickerDecorator(name?: string): (target: {
107
- new (args: any, options?: {
108
- duration?: number;
109
- priority?: UPDATE_PRIORITY$1;
110
- id?: string;
111
- canvasElementAliases?: string[];
112
- }): Ticker$1<any>;
113
- }) => void;
114
- declare namespace RegisteredTickers {
115
- /**
116
- * Register a ticker in the game.
117
- * @param target The class of the ticker.
118
- * @param name Name of the ticker, by default it will use the class name. If the name is already registered, it will show a warning
119
- */
120
- function add(target: {
121
- new (args: any, options?: {
122
- duration?: number;
123
- priority?: UPDATE_PRIORITY$1;
124
- id?: string;
125
- canvasElementAliases?: string[];
126
- }): Ticker$1<any>;
127
- }, name?: string): void;
128
- /**
129
- * Get a ticker by the id.
130
- * @param canvasId The id of the ticker.
131
- * @returns The ticker type.
132
- */
133
- function get<T = Ticker$1<any>>(tickerId: string): T | undefined;
134
- /**
135
- * Get a ticker instance by the id.
136
- * @param tickerId The id of the ticker.
137
- * @param args The arguments that you want to pass to the ticker.
138
- * @param duration The duration of the ticker. If is undefined, the ticker will be called every frame.
139
- * @param priority The priority of the ticker. If is undefined, the priority will be UPDATE_PRIORITY.NORMAL.
140
- * @returns The instance of the ticker
141
- */
142
- function getInstance<TArgs extends TickerArgs>(tickerId: string, args: TArgs, options?: {
143
- duration?: number;
144
- priority?: UPDATE_PRIORITY$1;
145
- id?: string;
146
- canvasElementAliases?: string[];
147
- }): Ticker$1<TArgs> | undefined;
148
- /**
149
- * Get a list of all tickers registered.
150
- * @returns An array of tickers.
151
- */
152
- function values(): {
153
- new (args: any, options?: {
154
- duration?: number;
155
- priority?: UPDATE_PRIORITY$1;
156
- id?: string;
157
- canvasElementAliases?: string[];
158
- }): Ticker$1<any>;
159
- }[];
160
- /**
161
- * Check if a ticker is registered.
162
- * @param id The id of the ticker.
163
- * @returns True if the ticker is registered, false otherwise.
164
- */
165
- function has(id: string): boolean;
166
- /**
167
- * Get a list of all ticker ids registered.
168
- * @returns An array of label ids.
169
- */
170
- function keys(): string[];
171
- }
172
-
173
- type TickerProgrationType = TickerProgrationLinear | TickerProgrationExponential;
174
-
175
- interface TickerProgrationLinear {
176
- /**
177
- * The amount of the speed to increase every frame.
178
- */
179
- amt: number;
180
- /**
181
- * The limit of the effect
182
- */
183
- limit?: number;
184
- type: "linear";
185
- }
186
- interface TickerProgrationExponential {
187
- /**
188
- * The percentage of the speed to increase every frame. if the percentage is 0.1, the speed will increase by 10% every frame.
189
- */
190
- percentage: number;
191
- /**
192
- * The limit of the effect
193
- */
194
- limit?: number;
195
- type: "exponential";
196
- }
197
-
198
- interface TickerTimeoutHistory {
199
- aliases: string[];
200
- ticker: string;
201
- canBeDeletedBeforeEnd: boolean;
202
- }
203
-
204
- type CommonTickerProps = {
205
- /**
206
- * An array of strings containing the aliases of the canvas components to remove after the animation completes.
207
- * @default []
208
- */
209
- aliasToRemoveAfter?: string[] | string;
210
- /**
211
- * If true, the effect only starts if the canvas element have a texture
212
- * @default false
213
- */
214
- startOnlyIfHaveTexture?: boolean;
215
- /**
216
- * If you want to resume tickers that were previously paused, provide the aliases of the canvas components whose tickers should be resumed.
217
- * @default []
218
- */
219
- tickerAliasToResume?: string[] | string;
220
- /**
221
- * A string containing the ticker ID to resume after the animation completes.
222
- * @default []
223
- */
224
- tickerIdToResume?: string[] | string;
225
- /**
226
- * A boolean indicating whether the animation must complete before the next `step` of the game. If `true`, the game will force the animation to finish before proceeding.
227
- * When true, calling {@link narration.continue()} forces the current content to complete before advancing to the next narrative step.
228
- * @default false
229
- */
230
- completeOnContinue?: boolean;
231
- };
232
-
233
17
  interface CanvasBaseInterface<T2 extends CanvasBaseItemMemory> extends CanvasBaseItem<T2>, Container$1 {
234
18
  }
235
19
 
@@ -306,155 +90,6 @@ interface CanvasLayersInterface {
306
90
  remove(label: string): void;
307
91
  }
308
92
 
309
- interface CanvasTickersInterface {
310
- /**
311
- * Transfer the tickers from an old alias to a new alias.
312
- * @param oldAlias Old alias
313
- * @param newAlias New alias
314
- * @param mode If "move", the old alias will be removed from the ticker. If "duplicate", the old alias will be kept in the ticker.
315
- */
316
- transfer(oldAlias: string, newAlias: string, mode?: "move" | "duplicate"): void;
317
- /**
318
- * Currently tickers that are running.
319
- */
320
- readonly currentTickers: Map<string, TickerInfo<any>>;
321
- /**
322
- * The steps of the tickers
323
- */
324
- readonly currentTickersSteps: Map<string, Map<string, TickersSequence>>;
325
- /**
326
- * Find a ticker by its id.
327
- * @param tickerId The id of the ticker to be found.
328
- * @param args The args of the ticker.
329
- * @returns The ticker if found, undefined otherwise.
330
- */
331
- find<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker$1<TArgs> | undefined;
332
- /**
333
- * Run a ticker. You can run multiple add with the same alias and different tickerClasses.
334
- * If you run a ticker with the same alias and tickerClass, the old ticker will be removed.
335
- * If already exists a sequence of tickers with the same alias, it will be removed.
336
- * @param canvasElementAlias The alias of the canvas element that will use the ticker.
337
- * @param ticker The ticker class to be run.
338
- * @returns The id of the ticker that was added.
339
- * @example
340
- * ```ts
341
- * canvas.tickers.add("alien", new RotateTicker({ speed: 0.2 }))
342
- * ```
343
- */
344
- add<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker$1<TArgs>): string | undefined;
345
- /**
346
- * Run a sequence of tickers.
347
- * @param alias The alias of canvas element that will use the tickers.
348
- * @param steps The steps of the tickers.
349
- * @param currentStepNumber The current step number. It is used to continue the sequence of tickers.
350
- * @returns The id of tickers.
351
- * @example
352
- * ```ts
353
- * canvas.tickers.addSequence("alien", [
354
- * new RotateTicker({ speed: 0.1, clockwise: true }, 2), // runs for 2 seconds
355
- * new RotateTicker({ speed: 0.2, clockwise: false }, 2),
356
- * ])
357
- * ```
358
- * @deprecated
359
- */
360
- addSequence(alias: string, steps: Ticker$1<any>[], currentStepNumber?: number): string | undefined;
361
- /**
362
- * Remove a connection between a canvas element and a ticker.
363
- * And remove the ticker if there is no canvas element connected to it.
364
- * @param alias The alias of the canvas element that will use the ticker.
365
- * @param ticker The ticker class to be removed.
366
- * @example
367
- * ```ts
368
- * canvas.tickers.unlinkComponent("alien", RotateTicker)
369
- * ```
370
- */
371
- unlinkComponent(alias: string | string[], ticker?: {
372
- new (): Ticker$1<any>;
373
- } | string): void;
374
- /**
375
- * Remove all tickers from the canvas.
376
- */
377
- removeAll(): void;
378
- /**
379
- * Remove a ticker by the id.
380
- * @param tickerId The id or an array of ids of the ticker to be removed.
381
- */
382
- remove(tickerId: string | string[]): void;
383
- /**
384
- * Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.
385
- * @param filters The filters to pause the ticker.
386
- * @returns The ids of the paused tickers.
387
- */
388
- pause(filters: {
389
- /**
390
- * The alias of the canvas element that will use the ticker.
391
- * Will pause all tickers that are connected to this canvas element.
392
- */
393
- canvasAlias: string;
394
- /**
395
- * Ticker ids excluded from the pause. If not provided, all tickers will be paused.
396
- */
397
- tickerIdsExcluded?: string[];
398
- } | {
399
- /**
400
- * The id of the ticker to be paused. If provided, only this ticker will be paused.
401
- */
402
- id: string | string[];
403
- }): string[];
404
- /**
405
- * Resume a ticker.
406
- * @param filters The filters to resume the ticker.
407
- */
408
- resume(filters: {
409
- /**
410
- * The alias of the canvas element that will use the ticker.
411
- * Will resume all tickers that are connected to this canvas element.
412
- */
413
- canvasAlias: string;
414
- } | {
415
- /**
416
- * The id of the ticker to be resumed. If provided, only this ticker will be resumed.
417
- */
418
- id: string | string[];
419
- }): void;
420
- /**
421
- * Check if a ticker is paused.
422
- * @param alias The alias of the canvas element that will use the ticker.
423
- * @param tickerId The ticker that will be checked.
424
- * @returns If the ticker is paused.
425
- */
426
- isPaused(alias: string, tickerId?: string): boolean;
427
- /**
428
- * Add a ticker that must be completed before the next step.
429
- * This method is used for example into a transition between scenes.
430
- * @param step The step that the ticker must be completed before the next step.
431
- */
432
- completeOnStepEnd(step: {
433
- /**
434
- * The id of the step.
435
- */
436
- id: string;
437
- /**
438
- * If is a sequence of tickers, the alias of the sequence of tickers.
439
- */
440
- alias?: string;
441
- }): void;
442
- /**
443
- * This method force the completion of the tickers that are running.
444
- * This funcions is called in the next step.
445
- * @param id The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.
446
- * @param alias The alias of the sequence of tickers.
447
- */
448
- forceCompletion(id: string, alias?: string): Promise<void>;
449
- onComplete(tickerId: string, options: {
450
- aliasToRemoveAfter: string[];
451
- tickerAliasToResume: string[];
452
- tickerIdToResume: string[];
453
- ignoreTickerSteps?: boolean;
454
- stopTicker?: boolean;
455
- }): void;
456
- }
457
-
458
93
  interface CanvasManagerInterface {
459
94
  /**
460
95
  * The PIXI Application instance.
@@ -539,7 +174,7 @@ interface CanvasManagerInterface {
539
174
  * @param oldAlias Old alias
540
175
  * @param newAlias New alias
541
176
  * @param mode If "move", the old alias will be removed from the ticker. If "duplicate", the old alias will be kept in the ticker.
542
- * @deprecated Use {@link tickers}.transfer instead.
177
+ * @deprecated Use `tickers.transfer` from `@drincs/pixi-vn` instead.
543
178
  */
544
179
  transferTickers(oldAlias: string, newAlias: string, mode?: "move" | "duplicate"): void;
545
180
  /**
@@ -622,12 +257,12 @@ interface CanvasManagerInterface {
622
257
  /** Edit Tickers Methods */
623
258
  /**
624
259
  * Currently tickers that are running.
625
- * @deprecated Use {@link tickers}.currentTickers instead.
260
+ * @deprecated Use `tickers.currentTickers` from `@drincs/pixi-vn` instead.
626
261
  */
627
262
  readonly currentTickers: Map<string, TickerInfo<any>>;
628
263
  /**
629
264
  * The steps of the tickers
630
- * @deprecated Use {@link tickers}.currentTickersSteps instead.
265
+ * @deprecated Use `tickers.currentTickersSteps` from `@drincs/pixi-vn` instead.
631
266
  */
632
267
  readonly currentTickersSteps: Map<string, Map<string, TickersSequence>>;
633
268
  /**
@@ -635,9 +270,9 @@ interface CanvasManagerInterface {
635
270
  * @param tickerId The id of the ticker to be found.
636
271
  * @param args The args of the ticker.
637
272
  * @returns The ticker if found, undefined otherwise.
638
- * @deprecated Use {@link tickers}.find instead.
273
+ * @deprecated Use `tickers.find` from `@drincs/pixi-vn` instead.
639
274
  */
640
- findTicker<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker$1<TArgs> | undefined;
275
+ findTicker<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker<TArgs> | undefined;
641
276
  /**
642
277
  * Run a ticker. You can run multiple addTicker with the same alias and different tickerClasses.
643
278
  * If you run a ticker with the same alias and tickerClass, the old ticker will be removed.
@@ -649,9 +284,9 @@ interface CanvasManagerInterface {
649
284
  * ```ts
650
285
  * canvas.addTicker("alien", new RotateTicker({ speed: 0.2 }))
651
286
  * ```
652
- * @deprecated Use {@link tickers}.add instead.
287
+ * @deprecated Use `tickers.add` from `@drincs/pixi-vn` instead.
653
288
  */
654
- addTicker<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker$1<TArgs>): string | undefined;
289
+ addTicker<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker<TArgs>): string | undefined;
655
290
  /**
656
291
  * Run a sequence of tickers.
657
292
  * @param alias The alias of canvas element that will use the tickers.
@@ -665,9 +300,9 @@ interface CanvasManagerInterface {
665
300
  * new RotateTicker({ speed: 0.2, clockwise: false }, 2),
666
301
  * ])
667
302
  * ```
668
- * @deprecated Use {@link tickers}.addSequence instead.
303
+ * @deprecated Use `tickers.addSequence` from `@drincs/pixi-vn` instead.
669
304
  */
670
- addTickersSequence(alias: string, steps: Ticker$1<any>[], currentStepNumber?: number): string | undefined;
305
+ addTickersSequence(alias: string, steps: Ticker<any>[], currentStepNumber?: number): string | undefined;
671
306
  /**
672
307
  * Remove a connection between a canvas element and a ticker.
673
308
  * And remove the ticker if there is no canvas element connected to it.
@@ -677,27 +312,27 @@ interface CanvasManagerInterface {
677
312
  * ```ts
678
313
  * canvas.unlinkComponentFromTicker("alien", RotateTicker)
679
314
  * ```
680
- * @deprecated Use {@link tickers}.unlinkComponent instead.
315
+ * @deprecated Use `tickers.unlinkComponent` from `@drincs/pixi-vn` instead.
681
316
  */
682
317
  unlinkComponentFromTicker(alias: string | string[], ticker?: {
683
- new (): Ticker$1<any>;
318
+ new (): Ticker<any>;
684
319
  } | string): void;
685
320
  /**
686
321
  * Remove all tickers from the canvas.
687
- * @deprecated Use {@link tickers}.removeAll instead.
322
+ * @deprecated Use `tickers.removeAll` from `@drincs/pixi-vn` instead.
688
323
  */
689
324
  removeAllTickers(): void;
690
325
  /**
691
326
  * Remove a ticker by the id.
692
327
  * @param tickerId The id or an array of ids of the ticker to be removed.
693
- * @deprecated Use {@link tickers}.remove instead.
328
+ * @deprecated Use `tickers.remove` from `@drincs/pixi-vn` instead.
694
329
  */
695
330
  removeTicker(tickerId: string | string[]): void;
696
331
  /**
697
332
  * Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.
698
333
  * @param filters The filters to pause the ticker.
699
334
  * @returns The ids of the paused tickers.
700
- * @deprecated Use {@link tickers}.pause instead.
335
+ * @deprecated Use `tickers.pause` from `@drincs/pixi-vn` instead.
701
336
  */
702
337
  pauseTicker(filters: {
703
338
  /**
@@ -718,7 +353,7 @@ interface CanvasManagerInterface {
718
353
  /**
719
354
  * Resume a ticker.
720
355
  * @param filters The filters to resume the ticker.
721
- * @deprecated Use {@link tickers}.resume instead.
356
+ * @deprecated Use `tickers.resume` from `@drincs/pixi-vn` instead.
722
357
  */
723
358
  resumeTicker(filters: {
724
359
  /**
@@ -733,7 +368,7 @@ interface CanvasManagerInterface {
733
368
  id: string | string[];
734
369
  }): void;
735
370
  /**
736
- * @deprecated Use {@link tickers}.isPaused instead.
371
+ * @deprecated Use `tickers.isPaused` from `@drincs/pixi-vn` instead.
737
372
  * Check if a ticker is paused.
738
373
  * @param alias The alias of the canvas element that will use the ticker.
739
374
  * @param tickerId The ticker that will be checked.
@@ -742,8 +377,9 @@ interface CanvasManagerInterface {
742
377
  isTickerPaused(alias: string, tickerId?: string): boolean;
743
378
  /**
744
379
  * Namespace for operations on canvas tickers.
380
+ * @deprecated Use the top-level `tickers` module (`@drincs/pixi-vn`) instead.
745
381
  */
746
- readonly tickers: CanvasTickersInterface;
382
+ readonly tickers: TickersInterface;
747
383
  /**
748
384
  * Pause the rendering of gameLayer and pause currently running tickers.
749
385
  * Use {@link resume} to restore rendering and resume only
@@ -759,7 +395,7 @@ interface CanvasManagerInterface {
759
395
  * Add a ticker that must be completed before the next step.
760
396
  * This method is used for example into a transition between scenes.
761
397
  * @param step The step that the ticker must be completed before the next step.
762
- * @deprecated Use {@link tickers}.completeOnStepEnd instead.
398
+ * @deprecated Use `tickers.completeOnStepEnd` from `@drincs/pixi-vn` instead.
763
399
  */
764
400
  completeTickerOnStepEnd(step: {
765
401
  /**
@@ -776,7 +412,7 @@ interface CanvasManagerInterface {
776
412
  * This funcions is called in the next step.
777
413
  * @param id The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.
778
414
  * @param alias The alias of the sequence of tickers.
779
- * @deprecated Use {@link tickers}.forceCompletion instead.
415
+ * @deprecated Use `tickers.forceCompletion` from `@drincs/pixi-vn` instead.
780
416
  */
781
417
  forceCompletionOfTicker(id: string, alias?: string): Promise<void>;
782
418
  /**
@@ -904,7 +540,7 @@ interface CanvasManagerInterface {
904
540
  */
905
541
  restore(data: object): Promise<void>;
906
542
  /**
907
- * @deprecated Use {@link tickers}.onComplete instead.
543
+ * @deprecated Use `tickers.onComplete` from `@drincs/pixi-vn` instead.
908
544
  */
909
545
  onTickerComplete(tickerId: string, options: {
910
546
  aliasToRemoveAfter: string[];
@@ -1365,32 +1001,6 @@ declare class CanvasManagerStatic {
1365
1001
  * The order of the elements in the canvas, is determined by the zIndex.
1366
1002
  */
1367
1003
  static get childrenAliasesOrder(): string[];
1368
- /** Edit Tickers Methods */
1369
- static get currentTickersWithoutCreatedBySteps(): {
1370
- [k: string]: TickerHistory<any>;
1371
- };
1372
- static readonly _currentTickers: Map<string, TickerInfo<any>>;
1373
- static readonly _currentTickersSequence: Map<string, Map<string, TickersSequence>>;
1374
- static get currentTickersSequence(): {
1375
- [alias: string]: {
1376
- [tickerId: string]: TickersSequence;
1377
- };
1378
- };
1379
- static readonly _currentTickersTimeouts: Map<string, TickerTimeoutHistory>;
1380
- static readonly _tickersToCompleteOnStepEnd: {
1381
- tikersIds: {
1382
- id: string;
1383
- }[];
1384
- stepAlias: {
1385
- id: string;
1386
- alias: string;
1387
- }[];
1388
- };
1389
- static generateTickerId(...args: any[]): string;
1390
- static addTickerTimeoutInfo(aliases: string | string[], ticker: string, timeout: string, canBeDeletedBeforeEnd: boolean): void;
1391
- static removeTickerTimeoutInfo(timeout: NodeJS.Timeout | string): void;
1392
- static removeTickerTimeout(timeout: NodeJS.Timeout | string): void;
1393
- static removeTickerTimeoutsByAlias(alias: string, checkCanBeDeletedBeforeEnd: boolean): void;
1394
1004
  }
1395
1005
 
1396
1006
  /**
@@ -1510,7 +1120,7 @@ declare function canvasComponentDecorator<M extends CanvasBaseItemMemory, T exte
1510
1120
  */
1511
1121
  copyProperty?: (component: CanvasBaseItem<M>, memory: M) => void | Promise<void>;
1512
1122
  }): (target: T) => void;
1513
- declare function setMemoryContainer<T extends Container$1>(element: T | Container$1, memory: ContainerOptions$1 | {}, options?: {
1123
+ declare function setMemoryContainer<T extends Container$1>(element: T | Container$1, memory: Partial<ContainerMemory> | {}, options?: {
1514
1124
  ignoreScale?: boolean;
1515
1125
  end?: () => Promise<void> | void;
1516
1126
  }): Promise<void>;
@@ -1620,38 +1230,44 @@ declare namespace RegisteredEvents {
1620
1230
  function keys(): string[];
1621
1231
  }
1622
1232
 
1233
+ interface RgbColorType {
1234
+ r: number;
1235
+ g: number;
1236
+ b: number;
1237
+ }
1238
+ interface RgbaColorType extends RgbColorType {
1239
+ a: number;
1240
+ }
1241
+ interface HslColorType {
1242
+ h: number;
1243
+ s: number;
1244
+ l: number;
1245
+ }
1246
+ interface HslaColorType extends HslColorType {
1247
+ a: number;
1248
+ }
1249
+ interface HsvColorType {
1250
+ h: number;
1251
+ s: number;
1252
+ v: number;
1253
+ }
1254
+ interface HsvaColorType extends HsvColorType {
1255
+ a: number;
1256
+ }
1623
1257
  /**
1624
- * Shake the canvas element.
1625
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1626
- * @param alias The alias to identify the component.
1627
- * @param options Animation options, matching the `options` of animate function.
1628
- * @param priority The priority of the PixiJS ticker. This parameter sets the ticker's priority.
1629
- * @returns
1258
+ * A color, accepted wherever Pixi'VN takes one (e.g. {@link FlashInOutProps.color}): a hex number
1259
+ * (`0xff0000`), a CSS-style string (`"#f00"`, `"red"`, `"rgb(255, 0, 0)"`, ...), an `[r, g, b]`/
1260
+ * `[r, g, b, a]` array, or one of the plain RGB(A)/HSL(A)/HSV(A) object shapes above.
1261
+ *
1262
+ * This is a JSON-serializable subset of `pixi.js`'s own `ColorSource` (which every value here is
1263
+ * still assignable to, so it can be passed straight into `Graphics.fill()`/`tint`/etc. unchanged) -
1264
+ * deliberately excluding `Float32Array`/`Uint8Array`/`Uint8ClampedArray` (which survive a
1265
+ * `JSON.stringify`/`JSON.parse` round-trip but lose their typed-array-ness, coming back as a plain
1266
+ * `{0: r, 1: g, ...}` object) and PixiJS's own `Color` class instance (not serializable at all). Both
1267
+ * would break `createExportableElement()` (ticker args, saved game state, ...) the same way a live
1268
+ * `Filter`/callback reference did elsewhere in the codebase.
1630
1269
  */
1631
- declare function shakeEffect(alias: string, options?: ShakeEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1632
-
1633
- declare namespace CanvasPropertyUtility {
1634
- function calculatePositionByAlign(type: "width" | "height", align: number, value: number, pivot: number, negativeScale: boolean, anchor?: number): number;
1635
- function calculateAlignByPosition(type: "width" | "height", position: number, value: number, pivot: number, negativeScale: boolean, anchor?: number): number;
1636
- function calculatePositionByPercentagePosition(type: "width" | "height", percentage: number): number;
1637
- function calculatePercentagePositionByPosition(type: "width" | "height", position: number): number;
1638
- function getSuperPoint(point: {
1639
- x: number;
1640
- y: number;
1641
- }, angle: number): {
1642
- x: number;
1643
- y: number;
1644
- };
1645
- function getPointBySuperPoint(superPoint: {
1646
- x: number;
1647
- y: number;
1648
- }, angle: number): {
1649
- x: number;
1650
- y: number;
1651
- };
1652
- function getSuperWidth(canvasElement: Container$1): number;
1653
- function getSuperHeight(canvasElement: Container$1): number;
1654
- }
1270
+ type ColorType = string | number | number[] | RgbColorType | RgbaColorType | HslColorType | HslaColorType | HsvColorType | HsvaColorType;
1655
1271
 
1656
1272
  interface BaseTransitionProps {
1657
1273
  /**
@@ -1661,160 +1277,1328 @@ interface BaseTransitionProps {
1661
1277
  */
1662
1278
  completeOnContinue?: boolean;
1663
1279
  }
1280
+ /**
1281
+ * Shared by every `xIn` transition that can replace an existing component (same alias): whether the
1282
+ * replaced component leaves with its own out animation, started together with the new component's in.
1283
+ */
1284
+ interface OldComponentOutProps {
1285
+ /**
1286
+ * If true, the component being replaced leaves with the matching out animation (`moveOut`, `wipeOut`,
1287
+ * ...), started at the same time as the in animation. If false, it stays untouched under the new
1288
+ * component and is removed once the in animation is done.
1289
+ * The default depends on the transition: `false` for `moveIn`/`zoomIn`, `true` for the others.
1290
+ */
1291
+ animateOldComponentOut?: boolean;
1292
+ }
1664
1293
  interface ShowWithDissolveTransitionProps extends BaseTransitionProps, AnimationOptions {
1665
1294
  }
1666
1295
  interface ShowWithFadeTransitionProps extends BaseTransitionProps, AnimationOptions {
1667
1296
  }
1668
- interface MoveInOutProps extends BaseTransitionProps, AnimationOptions {
1297
+ interface MoveInOutProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1669
1298
  /**
1670
1299
  * The direction of the movement.
1671
1300
  * @default "right"
1672
1301
  */
1673
1302
  direction?: "up" | "down" | "left" | "right";
1303
+ /**
1304
+ * Adds a motion-blur trail along the movement, ramping up mid-move and back to sharp at the end.
1305
+ * `true` uses a 40px trail; a number sets the trail length (pixels).
1306
+ * @default false
1307
+ */
1308
+ motionBlur?: boolean | number;
1674
1309
  }
1675
- interface ZoomInOutProps extends BaseTransitionProps, AnimationOptions {
1310
+ interface ZoomInOutProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1676
1311
  /**
1677
1312
  * The direction of the zoom effect.
1678
1313
  * @default "right"
1679
1314
  */
1680
1315
  direction?: "up" | "down" | "left" | "right";
1681
1316
  }
1682
- interface PushInOutProps extends BaseTransitionProps, AnimationOptions {
1317
+ interface PushInOutProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1683
1318
  /**
1684
1319
  * The direction of the push effect.
1685
1320
  * @default "right"
1686
1321
  */
1687
1322
  direction?: "up" | "down" | "left" | "right";
1323
+ /**
1324
+ * Adds a motion-blur trail along the movement, ramping up mid-move and back to sharp at the end.
1325
+ * `true` uses a 40px trail; a number sets the trail length (pixels).
1326
+ * @default false
1327
+ */
1328
+ motionBlur?: boolean | number;
1688
1329
  }
1689
-
1690
- type TComponent = CanvasBaseInterface<any> | string | string[] | {
1691
- value: string;
1692
- options: ImageSpriteOptions;
1693
- } | {
1694
- value: string[];
1695
- options: ImageContainerOptions;
1696
- };
1697
1330
  /**
1698
- * Show a image in the canvas with a disolve effect.
1699
- * Disolve effect is a effect that the image is shown with a fade in.
1700
- * If exist a image with the same alias, then the image is replaced and the first image is removed after the effect is done.
1701
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1702
- * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
1703
- * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
1704
- * If you don't provide the component, then the alias is used as the url.
1705
- * @param props The properties of the effect
1706
- * @param priority The priority of the effect
1707
- * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
1331
+ * Shared options for the mask-based reveal/conceal transitions ({@link WipeInOutProps},
1332
+ * {@link IrisInOutProps}, {@link SplitInOutProps}).
1333
+ */
1334
+ interface MaskTransitionProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1335
+ /**
1336
+ * If true, the effect is inverted: a "reveal" mask conceals instead, and vice versa.
1337
+ * @default false
1338
+ */
1339
+ invert?: boolean;
1340
+ }
1341
+ interface WipeInOutProps extends MaskTransitionProps {
1342
+ /**
1343
+ * The angle (in degrees) the wipe boundary sweeps towards. `0` is left-to-right, `90` is
1344
+ * bottom-to-top, `180` is right-to-left, `270` is top-to-bottom, and any other value produces a
1345
+ * diagonal wipe.
1346
+ * @default 0
1347
+ */
1348
+ angle?: number;
1349
+ /**
1350
+ * A convenience shorthand for {@link angle}: `"right"` (`0`), `"up"` (`90`), `"left"` (`180`),
1351
+ * `"down"` (`270`). Ignored if `angle` is also set.
1352
+ * @default "right"
1353
+ */
1354
+ direction?: "up" | "down" | "left" | "right";
1355
+ }
1356
+ interface IrisInOutProps extends MaskTransitionProps {
1357
+ /**
1358
+ * The origin of the iris, normalized to the component's own bounds (`0` to `1` on each axis).
1359
+ * @default { x: 0.5, y: 0.5 }
1360
+ */
1361
+ origin?: Partial<PointData>;
1362
+ /**
1363
+ * The aspect ratio (width / height) of the iris shape. `1` (the default) is a circle.
1364
+ * @default 1
1365
+ */
1366
+ aspect?: number;
1367
+ /**
1368
+ * `"expand"`: the image is seen *through* the circle (`irisIn` grows it, `irisOut` shrinks it).
1369
+ * `"contract"`: the image is seen *around* the circle, which is a hole (`irisIn` shrinks it until the
1370
+ * whole image is shown, `irisOut` grows it until the image is gone).
1371
+ * @default "expand"
1372
+ */
1373
+ direction?: "expand" | "contract";
1374
+ }
1375
+ interface SplitInOutProps extends MaskTransitionProps {
1376
+ /**
1377
+ * `"inward"`: reveal from the edges towards the split line; conceal from the split line outwards.
1378
+ * `"outward"`: reveal from the split line towards the edges; conceal from the edges inwards.
1379
+ * During replacement, the old component uses the opposite mode so its conceal follows the reveal.
1380
+ * @default "inward"
1381
+ */
1382
+ direction?: "inward" | "outward";
1383
+ /**
1384
+ * The axis the two mask panels move apart on/towards.
1385
+ * @default "vertical"
1386
+ */
1387
+ orientation?: "horizontal" | "vertical";
1388
+ /**
1389
+ * The origin of the split line, normalized to the component's own bounds (`0` to `1` on the axis
1390
+ * perpendicular to {@link orientation}).
1391
+ * @default 0.5
1392
+ */
1393
+ origin?: number;
1394
+ }
1395
+ interface FlashInOutProps extends BaseTransitionProps, AnimationOptions {
1396
+ /**
1397
+ * The overlay color. See {@link ColorType}.
1398
+ * @default 0xffffff
1399
+ */
1400
+ color?: ColorType;
1401
+ /**
1402
+ * The peak alpha the overlay reaches.
1403
+ * @default 1
1404
+ */
1405
+ maxAlpha?: number;
1406
+ /**
1407
+ * How long (in seconds) the overlay stays at {@link maxAlpha} before fading again.
1408
+ * @default 0
1409
+ */
1410
+ holdDuration?: number;
1411
+ /**
1412
+ * The number of times the overlay fades in and out.
1413
+ * @default 1
1414
+ */
1415
+ pulses?: number;
1416
+ /**
1417
+ * Whether the component itself also briefly fades in (`flashIn`) or out (`flashOut`) alongside the
1418
+ * color flash, softening what would otherwise be an instant pop-in/pop-out - the fade runs at a
1419
+ * quarter of the flash's own duration, mirrored to the start of `flashIn`'s cycle or the end of
1420
+ * `flashOut`'s. Ignored when `flashIn` replaces an existing component (both sides are already
1421
+ * hidden under a solid `color` at the moment of the swap, so there's no pop to soften).
1422
+ * @default true
1423
+ */
1424
+ fadeComponent?: boolean;
1425
+ }
1426
+ interface BlurInOutProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1427
+ /**
1428
+ * The blur strength the effect starts from (`blurIn`) or ends at (`blurOut`).
1429
+ * @default 32
1430
+ */
1431
+ strength?: number;
1432
+ /**
1433
+ * The quality (number of blur passes) of the blur filter. Higher is smoother but slower.
1434
+ * @default 4
1435
+ */
1436
+ quality?: number;
1437
+ /**
1438
+ * Whether the component itself also briefly fades in (`blurIn`) or out (`blurOut`) alongside the
1439
+ * blur, softening what would otherwise be an instant pop-in/pop-out - the fade runs at a quarter of
1440
+ * the effect's own duration, mirrored to the start of `blurIn` or the end of `blurOut`.
1441
+ * @default true
1442
+ */
1443
+ fadeComponent?: boolean;
1444
+ }
1445
+ interface PixelateInOutProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1446
+ /**
1447
+ * The pixel size the effect starts from (`pixelateIn`) or ends at (`pixelateOut`).
1448
+ * @default 32
1449
+ */
1450
+ pixelSize?: number;
1451
+ /**
1452
+ * The direction the pixel blocks drift as their size changes. Applies to both entering and
1453
+ * exiting components, including the old component during a replacement.
1454
+ * `"up-left"` moves from bottom-right towards top-left; the other values mirror either axis.
1455
+ * @default "up-left"
1456
+ */
1457
+ direction?: "up-left" | "up-right" | "down-left" | "down-right";
1458
+ /**
1459
+ * Whether the component itself also briefly fades in (`pixelateIn`) or out (`pixelateOut`) alongside
1460
+ * the pixelation, softening what would otherwise be an instant pop-in/pop-out - the fade runs at a
1461
+ * quarter of the effect's own duration, mirrored to the start of `pixelateIn` or the end of
1462
+ * `pixelateOut`. Off by default: pixelation itself already reads as a deliberate, blocky
1463
+ * appear/disappear, so a softening fade is less often wanted here than for blur/flash.
1464
+ * @default false
1465
+ */
1466
+ fadeComponent?: boolean;
1467
+ }
1468
+ /**
1469
+ * Shared options for the filter-based reveal/conceal transitions ({@link GlitchInOutProps},
1470
+ * {@link TwistInOutProps}, {@link WarpInOutProps}, {@link RippleInOutProps},
1471
+ * {@link NoiseDissolveInOutProps}, {@link PinchInOutProps}).
1472
+ */
1473
+ interface FilterFadeTransitionProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1474
+ /**
1475
+ * Whether the component itself also fades in (`xIn`) or out (`xOut`) alongside the filter effect,
1476
+ * at a quarter of the effect's own duration, mirrored to the start of `xIn` or the end of `xOut`
1477
+ * (same behavior as {@link BlurInOutProps.fadeComponent}). The default depends on the transition.
1478
+ */
1479
+ fadeComponent?: boolean;
1480
+ }
1481
+ interface GlitchInOutProps extends FilterFadeTransitionProps {
1482
+ /**
1483
+ * The peak slice-displacement (pixels) - the first burst of `glitchIn`, the last of `glitchOut`.
1484
+ * @default 40
1485
+ */
1486
+ strength?: number;
1487
+ /**
1488
+ * The number of glitch bursts.
1489
+ * @default 3
1490
+ */
1491
+ bursts?: number;
1492
+ /**
1493
+ * The number of glitch slices.
1494
+ * @default 8
1495
+ */
1496
+ slices?: number;
1497
+ /**
1498
+ * The peak red/blue channel separation (pixels) layered on top of the slices, following the same
1499
+ * envelope. `0` disables it.
1500
+ * @default 6
1501
+ */
1502
+ rgbSplit?: number;
1503
+ }
1504
+ interface TwistInOutProps extends FilterFadeTransitionProps {
1505
+ /**
1506
+ * How far (degrees) the swirl is wound up - where `twistIn` starts and `twistOut` ends.
1507
+ * Negate the angle to reverse the rotation. During replacement the old component uses the
1508
+ * opposite angle, so it winds up in the same rotational sense as the new component unwinds.
1509
+ * @default 540
1510
+ */
1511
+ angle?: number;
1512
+ /**
1513
+ * The radius (pixels) of the swirl. Defaults to half the component's diagonal, so the whole
1514
+ * component swirls.
1515
+ */
1516
+ radius?: number;
1517
+ /**
1518
+ * The center of the swirl, normalized to the component's own bounds (`0` to `1` on each axis).
1519
+ * @default { x: 0.5, y: 0.5 }
1520
+ */
1521
+ origin?: Partial<PointData>;
1522
+ }
1523
+ interface WarpInOutProps extends FilterFadeTransitionProps {
1524
+ /**
1525
+ * The zoom-blur strength `warpIn` starts from and `warpOut` ends at.
1526
+ * @default 0.6
1527
+ */
1528
+ strength?: number;
1529
+ /**
1530
+ * The point the streaks radiate from, normalized to the component's own bounds.
1531
+ * @default { x: 0.5, y: 0.5 }
1532
+ */
1533
+ origin?: Partial<PointData>;
1534
+ }
1535
+ interface RippleInOutProps extends FilterFadeTransitionProps {
1536
+ /**
1537
+ * The point the ripple starts from, normalized to the component's own bounds.
1538
+ * @default { x: 0.5, y: 0.5 }
1539
+ */
1540
+ origin?: Partial<PointData>;
1541
+ /**
1542
+ * The amplitude of the ripple.
1543
+ * @default 30
1544
+ */
1545
+ amplitude?: number;
1546
+ /**
1547
+ * The wavelength of the ripple.
1548
+ * @default 160
1549
+ */
1550
+ wavelength?: number;
1551
+ /**
1552
+ * The speed (pixels-per-second, in the ripple's own time) the ring travels outward. The ring always
1553
+ * travels until it has left the component; `speed` only shapes the ring.
1554
+ * @default 500
1555
+ */
1556
+ speed?: number;
1557
+ }
1558
+ interface NoiseDissolveInOutProps extends FilterFadeTransitionProps {
1559
+ /**
1560
+ * `"hard"`: the component appears/disappears in crisp noise-shaped blotches. `"soft"`: a cloudy,
1561
+ * gradual dissolve.
1562
+ * @default "hard"
1563
+ */
1564
+ edge?: "hard" | "soft";
1565
+ /**
1566
+ * The scale of the noise pattern - higher values give smaller, more numerous blotches.
1567
+ * @default 8
1568
+ */
1569
+ noiseScale?: number;
1570
+ /**
1571
+ * Picks the noise pattern. Random by default, so every dissolve looks different.
1572
+ */
1573
+ seed?: number;
1574
+ }
1575
+ interface TvInOutProps extends BaseTransitionProps, OldComponentOutProps, AnimationOptions {
1576
+ /**
1577
+ * The height of the collapsed bright line, as a fraction of the component's own height.
1578
+ * @default 0.02
1579
+ */
1580
+ lineThickness?: number;
1581
+ /**
1582
+ * How bright the collapsed line glows (`1` = no change).
1583
+ * @default 3
1584
+ */
1585
+ brightness?: number;
1586
+ /**
1587
+ * Whether CRT scanlines/noise are shown during the transition.
1588
+ * @default true
1589
+ */
1590
+ scanlines?: boolean;
1591
+ }
1592
+ interface PinchInOutProps extends FilterFadeTransitionProps {
1593
+ /**
1594
+ * How strong the deformation is, from `0` to `1` - where `pinchIn` starts and `pinchOut` ends.
1595
+ * @default 1
1596
+ */
1597
+ strength?: number;
1598
+ /**
1599
+ * `"pinch"`: sucked into/out of a point. `"bulge"`: puffed out from/into a point.
1600
+ * @default "pinch"
1601
+ */
1602
+ mode?: "pinch" | "bulge";
1603
+ /**
1604
+ * The radius (pixels) of the deformation. Defaults to half the component's diagonal.
1605
+ */
1606
+ radius?: number;
1607
+ /**
1608
+ * The center of the deformation, normalized to the component's own bounds.
1609
+ * @default { x: 0.5, y: 0.5 }
1610
+ */
1611
+ origin?: Partial<PointData>;
1612
+ }
1613
+
1614
+ interface ShakeEffectProps extends BaseTransitionProps, AnimationOptions {
1615
+ /**
1616
+ * The number of shocks. **Must be at least 3**.
1617
+ * @default 10
1618
+ */
1619
+ shocksNumber?: number;
1620
+ /**
1621
+ * The type of the shake effect
1622
+ * @default "horizontal"
1623
+ */
1624
+ shakeType?: "horizontal" | "vertical";
1625
+ /**
1626
+ * The maximum size of the shock.
1627
+ * For horizontal type, it is the maximum size of the x axis.
1628
+ * For vertical type, it is the maximum size of the y axis.
1629
+ * @default 10
1630
+ */
1631
+ maxShockSize?: number;
1632
+ }
1633
+ /**
1634
+ * Shared options for the generic, repeated articulated-animation effects ({@link BounceEffectProps},
1635
+ * {@link HopEffectProps}, {@link WiggleEffectProps}, {@link NodEffectProps}, {@link SwayEffectProps}):
1636
+ * a number of cycles, each one shrinking towards rest by {@link decay}.
1637
+ */
1638
+ interface DecayingEffectProps extends BaseTransitionProps, AnimationOptions {
1639
+ /**
1640
+ * How much each successive cycle shrinks relative to the previous one (`1` = no decay/constant
1641
+ * amplitude, `0` = the second cycle onward has no amplitude at all).
1642
+ * @default 0.5
1643
+ */
1644
+ decay?: number;
1645
+ }
1646
+ interface BounceEffectProps extends DecayingEffectProps {
1647
+ /**
1648
+ * The direction the component displaces towards on each bounce, before returning to rest.
1649
+ * @default "up"
1650
+ */
1651
+ direction?: "up" | "down" | "left" | "right";
1652
+ /**
1653
+ * The distance (in pixels) of the first, largest bounce.
1654
+ * @default 30
1655
+ */
1656
+ distance?: number;
1657
+ /**
1658
+ * The number of bounces.
1659
+ * @default 4
1660
+ */
1661
+ bounces?: number;
1662
+ }
1663
+ interface PulseEffectProps extends DecayingEffectProps {
1664
+ /**
1665
+ * The peak scale multiplier of the first, largest pulse (relative to the component's current
1666
+ * scale) - e.g. `1.2` grows the component 20% bigger at the peak of the first pulse.
1667
+ * @default 1.2
1668
+ */
1669
+ scale?: number;
1670
+ /**
1671
+ * The number of pulses.
1672
+ * @default 3
1673
+ */
1674
+ pulses?: number;
1675
+ }
1676
+ interface HopEffectProps extends DecayingEffectProps {
1677
+ /**
1678
+ * The direction of the (primary and any secondary) hops.
1679
+ * @default "up"
1680
+ */
1681
+ direction?: "up" | "down" | "left" | "right";
1682
+ /**
1683
+ * The distance (in pixels) of the primary hop.
1684
+ * @default 40
1685
+ */
1686
+ distance?: number;
1687
+ /**
1688
+ * The number of smaller, decaying hops to play after the primary one (`0` = just the one hop).
1689
+ * @default 0
1690
+ */
1691
+ secondaryHops?: number;
1692
+ }
1693
+ interface WiggleEffectProps extends DecayingEffectProps {
1694
+ /**
1695
+ * The peak rotation (in degrees) away from the component's current angle, on the first repetition.
1696
+ * @default 15
1697
+ */
1698
+ angle?: number;
1699
+ /**
1700
+ * The number of repetitions.
1701
+ * @default 3
1702
+ */
1703
+ repetitions?: number;
1704
+ }
1705
+ interface NodEffectProps extends DecayingEffectProps {
1706
+ /**
1707
+ * The axis the component oscillates along.
1708
+ * @default "horizontal"
1709
+ */
1710
+ axis?: "horizontal" | "vertical";
1711
+ /**
1712
+ * The distance (in pixels) of the first, largest oscillation.
1713
+ * @default 15
1714
+ */
1715
+ distance?: number;
1716
+ /**
1717
+ * The number of repetitions.
1718
+ * @default 3
1719
+ */
1720
+ repetitions?: number;
1721
+ }
1722
+ interface SwayEffectProps extends DecayingEffectProps {
1723
+ /**
1724
+ * The distance (in pixels) of the positional drift, on the first repetition.
1725
+ * @default 10
1726
+ */
1727
+ distance?: number;
1728
+ /**
1729
+ * The rotational drift (in degrees) away from the component's current angle, on the first
1730
+ * repetition.
1731
+ * @default 5
1732
+ */
1733
+ angle?: number;
1734
+ /**
1735
+ * The axis the positional drift moves along.
1736
+ * @default "horizontal"
1737
+ */
1738
+ axis?: "horizontal" | "vertical";
1739
+ /**
1740
+ * The number of repetitions.
1741
+ * @default 3
1742
+ */
1743
+ repetitions?: number;
1744
+ }
1745
+ interface PunchEffectProps extends BaseTransitionProps, AnimationOptions {
1746
+ /**
1747
+ * Which property the punch animates.
1748
+ * @default "scale"
1749
+ */
1750
+ mode?: "x" | "y" | "rotation" | "scale";
1751
+ /**
1752
+ * The strength of the punch's attack - a pixel distance for `x`/`y`, degrees for `rotation`, or a
1753
+ * scale multiplier delta for `scale` (e.g. `0.3` peaks at 1.3x the current scale).
1754
+ * @default 0.3
1755
+ */
1756
+ strength?: number;
1757
+ /**
1758
+ * How far the recovery overshoots past rest, in the opposite direction, as a fraction of
1759
+ * {@link strength} (`0` = no overshoot, settles straight back to rest).
1760
+ * @default 0.3
1761
+ */
1762
+ overshoot?: number;
1763
+ }
1764
+ interface GlitchEffectProps extends DecayingEffectProps {
1765
+ /**
1766
+ * The peak slice-displacement amount (pixels) of the first, largest burst.
1767
+ * @default 40
1768
+ */
1769
+ strength?: number;
1770
+ /**
1771
+ * The number of glitch bursts.
1772
+ * @default 3
1773
+ */
1774
+ bursts?: number;
1775
+ /**
1776
+ * The number of glitch slices.
1777
+ * @default 8
1778
+ */
1779
+ slices?: number;
1780
+ /**
1781
+ * The angle (in degrees) slices are displaced along.
1782
+ * @default 0
1783
+ */
1784
+ direction?: number;
1785
+ /**
1786
+ * The peak red/blue channel separation (pixels) layered on top of the slice displacement,
1787
+ * following the same jittery envelope. `0` disables it.
1788
+ * @default 6
1789
+ */
1790
+ rgbSplit?: number;
1791
+ }
1792
+ interface ChromaticAberrationEffectProps extends DecayingEffectProps {
1793
+ /**
1794
+ * The peak red/blue channel pixel offset of the first, largest burst (channels split in opposite
1795
+ * directions, green stays centered).
1796
+ * @default 8
1797
+ */
1798
+ strength?: number;
1799
+ /**
1800
+ * The axis the channels split along.
1801
+ * @default "horizontal"
1802
+ */
1803
+ axis?: "horizontal" | "vertical";
1804
+ /**
1805
+ * The number of bursts.
1806
+ * @default 1
1807
+ */
1808
+ bursts?: number;
1809
+ }
1810
+ interface ShockwaveEffectProps extends BaseTransitionProps, AnimationOptions {
1811
+ /**
1812
+ * The origin of the ripple, normalized (0-1) to the element's own bounds.
1813
+ * @default {x: 0.5, y: 0.5}
1814
+ */
1815
+ origin?: {
1816
+ x: number;
1817
+ y: number;
1818
+ };
1819
+ /**
1820
+ * The amplitude of the ripple.
1821
+ * @default 30
1822
+ */
1823
+ amplitude?: number;
1824
+ /**
1825
+ * The wavelength of the ripple.
1826
+ * @default 160
1827
+ */
1828
+ wavelength?: number;
1829
+ /**
1830
+ * The brightness of the ripple.
1831
+ * @default 1
1832
+ */
1833
+ brightness?: number;
1834
+ /**
1835
+ * The maximum radius (in pixels) the ripple travels before fading out. A value `<= 0` means the
1836
+ * ripple travels an infinite distance.
1837
+ * @default -1
1838
+ */
1839
+ radius?: number;
1840
+ /**
1841
+ * The speed (in pixels-per-second) the ripple travels outward.
1842
+ * @default 500
1843
+ */
1844
+ speed?: number;
1845
+ /**
1846
+ * How far the ripple's own internal "time" advances by the end of the animation (the ring's
1847
+ * radius is `time * speed` pixels). By default it's just enough for the ring to fully leave the
1848
+ * component - origin to farthest corner plus half a {@link wavelength} - or {@link radius} when set,
1849
+ * divided by {@link speed}.
1850
+ */
1851
+ strength?: number;
1852
+ }
1853
+ interface RadialBlurEffectProps extends DecayingEffectProps {
1854
+ /**
1855
+ * The peak zoom-blur strength of the first, largest burst.
1856
+ * @default 0.5
1857
+ */
1858
+ strength?: number;
1859
+ /**
1860
+ * The number of bursts.
1861
+ * @default 1
1862
+ */
1863
+ bursts?: number;
1864
+ /**
1865
+ * The origin the blur radiates from, normalized (0-1) to the element's own bounds.
1866
+ * @default {x: 0.5, y: 0.5}
1867
+ */
1868
+ origin?: {
1869
+ x: number;
1870
+ y: number;
1871
+ };
1872
+ /**
1873
+ * The inner radius (in pixels) excluded from the blur.
1874
+ * @default 0
1875
+ */
1876
+ innerRadius?: number;
1877
+ /**
1878
+ * The outer radius (in pixels) of the blur. A value `< 0` means the blur extends infinitely.
1879
+ * @default -1
1880
+ */
1881
+ radius?: number;
1882
+ }
1883
+ interface BlurPulseEffectProps extends DecayingEffectProps {
1884
+ /**
1885
+ * The peak blur strength of the first, largest pulse.
1886
+ * @default 8
1887
+ */
1888
+ strength?: number;
1889
+ /**
1890
+ * The number of pulses.
1891
+ * @default 3
1892
+ */
1893
+ pulses?: number;
1894
+ /**
1895
+ * The blur filter's own render quality (number of blur passes). Higher looks smoother but costs
1896
+ * more to render.
1897
+ * @default 4
1898
+ */
1899
+ quality?: number;
1900
+ }
1901
+ interface VignettePulseEffectProps extends DecayingEffectProps {
1902
+ /**
1903
+ * The peak vignette opacity of the first, largest pulse.
1904
+ * @default 1
1905
+ */
1906
+ strength?: number;
1907
+ /**
1908
+ * The number of pulses.
1909
+ * @default 1
1910
+ */
1911
+ pulses?: number;
1912
+ /**
1913
+ * How far the darkening reaches in from the corners, from `0` (none) to `1` (the whole element) -
1914
+ * `0.5` darkens roughly the outer half.
1915
+ * @default 0.5
1916
+ */
1917
+ radius?: number;
1918
+ /**
1919
+ * How soft the transition from the clear center to the dark edges is (`0` = a hard edge).
1920
+ * @default 0.5
1921
+ */
1922
+ blur?: number;
1923
+ }
1924
+ interface DesaturateEffectProps extends BaseTransitionProps, AnimationOptions {
1925
+ /**
1926
+ * The saturation floor reached at the trough (`0` = full grayscale, `1` = no desaturation at all).
1927
+ * @default 0
1928
+ */
1929
+ amount?: number;
1930
+ /**
1931
+ * How long the component stays at {@link amount} before recovering back to normal saturation, on
1932
+ * top of the fade in/out (each {@link AnimationOptions.duration}).
1933
+ * @default 0
1934
+ */
1935
+ holdDuration?: number;
1936
+ }
1937
+ interface GlowPulseEffectProps extends DecayingEffectProps {
1938
+ /**
1939
+ * The peak outward glow strength of the first, largest pulse.
1940
+ * @default 4
1941
+ */
1942
+ strength?: number;
1943
+ /**
1944
+ * The number of pulses.
1945
+ * @default 3
1946
+ */
1947
+ pulses?: number;
1948
+ /**
1949
+ * The color of the glow.
1950
+ * @default 0xffffff
1951
+ */
1952
+ color?: number;
1953
+ /**
1954
+ * The distance (in pixels) the glow extends.
1955
+ * @default 10
1956
+ */
1957
+ distance?: number;
1958
+ /**
1959
+ * The strength of the glow inward from the edge of the component.
1960
+ * @default 0
1961
+ */
1962
+ innerStrength?: number;
1963
+ }
1964
+
1965
+ /**
1966
+ * @deprecated Use `effects.shakeEffect` instead.
1967
+ */
1968
+ declare function shakeEffect(alias: string, options?: ShakeEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1969
+ declare namespace effects {
1970
+ /**
1971
+ * Shake the canvas element.
1972
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1973
+ * @param alias The alias to identify the component.
1974
+ * @param options Animation options, matching the `options` of animate function.
1975
+ * @param priority The priority of the PixiJS ticker. This parameter sets the ticker's priority.
1976
+ * @returns
1977
+ */
1978
+ function shakeEffect(alias: string, options?: ShakeEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1979
+ /**
1980
+ * Bounce the canvas element: a one-directional displacement that repeatedly returns to rest, each
1981
+ * bounce shrinking towards rest by {@link BounceEffectProps.decay}. Like a dropped ball settling.
1982
+ * @param alias The alias to identify the component.
1983
+ * @param options Animation options.
1984
+ * @param priority The priority of the PixiJS ticker.
1985
+ */
1986
+ function bounceEffect(alias: string, options?: BounceEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1987
+ /**
1988
+ * Pulse the canvas element: a repeated, decaying scale bump away from its current scale and back.
1989
+ * @param alias The alias to identify the component.
1990
+ * @param options Animation options.
1991
+ * @param priority The priority of the PixiJS ticker.
1992
+ */
1993
+ function pulseEffect(alias: string, options?: PulseEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1994
+ /**
1995
+ * Hop the canvas element: one deliberate displacement-and-return, optionally followed by smaller,
1996
+ * decaying secondary hops.
1997
+ * @param alias The alias to identify the component.
1998
+ * @param options Animation options.
1999
+ * @param priority The priority of the PixiJS ticker.
2000
+ */
2001
+ function hopEffect(alias: string, options?: HopEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2002
+ /**
2003
+ * Wiggle the canvas element: a decaying rotation oscillation around its current angle.
2004
+ * @param alias The alias to identify the component.
2005
+ * @param options Animation options.
2006
+ * @param priority The priority of the PixiJS ticker.
2007
+ */
2008
+ function wiggleEffect(alias: string, options?: WiggleEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2009
+ /**
2010
+ * Nod the canvas element: a decaying positional oscillation along one axis.
2011
+ * @param alias The alias to identify the component.
2012
+ * @param options Animation options.
2013
+ * @param priority The priority of the PixiJS ticker.
2014
+ */
2015
+ function nodEffect(alias: string, options?: NodEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2016
+ /**
2017
+ * Sway the canvas element: a smooth, optionally combined positional and rotational drift around its
2018
+ * current state - a gentler, slower cousin of {@link nodEffect}/{@link wiggleEffect}.
2019
+ * @param alias The alias to identify the component.
2020
+ * @param options Animation options.
2021
+ * @param priority The priority of the PixiJS ticker.
2022
+ */
2023
+ function swayEffect(alias: string, options?: SwayEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2024
+ /**
2025
+ * Punch the canvas element: a single fast impulse (position, rotation, or scale) with a strong
2026
+ * attack and a short, slightly overshooting recovery back to rest - unlike every other effect here,
2027
+ * this is a one-shot impact, not a repeated oscillation.
2028
+ * @param alias The alias to identify the component.
2029
+ * @param options Animation options.
2030
+ * @param priority The priority of the PixiJS ticker.
2031
+ */
2032
+ function punchEffect(alias: string, options?: PunchEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2033
+ /**
2034
+ * Glitch the canvas element: decaying, jittery bursts of digital-corruption slice displacement
2035
+ * ({@link https://pixijs.io/filters/docs/GlitchFilter.html GlitchFilter}) - each burst snaps,
2036
+ * kicks back the other way and settles - with a matching red/blue channel split layered on top
2037
+ * ({@link https://pixijs.io/filters/docs/RGBSplitFilter.html RGBSplitFilter}, see
2038
+ * {@link GlitchEffectProps.rgbSplit}). Both filters are removed once done. Returns one ticker id
2039
+ * per filter.
2040
+ *
2041
+ * Known cosmetic quirk: `GlitchFilter`'s own `destroy()` (called once this effect completes, to
2042
+ * clean up its displacement texture) can log a harmless `PixiJS Warning: [BindGroup] a
2043
+ * 'textureSource'/'textureSampler' was destroyed while still bound to a shader` in the console -
2044
+ * this comes from `pixi-filters`' own implementation, not from this effect, doesn't affect the
2045
+ * component's rendering or state, and every property is still correctly restored/detached.
2046
+ * @param alias The alias to identify the component.
2047
+ * @param options Animation options.
2048
+ * @param priority The priority of the PixiJS ticker.
2049
+ */
2050
+ function glitchEffect(alias: string, options?: GlitchEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2051
+ /**
2052
+ * Chromatic-aberration the canvas element: the red and blue color channels split apart in opposite
2053
+ * directions and snap back, in a decaying burst
2054
+ * ({@link https://pixijs.io/filters/docs/RGBSplitFilter.html RGBSplitFilter}).
2055
+ * @param alias The alias to identify the component.
2056
+ * @param options Animation options.
2057
+ * @param priority The priority of the PixiJS ticker.
2058
+ */
2059
+ function chromaticAberrationEffect(alias: string, options?: ChromaticAberrationEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2060
+ /**
2061
+ * Shockwave the canvas element: a single radial ripple distortion travels outward from an origin
2062
+ * point and fades ({@link https://pixijs.io/filters/docs/ShockwaveFilter.html ShockwaveFilter}) -
2063
+ * a one-shot impact, not a repeated oscillation.
2064
+ * @param alias The alias to identify the component.
2065
+ * @param options Animation options.
2066
+ * @param priority The priority of the PixiJS ticker.
2067
+ */
2068
+ function shockwaveEffect(alias: string, options?: ShockwaveEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2069
+ /**
2070
+ * Radially blur the canvas element: a decaying burst of zoom-blur radiating from an origin point,
2071
+ * settling back to no blur between and after each burst
2072
+ * ({@link https://pixijs.io/filters/docs/ZoomBlurFilter.html ZoomBlurFilter}).
2073
+ * @param alias The alias to identify the component.
2074
+ * @param options Animation options.
2075
+ * @param priority The priority of the PixiJS ticker.
2076
+ */
2077
+ function radialBlurEffect(alias: string, options?: RadialBlurEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2078
+ /**
2079
+ * Pulse a blur on the canvas element: a repeated, decaying blur bump that settles back to no blur
2080
+ * between and after each pulse ({@link https://pixijs.io/filters/docs/BlurFilter.html BlurFilter}).
2081
+ * @param alias The alias to identify the component.
2082
+ * @param options Animation options.
2083
+ * @param priority The priority of the PixiJS ticker.
2084
+ */
2085
+ function blurPulseEffect(alias: string, options?: BlurPulseEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2086
+ /**
2087
+ * Pulse a vignette on the canvas element: the edges darken and recover, in a repeated, decaying
2088
+ * pulse - built on {@link https://pixijs.io/filters/docs/CRTFilter.html CRTFilter} with its
2089
+ * scanline/noise features turned off, isolating just the vignette.
2090
+ *
2091
+ * The vignette darkens the corners of the element's own bounding rectangle, so it's meant for
2092
+ * backgrounds and other full-frame images; on a sprite with transparent corners (a character, a
2093
+ * shape) there's little to darken and it barely shows.
2094
+ * @param alias The alias to identify the component.
2095
+ * @param options Animation options.
2096
+ * @param priority The priority of the PixiJS ticker.
2097
+ */
2098
+ function vignettePulseEffect(alias: string, options?: VignettePulseEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2099
+ /**
2100
+ * Desaturate the canvas element: color drains out to {@link DesaturateEffectProps.amount} and
2101
+ * recovers back to normal - a single dip, not a repeated oscillation
2102
+ * ({@link https://pixijs.io/filters/docs/AdjustmentFilter.html AdjustmentFilter}).
2103
+ * @param alias The alias to identify the component.
2104
+ * @param options Animation options.
2105
+ * @param priority The priority of the PixiJS ticker.
2106
+ */
2107
+ function desaturateEffect(alias: string, options?: DesaturateEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2108
+ /**
2109
+ * Pulse a glow on the canvas element: a repeated, decaying outward glow that settles back to no
2110
+ * glow between and after each pulse ({@link https://pixijs.io/filters/docs/GlowFilter.html GlowFilter}).
2111
+ * @param alias The alias to identify the component.
2112
+ * @param options Animation options.
2113
+ * @param priority The priority of the PixiJS ticker.
2114
+ */
2115
+ function glowPulseEffect(alias: string, options?: GlowPulseEffectProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2116
+ }
2117
+
2118
+ declare namespace CanvasPropertyUtility {
2119
+ function calculatePositionByAlign(type: "width" | "height", align: number, value: number, pivot: number, negativeScale: boolean, anchor?: number): number;
2120
+ function calculateAlignByPosition(type: "width" | "height", position: number, value: number, pivot: number, negativeScale: boolean, anchor?: number): number;
2121
+ function calculatePositionByPercentagePosition(type: "width" | "height", percentage: number): number;
2122
+ function calculatePercentagePositionByPosition(type: "width" | "height", position: number): number;
2123
+ function getSuperPoint(point: {
2124
+ x: number;
2125
+ y: number;
2126
+ }, angle: number): {
2127
+ x: number;
2128
+ y: number;
2129
+ };
2130
+ function getPointBySuperPoint(superPoint: {
2131
+ x: number;
2132
+ y: number;
2133
+ }, angle: number): {
2134
+ x: number;
2135
+ y: number;
2136
+ };
2137
+ function getSuperWidth(canvasElement: Container$1): number;
2138
+ function getSuperHeight(canvasElement: Container$1): number;
2139
+ }
2140
+
2141
+ type TComponent = CanvasBaseInterface<any> | string | string[] | {
2142
+ value: string;
2143
+ options: ImageSpriteOptions;
2144
+ } | {
2145
+ value: string[];
2146
+ options: ImageContainerOptions;
2147
+ };
2148
+ /**
2149
+ * @deprecated Use `transitions.showWithDissolve` instead.
1708
2150
  */
1709
2151
  declare function showWithDissolve(alias: string, component?: TComponent, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1710
2152
  /**
1711
- * Remove a image from the canvas with a disolve effect.
1712
- * Disolve effect is a effect that the image is removed with a fade out.
1713
- * This function is equivalent to {@link removeWithFade}.
1714
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1715
- * @param props The properties of the effect
1716
- * @param priority The priority of the effect
1717
- * @returns The ids of the tickers that are used in the effect.
2153
+ * @deprecated Use `transitions.removeWithDissolve` instead.
1718
2154
  */
1719
2155
  declare function removeWithDissolve(alias: string, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
1720
2156
  /**
1721
- * Show a image in the canvas with a fade effect.
1722
- * Fade effect is a effect that the image is shown with a fade in.
1723
- * If exist a image with the same alias, the existing image is removed with a fade transition, and after the effect is done, the new image is shown with a fade transition.
1724
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1725
- * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
1726
- * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
1727
- * If you don't provide the component, then the alias is used as the url.
1728
- * @param props The properties of the effect
1729
- * @param priority The priority of the effect
1730
- * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2157
+ * @deprecated Use `transitions.showWithFade` instead.
1731
2158
  */
1732
2159
  declare function showWithFade(alias: string, component?: TComponent, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1733
2160
  /**
1734
- * Remove a image from the canvas with a fade effect.
1735
- * Fade effect is a effect that the image is removed with a fade out.
1736
- * This function is equivalent to {@link removeWithDissolve}.
1737
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1738
- * @param props The properties of the effect
1739
- * @param priority The priority of the effect
1740
- * @returns The ids of the tickers that are used in the effect.
2161
+ * @deprecated Use `transitions.removeWithFade` instead.
1741
2162
  */
1742
2163
  declare function removeWithFade(alias: string, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
1743
2164
  /**
1744
- * Show a image in the canvas with a move effect. The image is moved from outside the canvas to the x and y position of the image.
1745
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1746
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1747
- * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
1748
- * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
1749
- * If you don't provide the component, then the alias is used as the url.
1750
- * @param props The properties of the effect
1751
- * @param priority The priority of the effect
1752
- * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2165
+ * @deprecated Use `transitions.moveIn` instead.
1753
2166
  */
1754
2167
  declare function moveIn(alias: string, component?: TComponent, props?: MoveInOutProps & {
1755
2168
  /**
1756
- * If true, then the old component is removed with a move out, after the new image is moved in.
1757
- * @default false
2169
+ * @deprecated Use `animateOldComponentOut` instead.
1758
2170
  */
1759
2171
  removeOldComponentWithMoveOut?: boolean;
1760
2172
  }, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1761
2173
  /**
1762
- * Remove a image from the canvas with a move effect. The image is moved from the x and y position of the image to outside the canvas.
1763
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1764
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1765
- * @param props The properties of the effect
1766
- * @param priority The priority of the effect
1767
- * @returns The ids of the tickers that are used in the effect.
2174
+ * @deprecated Use `transitions.moveOut` instead.
1768
2175
  */
1769
2176
  declare function moveOut(alias: string, props?: MoveInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
1770
2177
  /**
1771
- * Show a image in the canvas with a zoom effect. The image is zoomed in from the center of the canvas.
1772
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1773
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1774
- * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
1775
- * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
1776
- * If you don't provide the component, then the alias is used as the url.
1777
- * @param props The properties of the effect
1778
- * @param priority The priority of the effect
1779
- * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2178
+ * @deprecated Use `transitions.zoomIn` instead.
1780
2179
  */
1781
2180
  declare function zoomIn(alias: string, component?: TComponent, props?: ZoomInOutProps & {
1782
2181
  /**
1783
- * If true, then the old component is removed with a zoom out, after the new image is zoomed in.
1784
- * @default false
2182
+ * @deprecated Use `animateOldComponentOut` instead.
1785
2183
  */
1786
2184
  removeOldComponentWithZoomOut?: boolean;
1787
2185
  }, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1788
2186
  /**
1789
- * Remove a image from the canvas with a zoom effect. The image is zoomed out to the center of the canvas.
1790
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1791
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1792
- * @param props The properties of the effect
1793
- * @param priority The priority of the effect
1794
- * @returns The ids of the tickers that are used in the effect.
2187
+ * @deprecated Use `transitions.zoomOut` instead.
1795
2188
  */
1796
2189
  declare function zoomOut(alias: string, props?: ZoomInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
1797
2190
  /**
1798
- * Show a image in the canvas with a push effect. The new image is pushed in from the inside of the canvas and the old image is pushed out to the outside of the canvas.
1799
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1800
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1801
- * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
1802
- * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
1803
- * If you don't provide the component, then the alias is used as the url.
1804
- * @param props The properties of the effect
1805
- * @param priority The priority of the effect
1806
- * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2191
+ * @deprecated Use `transitions.pushIn` instead.
1807
2192
  */
1808
2193
  declare function pushIn(alias: string, component?: TComponent, props?: PushInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
1809
2194
  /**
1810
- * Remove a image from the canvas with a push effect. The image is pushed out to the outside of the canvas.
1811
- * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
1812
- * @param alias The unique alias of the image. You can use this alias to refer to this image
1813
- * @param props The properties of the effect
1814
- * @param priority The priority of the effect
1815
- * @returns The ids of the tickers that are used in the effect.
2195
+ * @deprecated Use `transitions.pushOut` instead.
1816
2196
  */
1817
2197
  declare function pushOut(alias: string, props?: PushInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2198
+ declare namespace transitions {
2199
+ /**
2200
+ * Show a image in the canvas with a disolve effect.
2201
+ * Disolve effect is a effect that the image is shown with a fade in.
2202
+ * If exist a image with the same alias, then the image is replaced and the first image is removed after the effect is done.
2203
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2204
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2205
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2206
+ * If you don't provide the component, then the alias is used as the url.
2207
+ * @param props The properties of the effect
2208
+ * @param priority The priority of the effect
2209
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2210
+ */
2211
+ function showWithDissolve(alias: string, component?: TComponent, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2212
+ /**
2213
+ * Remove a image from the canvas with a disolve effect.
2214
+ * Disolve effect is a effect that the image is removed with a fade out.
2215
+ * This function is equivalent to {@link removeWithFade}.
2216
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2217
+ * @param props The properties of the effect
2218
+ * @param priority The priority of the effect
2219
+ * @returns The ids of the tickers that are used in the effect.
2220
+ */
2221
+ function removeWithDissolve(alias: string, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2222
+ /**
2223
+ * Show a image in the canvas with a fade effect.
2224
+ * Fade effect is a effect that the image is shown with a fade in.
2225
+ * If exist a image with the same alias, the existing image is removed with a fade transition, and after the effect is done, the new image is shown with a fade transition.
2226
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2227
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2228
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2229
+ * If you don't provide the component, then the alias is used as the url.
2230
+ * @param props The properties of the effect
2231
+ * @param priority The priority of the effect
2232
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2233
+ */
2234
+ function showWithFade(alias: string, component?: TComponent, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2235
+ /**
2236
+ * Remove a image from the canvas with a fade effect.
2237
+ * Fade effect is a effect that the image is removed with a fade out.
2238
+ * This function is equivalent to {@link removeWithDissolve}.
2239
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2240
+ * @param props The properties of the effect
2241
+ * @param priority The priority of the effect
2242
+ * @returns The ids of the tickers that are used in the effect.
2243
+ */
2244
+ function removeWithFade(alias: string, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2245
+ /**
2246
+ * Show a image in the canvas with a move effect. The image is moved from outside the canvas to the x and y position of the image.
2247
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
2248
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2249
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2250
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2251
+ * If you don't provide the component, then the alias is used as the url.
2252
+ * @param props The properties of the effect
2253
+ * @param priority The priority of the effect
2254
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2255
+ */
2256
+ function moveIn(alias: string, component?: TComponent, props?: MoveInOutProps & {
2257
+ /**
2258
+ * @deprecated Use `animateOldComponentOut` instead.
2259
+ */
2260
+ removeOldComponentWithMoveOut?: boolean;
2261
+ }, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2262
+ /**
2263
+ * Remove a image from the canvas with a move effect. The image is moved from the x and y position of the image to outside the canvas.
2264
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
2265
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2266
+ * @param props The properties of the effect
2267
+ * @param priority The priority of the effect
2268
+ * @returns The ids of the tickers that are used in the effect.
2269
+ */
2270
+ function moveOut(alias: string, props?: MoveInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2271
+ /**
2272
+ * Show a image in the canvas with a zoom effect. The image is zoomed in from the center of the canvas.
2273
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
2274
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2275
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2276
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2277
+ * If you don't provide the component, then the alias is used as the url.
2278
+ * @param props The properties of the effect
2279
+ * @param priority The priority of the effect
2280
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2281
+ */
2282
+ function zoomIn(alias: string, component?: TComponent, props?: ZoomInOutProps & {
2283
+ /**
2284
+ * @deprecated Use `animateOldComponentOut` instead.
2285
+ */
2286
+ removeOldComponentWithZoomOut?: boolean;
2287
+ }, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2288
+ /**
2289
+ * Remove a image from the canvas with a zoom effect. The image is zoomed out to the center of the canvas.
2290
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
2291
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2292
+ * @param props The properties of the effect
2293
+ * @param priority The priority of the effect
2294
+ * @returns The ids of the tickers that are used in the effect.
2295
+ */
2296
+ function zoomOut(alias: string, props?: ZoomInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2297
+ /**
2298
+ * Show a image in the canvas with a push effect. The new image is pushed in from the inside of the canvas and the old image is pushed out to the outside of the canvas.
2299
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
2300
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2301
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2302
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2303
+ * If you don't provide the component, then the alias is used as the url.
2304
+ * @param props The properties of the effect
2305
+ * @param priority The priority of the effect
2306
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2307
+ */
2308
+ function pushIn(alias: string, component?: TComponent, props?: PushInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2309
+ /**
2310
+ * Remove a image from the canvas with a push effect. The image is pushed out to the outside of the canvas.
2311
+ * If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
2312
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2313
+ * @param props The properties of the effect
2314
+ * @param priority The priority of the effect
2315
+ * @returns The ids of the tickers that are used in the effect.
2316
+ */
2317
+ function pushOut(alias: string, props?: PushInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2318
+ /**
2319
+ * Show a image in the canvas with a wipe effect: the image is progressively revealed by a moving
2320
+ * boundary. The direction/angle and inversion are all configurable, so the same primitive can
2321
+ * produce horizontal, vertical, or diagonal reveals - see {@link WipeInOutProps}.
2322
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2323
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2324
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2325
+ * If you don't provide the component, then the alias is used as the url.
2326
+ * @param props The properties of the effect
2327
+ * @param priority The priority of the effect
2328
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2329
+ */
2330
+ function wipeIn(alias: string, component?: TComponent, props?: WipeInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2331
+ /**
2332
+ * Remove a image from the canvas with a wipe effect: the image is progressively concealed by a
2333
+ * moving boundary. See {@link wipeIn} and {@link WipeInOutProps}.
2334
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2335
+ * @param props The properties of the effect
2336
+ * @param priority The priority of the effect
2337
+ * @returns The ids of the tickers that are used in the effect.
2338
+ */
2339
+ function wipeOut(alias: string, props?: WipeInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2340
+ /**
2341
+ * Show a image in the canvas with an iris effect: the image is progressively revealed by an
2342
+ * expanding radial mask. Moving {@link IrisInOutProps.origin} off-center makes the same primitive
2343
+ * useful as a focus/reveal effect (e.g. centered on a character).
2344
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2345
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2346
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2347
+ * If you don't provide the component, then the alias is used as the url.
2348
+ * @param props The properties of the effect
2349
+ * @param priority The priority of the effect
2350
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2351
+ */
2352
+ function irisIn(alias: string, component?: TComponent, props?: IrisInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2353
+ /**
2354
+ * Remove a image from the canvas with an iris effect: the image is progressively concealed by a
2355
+ * contracting radial mask. See {@link irisIn} and {@link IrisInOutProps}.
2356
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2357
+ * @param props The properties of the effect
2358
+ * @param priority The priority of the effect
2359
+ * @returns The ids of the tickers that are used in the effect.
2360
+ */
2361
+ function irisOut(alias: string, props?: IrisInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2362
+ /**
2363
+ * Show a image in the canvas with a split effect: two mask panels slide together from the edges to
2364
+ * progressively reveal the image, meeting at the split line once fully shown. With
2365
+ * `direction: "outward"`, the reveal grows from the split line towards the edges instead.
2366
+ * During replacement, the old component's conceal follows the new component's reveal.
2367
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2368
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2369
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2370
+ * If you don't provide the component, then the alias is used as the url.
2371
+ * @param props The properties of the effect
2372
+ * @param priority The priority of the effect
2373
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2374
+ */
2375
+ function splitIn(alias: string, component?: TComponent, props?: SplitInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2376
+ /**
2377
+ * Remove a image from the canvas with a split effect: two mask panels retract apart toward the
2378
+ * edges to progressively conceal the image. With `direction: "outward"`, the visible region
2379
+ * shrinks from the edges towards the split line. See {@link splitIn} and {@link SplitInOutProps}.
2380
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2381
+ * @param props The properties of the effect
2382
+ * @param priority The priority of the effect
2383
+ * @returns The ids of the tickers that are used in the effect.
2384
+ */
2385
+ function splitOut(alias: string, props?: SplitInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2386
+ /**
2387
+ * Show a image in the canvas with a blur effect: the image appears already blurred and sharpens
2388
+ * into focus. A generic blur, not a "dream"/"flashback" transition specifically - combine it with
2389
+ * {@link showWithFade} for that recipe. See {@link BlurInOutProps}.
2390
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2391
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2392
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2393
+ * If you don't provide the component, then the alias is used as the url.
2394
+ * @param props The properties of the effect
2395
+ * @param priority The priority of the effect
2396
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2397
+ */
2398
+ function blurIn(alias: string, component?: TComponent, props?: BlurInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2399
+ /**
2400
+ * Remove a image from the canvas with a blur effect: the image blurs out of focus before being
2401
+ * removed. See {@link blurIn} and {@link BlurInOutProps}.
2402
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2403
+ * @param props The properties of the effect
2404
+ * @param priority The priority of the effect
2405
+ * @returns The ids of the tickers that are used in the effect.
2406
+ */
2407
+ function blurOut(alias: string, props?: BlurInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2408
+ /**
2409
+ * Show a image in the canvas with a pixelate effect: the image appears pixelated and resolves into
2410
+ * focus. Useful for retro effects, digital transitions, censorship/stylization, or scene changes -
2411
+ * not only "glitch" scenes. See {@link PixelateInOutProps}.
2412
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2413
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2414
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2415
+ * If you don't provide the component, then the alias is used as the url.
2416
+ * @param props The properties of the effect
2417
+ * @param priority The priority of the effect
2418
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2419
+ */
2420
+ function pixelateIn(alias: string, component?: TComponent, props?: PixelateInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2421
+ /**
2422
+ * Remove a image from the canvas with a pixelate effect: the image pixelates before being removed.
2423
+ * See {@link pixelateIn} and {@link PixelateInOutProps}.
2424
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2425
+ * @param props The properties of the effect
2426
+ * @param priority The priority of the effect
2427
+ * @returns The ids of the tickers that are used in the effect.
2428
+ */
2429
+ function pixelateOut(alias: string, props?: PixelateInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2430
+ /**
2431
+ * Show a image in the canvas with a flash effect, with a configurable solid-color overlay (not
2432
+ * limited to a white flash). White reads as a camera/explosion-like flash, black as a blink/cut, and
2433
+ * arbitrary colors work for damage/magic/memory/UI transitions. See {@link FlashInOutProps}.
2434
+ *
2435
+ * If `alias` has no existing component, the new image appears immediately and the overlay fades in
2436
+ * and back out over it. If `alias` already has a component, the *current* content fades up to
2437
+ * `color` first, is swapped for the new content at the exact moment the screen is a solid `color`
2438
+ * (so the content change itself is invisible), and the new content then fades back down from `color`
2439
+ * to normal - see {@link flashReplace}.
2440
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2441
+ * @param component The imageUrl, array of imageUrl or the canvas component. If imageUrl is a video, then the {@link VideoSprite} is added to the canvas.
2442
+ * If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
2443
+ * If you don't provide the component, then the alias is used as the url.
2444
+ * @param props The properties of the effect
2445
+ * @param priority The priority of the effect
2446
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2447
+ */
2448
+ function flashIn(alias: string, component?: TComponent, props?: FlashInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2449
+ /**
2450
+ * Remove a image from the canvas with a flash effect: a configurable solid-color overlay fades up to
2451
+ * `color` and back down to normal, and the image is removed the instant that finishes - the removal
2452
+ * itself is a hard cut, never an additional fade/dissolve. See {@link flashIn} and
2453
+ * {@link FlashInOutProps}.
2454
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2455
+ * @param props The properties of the effect
2456
+ * @param priority The priority of the effect
2457
+ * @returns The ids of the tickers that are used in the effect.
2458
+ */
2459
+ function flashOut(alias: string, props?: FlashInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2460
+ /**
2461
+ * Show a image in the canvas with a glitch effect: the image materializes out of jittery bursts of
2462
+ * digital-corruption slices with red/blue fringing, which settle as it appears. See
2463
+ * {@link GlitchInOutProps}.
2464
+ * When replacing an existing component, waits for its out animation before starting the entrance.
2465
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2466
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2467
+ * @param props The properties of the effect
2468
+ * @param priority The priority of the effect
2469
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2470
+ */
2471
+ function glitchIn(alias: string, component?: TComponent, props?: GlitchInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2472
+ /**
2473
+ * Remove a image from the canvas with a glitch effect: digital-corruption bursts build up until the
2474
+ * image is removed. See {@link glitchIn} and {@link GlitchInOutProps}.
2475
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2476
+ * @param props The properties of the effect
2477
+ * @param priority The priority of the effect
2478
+ * @returns The ids of the tickers that are used in the effect.
2479
+ */
2480
+ function glitchOut(alias: string, props?: GlitchInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2481
+ /**
2482
+ * Show a image in the canvas with a twist effect: the image unwinds out of a swirl, like coming
2483
+ * through a vortex or portal. See {@link TwistInOutProps}.
2484
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2485
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2486
+ * @param props The properties of the effect
2487
+ * @param priority The priority of the effect
2488
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2489
+ */
2490
+ function twistIn(alias: string, component?: TComponent, props?: TwistInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2491
+ /**
2492
+ * Remove a image from the canvas with a twist effect: the image winds up into a swirl before being
2493
+ * removed. See {@link twistIn} and {@link TwistInOutProps}.
2494
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2495
+ * @param props The properties of the effect
2496
+ * @param priority The priority of the effect
2497
+ * @returns The ids of the tickers that are used in the effect.
2498
+ */
2499
+ function twistOut(alias: string, props?: TwistInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2500
+ /**
2501
+ * Show a image in the canvas with a warp effect: the image arrives out of radial zoom-blur streaks,
2502
+ * like dropping out of hyperspace. See {@link WarpInOutProps}.
2503
+ * When replacing an existing component, waits for its out animation before starting the entrance.
2504
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2505
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2506
+ * @param props The properties of the effect
2507
+ * @param priority The priority of the effect
2508
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2509
+ */
2510
+ function warpIn(alias: string, component?: TComponent, props?: WarpInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2511
+ /**
2512
+ * Remove a image from the canvas with a warp effect: the image streaks away in a radial zoom blur
2513
+ * before being removed. See {@link warpIn} and {@link WarpInOutProps}.
2514
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2515
+ * @param props The properties of the effect
2516
+ * @param priority The priority of the effect
2517
+ * @returns The ids of the tickers that are used in the effect.
2518
+ */
2519
+ function warpOut(alias: string, props?: WarpInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2520
+ /**
2521
+ * Show a image in the canvas with a ripple effect: the image fades in through a ring of water-like
2522
+ * distortion spreading outward from an origin point - for dreams, magic or memories. See
2523
+ * {@link RippleInOutProps}.
2524
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2525
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2526
+ * @param props The properties of the effect
2527
+ * @param priority The priority of the effect
2528
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2529
+ */
2530
+ function rippleIn(alias: string, component?: TComponent, props?: RippleInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2531
+ /**
2532
+ * Remove a image from the canvas with a ripple effect: a ring of water-like distortion spreads over
2533
+ * the image as it fades out and is removed. See {@link rippleIn} and {@link RippleInOutProps}.
2534
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2535
+ * @param props The properties of the effect
2536
+ * @param priority The priority of the effect
2537
+ * @returns The ids of the tickers that are used in the effect.
2538
+ */
2539
+ function rippleOut(alias: string, props?: RippleInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2540
+ /**
2541
+ * Show a image in the canvas with a noise dissolve: the image appears in organic, noise-shaped
2542
+ * blotches (or a cloudy fade with `edge: "soft"`) - the classic visual-novel image dissolve. See
2543
+ * {@link NoiseDissolveInOutProps}.
2544
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2545
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2546
+ * @param props The properties of the effect
2547
+ * @param priority The priority of the effect
2548
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2549
+ */
2550
+ function noiseDissolveIn(alias: string, component?: TComponent, props?: NoiseDissolveInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2551
+ /**
2552
+ * Remove a image from the canvas with a noise dissolve: the image disappears in noise-shaped
2553
+ * blotches and is then removed. See {@link noiseDissolveIn} and {@link NoiseDissolveInOutProps}.
2554
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2555
+ * @param props The properties of the effect
2556
+ * @param priority The priority of the effect
2557
+ * @returns The ids of the tickers that are used in the effect.
2558
+ */
2559
+ function noiseDissolveOut(alias: string, props?: NoiseDissolveInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2560
+ /**
2561
+ * Show a image in the canvas like an old TV turning on: a bright dot stretches into a glowing
2562
+ * horizontal line, which then opens up into the full image, with CRT scanlines. The scale animates
2563
+ * around the component's own anchor/pivot, so a centered anchor looks best. See
2564
+ * {@link TvInOutProps}.
2565
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2566
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2567
+ * @param props The properties of the effect
2568
+ * @param priority The priority of the effect
2569
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2570
+ */
2571
+ function tvIn(alias: string, component?: TComponent, props?: TvInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2572
+ /**
2573
+ * Remove a image from the canvas like an old TV turning off: the image collapses into a glowing
2574
+ * horizontal line, then into a dot, and is removed. The scale animates around the component's own
2575
+ * anchor/pivot, so a centered anchor looks best. See {@link tvIn} and {@link TvInOutProps}.
2576
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2577
+ * @param props The properties of the effect
2578
+ * @param priority The priority of the effect
2579
+ * @returns The ids of the tickers that are used in the effect.
2580
+ */
2581
+ function tvOut(alias: string, props?: TvInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2582
+ /**
2583
+ * Show a image in the canvas with a pinch effect: the image emerges from a single point, deforming
2584
+ * outward as it settles (or puffs out of it with `mode: "bulge"`). See {@link PinchInOutProps}.
2585
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2586
+ * @param component The imageUrl, array of imageUrl or the canvas component. If you don't provide the component, then the alias is used as the url.
2587
+ * @param props The properties of the effect
2588
+ * @param priority The priority of the effect
2589
+ * @returns A promise that contains the ids of the tickers that are used in the effect. The promise is resolved when the image is loaded.
2590
+ */
2591
+ function pinchIn(alias: string, component?: TComponent, props?: PinchInOutProps, priority?: UPDATE_PRIORITY$1): Promise<string[] | undefined>;
2592
+ /**
2593
+ * Remove a image from the canvas with a pinch effect: the image is sucked into a single point (or
2594
+ * puffs out with `mode: "bulge"`) and removed. See {@link pinchIn} and {@link PinchInOutProps}.
2595
+ * @param alias The unique alias of the image. You can use this alias to refer to this image
2596
+ * @param props The properties of the effect
2597
+ * @param priority The priority of the effect
2598
+ * @returns The ids of the tickers that are used in the effect.
2599
+ */
2600
+ function pinchOut(alias: string, props?: PinchInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
2601
+ }
1818
2602
 
1819
2603
  /**
1820
2604
  * Canvas error handler: when a `PixiError` contains `canvasElementInfo`,
@@ -1942,25 +2726,54 @@ declare function addVideo(alias: string, videoUrl?: string, options?: VideoSprit
1942
2726
  */
1943
2727
  declare function showVideo(alias: string, videoUrl?: string, options?: VideoSpriteOptions): Promise<VideoSprite>;
1944
2728
 
1945
- interface ShakeEffectProps extends BaseTransitionProps, AnimationOptions {
1946
- /**
1947
- * The number of shocks. **Must be at least 3**.
1948
- * @default 10
1949
- */
1950
- shocksNumber?: number;
1951
- /**
1952
- * The type of the shake effect
1953
- * @default "horizontal"
1954
- */
1955
- shakeType?: "horizontal" | "vertical";
1956
- /**
1957
- * The maximum size of the shock.
1958
- * For horizontal type, it is the maximum size of the x axis.
1959
- * For vertical type, it is the maximum size of the y axis.
1960
- * @default 10
1961
- */
1962
- maxShockSize?: number;
2729
+ /**
2730
+ * A snapshot of a component's own (untransformed) bounds, captured once when a mask/filter transition
2731
+ * starts. Transitions don't expect the component to resize mid-effect, the same simplification the
2732
+ * existing move/zoom/push transitions already make by computing their destination once upfront.
2733
+ */
2734
+ interface BoundsSnapshot {
2735
+ x: number;
2736
+ y: number;
2737
+ width: number;
2738
+ height: number;
1963
2739
  }
2740
+ interface WipeFilterConfig {
2741
+ kind: "wipe";
2742
+ angle: number;
2743
+ invert: boolean;
2744
+ bounds: BoundsSnapshot;
2745
+ }
2746
+ interface IrisFilterConfig {
2747
+ kind: "iris";
2748
+ /** If true the image is seen around the circle (a hole in the mask) instead of through it. */
2749
+ outside?: boolean;
2750
+ originX: number;
2751
+ originY: number;
2752
+ aspect: number;
2753
+ invert: boolean;
2754
+ bounds: BoundsSnapshot;
2755
+ }
2756
+ interface SplitFilterConfig {
2757
+ kind: "split";
2758
+ /** Absent in older saves, which reveal from the edges inwards. */
2759
+ direction?: "inward" | "outward";
2760
+ orientation: "horizontal" | "vertical";
2761
+ origin: number;
2762
+ invert: boolean;
2763
+ bounds: BoundsSnapshot;
2764
+ }
2765
+ type FilterTransitionConfig = WipeFilterConfig | IrisFilterConfig | SplitFilterConfig;
2766
+ /**
2767
+ * Builds the `apply`/`cleanup` pair that drives a mask-based transition (wipe/iris/split) on the
2768
+ * component registered under `alias`, from nothing but plain, serializable data. It's the single place
2769
+ * both the live transition and a ticker reconstructed after a save/restore (or a step back) get their
2770
+ * callbacks from - which is what lets the animation resume instead of being lost. The mask `Graphics` is
2771
+ * lazily recreated on the first `apply()` call, so a restored ticker needs nothing else.
2772
+ */
2773
+ declare function createFilterTransitionApplier(alias: string, config: FilterTransitionConfig): {
2774
+ apply(value: number): void;
2775
+ cleanup(): void;
2776
+ };
1964
2777
 
1965
2778
  /**
1966
2779
  * An empty interface that can be augmented via `declare module '@drincs/pixi-vn/canvas'`
@@ -2045,4 +2858,4 @@ declare const UPDATE_PRIORITY: typeof _drincs_pixi_vn_pixi_js.UPDATE_PRIORITY;
2045
2858
 
2046
2859
  declare const canvas: CanvasManagerInterface;
2047
2860
 
2048
- export { AdditionalPositionsExtension, AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetAliasIdType, type AssetMemory, Assets, type BundleIdType, type CanvasBaseInterface, CanvasBaseItem, CanvasBaseItemMemory, CanvasGameState, type CanvasHtmlLayersInterface, type CanvasLayersInterface, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, type CanvasTickersInterface, Color, type CommonTickerProps, Container, ContainerChild$1 as ContainerChild, ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, ListenerExtension, ListenerExtensionMemory, type MoveInOutProps, OnEventsHandlers, type PixivnAssetAliasIds, type PixivnBundleIds, type PushInOutProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, RegisteredTickers, type ShakeEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, Text, type TextMemory, type TextOptions, TextStyle, Texture, Ticker$1 as Ticker, TickerArgs, TickerBase, TickerHistory, TickerInfo, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, TickersSequence, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type ZoomInOutProps, addImage, addImageCointainer, addVideo, canvas, canvasComponentDecorator, drawCanvasErrorHandler, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, tickerDecorator, zoomIn, zoomOut };
2861
+ export { AdditionalPositionsExtension, AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetAliasIdType, type AssetMemory, Assets, type BlurInOutProps, type BlurPulseEffectProps, type BounceEffectProps, type BundleIdType, type CanvasBaseInterface, CanvasBaseItem, CanvasBaseItemMemory, CanvasGameState, type CanvasHtmlLayersInterface, type CanvasLayersInterface, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, type ChromaticAberrationEffectProps, Color, type ColorType, Container, ContainerChild$1 as ContainerChild, ContainerMemory, type ContainerOptions, type DecayingEffectProps, type DesaturateEffectProps, type FilterFadeTransitionProps, type FilterTransitionConfig, type FlashInOutProps, type GlitchEffectProps, type GlitchInOutProps, type GlowPulseEffectProps, type HopEffectProps, type HslColorType, type HslaColorType, type HsvColorType, type HsvaColorType, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type IrisInOutProps, type Layer, ListenerExtension, ListenerExtensionMemory, type MaskTransitionProps, type MoveInOutProps, type NodEffectProps, type NoiseDissolveInOutProps, type OldComponentOutProps, OnEventsHandlers, type PinchInOutProps, type PixelateInOutProps, type PixivnAssetAliasIds, type PixivnBundleIds, type PulseEffectProps, type PunchEffectProps, type PushInOutProps, type RadialBlurEffectProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, type RgbColorType, type RgbaColorType, type RippleInOutProps, type ShakeEffectProps, type ShockwaveEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, type SplitInOutProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, type SwayEffectProps, Text, type TextMemory, type TextOptions, TextStyle, Texture, type TvInOutProps, type TwistInOutProps, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type VignettePulseEffectProps, type WarpInOutProps, type WiggleEffectProps, type WipeInOutProps, type ZoomInOutProps, addImage, addImageCointainer, addVideo, canvas, canvasComponentDecorator, createFilterTransitionApplier, drawCanvasErrorHandler, effects, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, transitions, zoomIn, zoomOut };