@drincs/pixi-vn 1.2.25 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContainerMemory-Bemxh6ml.d.cts → ContainerMemory-CrY9QSo2.d.cts} +16 -13
- package/dist/{ContainerMemory-BSDt46hh.d.ts → ContainerMemory-DrijxCcD.d.ts} +16 -13
- package/dist/{TickersSequence-_GvVF_1g.d.cts → TickersSequence-Cf1Vcu22.d.cts} +55 -12
- package/dist/{TickersSequence-_GvVF_1g.d.ts → TickersSequence-Cf1Vcu22.d.ts} +55 -12
- package/dist/canvas/index.cjs +144 -142
- package/dist/canvas/index.d.cts +5 -4
- package/dist/canvas/index.d.ts +5 -4
- package/dist/canvas/index.mjs +144 -142
- package/dist/canvas/tickers/index.cjs +145 -143
- package/dist/canvas/tickers/index.d.cts +141 -118
- package/dist/canvas/tickers/index.d.ts +141 -118
- package/dist/canvas/tickers/index.mjs +145 -143
- package/dist/character/index.cjs +41 -40
- package/dist/character/index.d.cts +1 -1
- package/dist/character/index.d.ts +1 -1
- package/dist/character/index.mjs +41 -40
- package/dist/{index-DiDhb7Kl.d.cts → index-Bl9hiHQR.d.cts} +4 -143
- package/dist/{index-DPlLfwK1.d.cts → index-Cax-mGq_.d.cts} +2 -17
- package/dist/{index-BWzZWl0z.d.ts → index-Cvdua0o-.d.ts} +2 -17
- package/dist/{index-BhqocQcj.d.cts → index-Dib5x6-D.d.ts} +138 -73
- package/dist/{index-B7Tn343-.d.ts → index-_rD16ks5.d.ts} +4 -143
- package/dist/{index-Bju40pxd.d.ts → index-jEmIURMn.d.cts} +138 -73
- package/dist/index.cjs +144 -143
- package/dist/index.d.cts +13 -37
- package/dist/index.d.ts +13 -37
- package/dist/index.mjs +144 -143
- package/dist/interfaces/index.d.cts +3 -3
- package/dist/interfaces/index.d.ts +3 -3
- package/dist/narration/index.cjs +55 -54
- package/dist/narration/index.d.cts +1 -1
- package/dist/narration/index.d.ts +1 -1
- package/dist/narration/index.mjs +55 -54
- package/dist/sound/index.cjs +42 -41
- package/dist/sound/index.mjs +42 -41
- package/package.json +4 -3
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import { Devtools } from '@pixi/devtools';
|
|
2
2
|
import * as pixi_js from 'pixi.js';
|
|
3
|
-
import { Container as Container$1, Application, Rectangle, ApplicationOptions, ContainerChild, PointData, SpriteOptions as SpriteOptions$1, EventEmitter, ContainerOptions, TextOptions as TextOptions$1, AllFederatedEventMap, Sprite as Sprite$1, Texture, ContainerEvents, TextureSourceLike, TextureSource, ObservablePoint, Text as Text$1
|
|
4
|
-
import {
|
|
5
|
-
import { b as CanvasBaseItemMemory, C as CanvasBaseItem,
|
|
6
|
-
import {
|
|
3
|
+
import { Container as Container$1, Application, Rectangle, ApplicationOptions, ContainerChild, UPDATE_PRIORITY, PointData, SpriteOptions as SpriteOptions$1, EventEmitter, ContainerOptions, TextOptions as TextOptions$1, AllFederatedEventMap, Sprite as Sprite$1, Texture, ContainerEvents, TextureSourceLike, TextureSource, ObservablePoint, Text as Text$1 } from 'pixi.js';
|
|
4
|
+
import { ObjectTarget, AnimationOptions as AnimationOptions$1, At, SequenceOptions as SequenceOptions$1 } from 'motion';
|
|
5
|
+
import { b as CanvasBaseItemMemory, C as CanvasBaseItem, a as CanvasGameState, d as ContainerChild$1, c as ContainerMemory, P as PauseTickerType } from './ContainerMemory-DrijxCcD.js';
|
|
6
|
+
import { CommonTickerProps, TickerTimeoutHistory, FadeAlphaTicker, FadeAlphaTickerProps, MoveTicker, MoveTickerProps, RegisteredTickers, RotateTicker, RotateTickerProps, TickerBase, TickerProgrationExponential, TickerProgrationLinear, TickerProgrationType, TickerValue, ZoomTicker, ZoomTickerProps, animate, tickerDecorator } from './canvas/tickers/index.js';
|
|
7
|
+
import { c as TickerInfo, d as TickersSequence, a as TickerArgs, T as Ticker, R as RepeatType, P as PauseType, b as TickerHistory } from './TickersSequence-Cf1Vcu22.js';
|
|
7
8
|
|
|
8
9
|
interface CanvasBaseInterface<T2 extends CanvasBaseItemMemory> extends CanvasBaseItem<T2>, Container$1 {
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
interface MotionComponentExtension {
|
|
13
|
+
pivot?: number;
|
|
14
|
+
pivotX?: number;
|
|
15
|
+
pivotY?: number;
|
|
16
|
+
scale?: number;
|
|
17
|
+
scaleX?: number;
|
|
18
|
+
scaleY?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type AnimationOptions = Omit<AnimationOptions$1, "onComplete" | "onPlay" | "onStop" | "onUpdate" | "onRepeat"> & Omit<CommonTickerProps, "startOnlyIfHaveTexture">;
|
|
22
|
+
|
|
23
|
+
type KeyframesType<T> = ObjectTarget<T> & MotionComponentExtension;
|
|
24
|
+
type AnimationSequenceOptions = Omit<AnimationOptions$1, "onComplete" | "onPlay" | "onStop" | "onUpdate" | "onRepeat">;
|
|
25
|
+
type SequenceOptions = SequenceOptions$1 & Omit<CommonTickerProps, "startOnlyIfHaveTexture">;
|
|
26
|
+
type ObjectSegment<O extends CanvasBaseInterface<any>> = [ObjectTarget<O>];
|
|
27
|
+
type ObjectSegmentWithTransition<O extends CanvasBaseInterface<any>> = [ObjectTarget<O>, AnimationOptions & At];
|
|
28
|
+
|
|
11
29
|
interface CanvasManagerInterface {
|
|
12
30
|
/**
|
|
13
31
|
* The PIXI Application instance.
|
|
@@ -23,14 +41,6 @@ interface CanvasManagerInterface {
|
|
|
23
41
|
* If the manager is initialized.
|
|
24
42
|
*/
|
|
25
43
|
readonly isInitialized: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated Use `canvas.getHtmlLayers` instead.
|
|
28
|
-
*/
|
|
29
|
-
get htmlLayout(): HTMLElement | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use `canvas.addHtmlLayer` instead.
|
|
32
|
-
*/
|
|
33
|
-
set htmlLayout(value: HTMLElement);
|
|
34
44
|
/**
|
|
35
45
|
* The width of the canvas.
|
|
36
46
|
*/
|
|
@@ -68,10 +78,6 @@ interface CanvasManagerInterface {
|
|
|
68
78
|
width: number;
|
|
69
79
|
height: number;
|
|
70
80
|
}, devtoolsOptions?: Devtools): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Use `canvas.addHtmlLayer` instead.
|
|
73
|
-
*/
|
|
74
|
-
initializeHTMLLayout(element: HTMLElement): void;
|
|
75
81
|
/**
|
|
76
82
|
* The children of the canvas.
|
|
77
83
|
*/
|
|
@@ -152,7 +158,6 @@ interface CanvasManagerInterface {
|
|
|
152
158
|
canvasElementIsOnCanvas<T extends Container$1>(pixiElement: T): boolean;
|
|
153
159
|
/**
|
|
154
160
|
* Remove all canvas elements from the canvas.
|
|
155
|
-
* And remove all tickers that are not connected to any canvas element.
|
|
156
161
|
*/
|
|
157
162
|
removeAll(): void;
|
|
158
163
|
/**
|
|
@@ -173,7 +178,7 @@ interface CanvasManagerInterface {
|
|
|
173
178
|
* Currently tickers that are running.
|
|
174
179
|
*/
|
|
175
180
|
readonly currentTickers: {
|
|
176
|
-
[id: string]:
|
|
181
|
+
[id: string]: TickerInfo<any>;
|
|
177
182
|
};
|
|
178
183
|
/**
|
|
179
184
|
* The steps of the tickers
|
|
@@ -183,6 +188,13 @@ interface CanvasManagerInterface {
|
|
|
183
188
|
[tickerId: string]: TickersSequence;
|
|
184
189
|
};
|
|
185
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* Find a ticker by its id.
|
|
193
|
+
* @param tickerId The id of the ticker.
|
|
194
|
+
* @param args The args of the ticker.
|
|
195
|
+
* @returns The ticker if found, undefined otherwise.
|
|
196
|
+
*/
|
|
197
|
+
findTicker<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker<TArgs> | undefined;
|
|
186
198
|
/**
|
|
187
199
|
* Run a ticker. You can run multiple addTicker with the same alias and different tickerClasses.
|
|
188
200
|
* If you run a ticker with the same alias and tickerClass, the old ticker will be removed.
|
|
@@ -195,13 +207,13 @@ interface CanvasManagerInterface {
|
|
|
195
207
|
* canvas.addTicker("alien", new RotateTicker({ speed: 0.2 }))
|
|
196
208
|
* ```
|
|
197
209
|
*/
|
|
198
|
-
addTicker<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker:
|
|
210
|
+
addTicker<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker<TArgs>): string | undefined;
|
|
199
211
|
/**
|
|
200
212
|
* Run a sequence of tickers.
|
|
201
213
|
* @param alias The alias of canvas element that will use the tickers.
|
|
202
214
|
* @param steps The steps of the tickers.
|
|
203
215
|
* @param currentStepNumber The current step number. It is used to continue the sequence of tickers.
|
|
204
|
-
* @returns The id of
|
|
216
|
+
* @returns The id of tickers.
|
|
205
217
|
* @example
|
|
206
218
|
* ```typescript
|
|
207
219
|
* canvas.addTickersSequence("alien", [
|
|
@@ -222,8 +234,11 @@ interface CanvasManagerInterface {
|
|
|
222
234
|
* ```typescript
|
|
223
235
|
* canvas.unlinkComponentFromTicker("alien", RotateTicker)
|
|
224
236
|
* ```
|
|
237
|
+
* @deprecated
|
|
225
238
|
*/
|
|
226
|
-
unlinkComponentFromTicker(alias: string | string[], ticker?:
|
|
239
|
+
unlinkComponentFromTicker(alias: string | string[], ticker?: {
|
|
240
|
+
new (): Ticker<any>;
|
|
241
|
+
} | string): void;
|
|
227
242
|
/**
|
|
228
243
|
* Remove all tickers from the canvas.
|
|
229
244
|
*/
|
|
@@ -235,15 +250,41 @@ interface CanvasManagerInterface {
|
|
|
235
250
|
removeTicker(tickerId: string | string[]): void;
|
|
236
251
|
/**
|
|
237
252
|
* Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.
|
|
238
|
-
* @param
|
|
239
|
-
* @
|
|
253
|
+
* @param filters The filters to pause the ticker.
|
|
254
|
+
* @returns The ids of the paused tickers.
|
|
240
255
|
*/
|
|
241
|
-
pauseTicker(
|
|
256
|
+
pauseTicker(filters: {
|
|
257
|
+
/**
|
|
258
|
+
* The alias of the canvas element that will use the ticker.
|
|
259
|
+
* Will pause all tickers that are connected to this canvas element.
|
|
260
|
+
*/
|
|
261
|
+
canvasAlias: string;
|
|
262
|
+
/**
|
|
263
|
+
* Ticker ids excluded from the pause. If not provided, all tickers will be paused.
|
|
264
|
+
*/
|
|
265
|
+
tickerIdsExcluded?: string[];
|
|
266
|
+
} | {
|
|
267
|
+
/**
|
|
268
|
+
* The id of the ticker to be paused. If provided, only this ticker will be paused.
|
|
269
|
+
*/
|
|
270
|
+
id: string | string[];
|
|
271
|
+
}): string[];
|
|
242
272
|
/**
|
|
243
273
|
* Resume a ticker.
|
|
244
|
-
* @param
|
|
274
|
+
* @param filters The filters to resume the ticker.
|
|
245
275
|
*/
|
|
246
|
-
resumeTicker(
|
|
276
|
+
resumeTicker(filters: {
|
|
277
|
+
/**
|
|
278
|
+
* The alias of the canvas element that will use the ticker.
|
|
279
|
+
* Will resume all tickers that are connected to this canvas element.
|
|
280
|
+
*/
|
|
281
|
+
canvasAlias: string;
|
|
282
|
+
} | {
|
|
283
|
+
/**
|
|
284
|
+
* The id of the ticker to be resumed. If provided, only this ticker will be resumed.
|
|
285
|
+
*/
|
|
286
|
+
id: string | string[];
|
|
287
|
+
}): void;
|
|
247
288
|
/**
|
|
248
289
|
* Check if a ticker is paused.
|
|
249
290
|
* @param alias The alias of the canvas element that will use the ticker.
|
|
@@ -272,7 +313,35 @@ interface CanvasManagerInterface {
|
|
|
272
313
|
* @param id The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.
|
|
273
314
|
* @param alias The alias of the sequence of tickers.
|
|
274
315
|
*/
|
|
275
|
-
forceCompletionOfTicker(id: string, alias?: string): void
|
|
316
|
+
forceCompletionOfTicker(id: string, alias?: string): Promise<void>;
|
|
317
|
+
/**
|
|
318
|
+
* Animate a Pixi’VN component or components using [motion's animate](https://motion.dev/docs/animate) function.
|
|
319
|
+
* This function integrates with the PixiJS ticker to ensure smooth animations.
|
|
320
|
+
*
|
|
321
|
+
* Pixi’VN will keep track of the animation state of this function.
|
|
322
|
+
* So Pixi’VN will save the animation state in saves.
|
|
323
|
+
* @param components - The PixiJS component(s) to animate.
|
|
324
|
+
* @param keyframes - The keyframes to animate the component(s) with.
|
|
325
|
+
* @param options - Additional options for the animation, including duration, easing, and ticker.
|
|
326
|
+
* @param priority - The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
|
|
327
|
+
* @returns The id of tickers.
|
|
328
|
+
* @template T - The type of Pixi’VN component(s) being animated.
|
|
329
|
+
*/
|
|
330
|
+
animate<T extends CanvasBaseInterface<any>>(components: T | string | (string | T)[], keyframes: KeyframesType<T>, options?: AnimationOptions, priority?: UPDATE_PRIORITY): string | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Animate a Pixi’VN component or components using [motion's animate](https://motion.dev/docs/animate) function.
|
|
333
|
+
* This function integrates with the PixiJS ticker to ensure smooth animations.
|
|
334
|
+
*
|
|
335
|
+
* Pixi’VN will keep track of the animation state of this function.
|
|
336
|
+
* So Pixi’VN will save the animation state in saves.
|
|
337
|
+
* @param components - The PixiJS component(s) to animate.
|
|
338
|
+
* @param sequence - The sequence of keyframes to animate the component(s) with.
|
|
339
|
+
* @param options - Additional options for the animation, including duration, easing, and ticker.
|
|
340
|
+
* @param priority - The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
|
|
341
|
+
* @returns The id of tickers.
|
|
342
|
+
* @template T - The type of Pixi’VN component(s) being animated.
|
|
343
|
+
*/
|
|
344
|
+
animate<T extends CanvasBaseInterface<any>>(components: T | string, sequence: (ObjectSegment<T> | ObjectSegmentWithTransition<T>)[], options?: SequenceOptions, priority?: UPDATE_PRIORITY): string | undefined;
|
|
276
345
|
/**
|
|
277
346
|
* Add a layer to the canvas.
|
|
278
347
|
* @param label The label of the layer.
|
|
@@ -355,10 +424,21 @@ interface CanvasManagerInterface {
|
|
|
355
424
|
* @param data The object.
|
|
356
425
|
*/
|
|
357
426
|
restore(data: object): Promise<void>;
|
|
427
|
+
/**
|
|
428
|
+
* @deprecated Use {@link onTickerComplete}
|
|
429
|
+
*/
|
|
358
430
|
onEndOfTicker(tickerId: string, options: {
|
|
359
|
-
aliasToRemoveAfter: string[]
|
|
360
|
-
tickerAliasToResume: string[]
|
|
431
|
+
aliasToRemoveAfter: string[];
|
|
432
|
+
tickerAliasToResume: string[];
|
|
433
|
+
tickerIdToResume: string[];
|
|
434
|
+
ignoreTickerSteps?: boolean;
|
|
435
|
+
}): void;
|
|
436
|
+
onTickerComplete(tickerId: string, options: {
|
|
437
|
+
aliasToRemoveAfter: string[];
|
|
438
|
+
tickerAliasToResume: string[];
|
|
439
|
+
tickerIdToResume: string[];
|
|
361
440
|
ignoreTickerSteps?: boolean;
|
|
441
|
+
stopTicker?: boolean;
|
|
362
442
|
}): void;
|
|
363
443
|
}
|
|
364
444
|
|
|
@@ -1097,7 +1177,7 @@ declare class CanvasManagerStatic {
|
|
|
1097
1177
|
[k: string]: TickerHistory<any>;
|
|
1098
1178
|
};
|
|
1099
1179
|
static _currentTickers: {
|
|
1100
|
-
[id: string]:
|
|
1180
|
+
[id: string]: TickerInfo<any>;
|
|
1101
1181
|
};
|
|
1102
1182
|
static _currentTickersSequence: {
|
|
1103
1183
|
[alias: string]: {
|
|
@@ -1116,10 +1196,13 @@ declare class CanvasManagerStatic {
|
|
|
1116
1196
|
alias: string;
|
|
1117
1197
|
}[];
|
|
1118
1198
|
};
|
|
1199
|
+
/**
|
|
1200
|
+
* @deprecated
|
|
1201
|
+
*/
|
|
1119
1202
|
static _tickersOnPause: {
|
|
1120
1203
|
[aliasOrId: string]: PauseTickerType;
|
|
1121
1204
|
};
|
|
1122
|
-
static generateTickerId(tickerData:
|
|
1205
|
+
static generateTickerId(tickerData: TickerInfo<any> | TickersSequence): string;
|
|
1123
1206
|
static addTickerTimeoutInfo(aliases: string | string[], ticker: string, timeout: string, canBeDeletedBeforeEnd: boolean): void;
|
|
1124
1207
|
static removeTickerTimeoutInfo(timeout: NodeJS.Timeout | string): void;
|
|
1125
1208
|
static removeTickerTimeout(timeout: NodeJS.Timeout | string): void;
|
|
@@ -1279,11 +1362,11 @@ declare namespace RegisteredEvents {
|
|
|
1279
1362
|
* Shake the canvas element.
|
|
1280
1363
|
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1281
1364
|
* @param alias
|
|
1282
|
-
* @param
|
|
1365
|
+
* @param options
|
|
1283
1366
|
* @param priority
|
|
1284
1367
|
* @returns
|
|
1285
1368
|
*/
|
|
1286
|
-
declare function shakeEffect(alias: string,
|
|
1369
|
+
declare function shakeEffect(alias: string, options?: ShakeEffectProps, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1287
1370
|
|
|
1288
1371
|
interface BaseTransitionProps {
|
|
1289
1372
|
/**
|
|
@@ -1291,27 +1374,27 @@ interface BaseTransitionProps {
|
|
|
1291
1374
|
* For example, if the transition is a dissolve transition, the "alpha" of the texture will be 1 before the next step.
|
|
1292
1375
|
* @default true
|
|
1293
1376
|
*/
|
|
1294
|
-
|
|
1377
|
+
forceCompleteBeforeNext?: boolean;
|
|
1295
1378
|
}
|
|
1296
|
-
interface ShowWithDissolveTransitionProps extends BaseTransitionProps,
|
|
1379
|
+
interface ShowWithDissolveTransitionProps extends BaseTransitionProps, AnimationOptions {
|
|
1297
1380
|
}
|
|
1298
|
-
interface ShowWithFadeTransitionProps extends BaseTransitionProps,
|
|
1381
|
+
interface ShowWithFadeTransitionProps extends BaseTransitionProps, AnimationOptions {
|
|
1299
1382
|
}
|
|
1300
|
-
interface MoveInOutProps extends BaseTransitionProps,
|
|
1383
|
+
interface MoveInOutProps extends BaseTransitionProps, AnimationOptions {
|
|
1301
1384
|
/**
|
|
1302
1385
|
* The direction of the movement.
|
|
1303
1386
|
* @default "right"
|
|
1304
1387
|
*/
|
|
1305
1388
|
direction?: "up" | "down" | "left" | "right";
|
|
1306
1389
|
}
|
|
1307
|
-
interface ZoomInOutProps extends BaseTransitionProps,
|
|
1390
|
+
interface ZoomInOutProps extends BaseTransitionProps, AnimationOptions {
|
|
1308
1391
|
/**
|
|
1309
1392
|
* The direction of the zoom effect.
|
|
1310
1393
|
* @default "right"
|
|
1311
1394
|
*/
|
|
1312
1395
|
direction?: "up" | "down" | "left" | "right";
|
|
1313
1396
|
}
|
|
1314
|
-
interface PushInOutProps extends BaseTransitionProps,
|
|
1397
|
+
interface PushInOutProps extends BaseTransitionProps, AnimationOptions {
|
|
1315
1398
|
/**
|
|
1316
1399
|
* The direction of the push effect.
|
|
1317
1400
|
* @default "right"
|
|
@@ -1330,7 +1413,6 @@ type TComponent = CanvasBaseInterface<any> | string | string[] | {
|
|
|
1330
1413
|
* Show a image in the canvas with a disolve effect.
|
|
1331
1414
|
* Disolve effect is a effect that the image is shown with a fade in.
|
|
1332
1415
|
* If exist a image with the same alias, then the image is replaced and the first image is removed after the effect is done.
|
|
1333
|
-
* This transition is done with a {@link FadeAlphaTicker} effect.
|
|
1334
1416
|
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1335
1417
|
* @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.
|
|
1336
1418
|
* If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
|
|
@@ -1343,14 +1425,13 @@ declare function showWithDissolve(alias: string, component?: TComponent, props?:
|
|
|
1343
1425
|
/**
|
|
1344
1426
|
* Remove a image from the canvas with a disolve effect.
|
|
1345
1427
|
* Disolve effect is a effect that the image is removed with a fade out.
|
|
1346
|
-
* This transition is done with a {@link FadeAlphaTicker} effect.
|
|
1347
1428
|
* This function is equivalent to {@link removeWithFade}.
|
|
1348
1429
|
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1349
1430
|
* @param props The properties of the effect
|
|
1350
1431
|
* @param priority The priority of the effect
|
|
1351
1432
|
* @returns The ids of the tickers that are used in the effect.
|
|
1352
1433
|
*/
|
|
1353
|
-
declare function removeWithDissolve(alias: string
|
|
1434
|
+
declare function removeWithDissolve(alias: string, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1354
1435
|
/**
|
|
1355
1436
|
* Show a image in the canvas with a fade effect.
|
|
1356
1437
|
* Fade effect is a effect that the image is shown with a fade in.
|
|
@@ -1367,14 +1448,13 @@ declare function showWithFade(alias: string, component?: TComponent, props?: Sho
|
|
|
1367
1448
|
/**
|
|
1368
1449
|
* Remove a image from the canvas with a fade effect.
|
|
1369
1450
|
* Fade effect is a effect that the image is removed with a fade out.
|
|
1370
|
-
* This transition is done with a {@link FadeAlphaTicker} effect.
|
|
1371
1451
|
* This function is equivalent to {@link removeWithDissolve}.
|
|
1372
1452
|
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1373
1453
|
* @param props The properties of the effect
|
|
1374
1454
|
* @param priority The priority of the effect
|
|
1375
1455
|
* @returns The ids of the tickers that are used in the effect.
|
|
1376
1456
|
*/
|
|
1377
|
-
declare function removeWithFade(alias: string
|
|
1457
|
+
declare function removeWithFade(alias: string, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1378
1458
|
/**
|
|
1379
1459
|
* 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.
|
|
1380
1460
|
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
@@ -1497,10 +1577,6 @@ declare function showImageContainer(alias: string, imageUrls: string[], options?
|
|
|
1497
1577
|
* ```
|
|
1498
1578
|
*/
|
|
1499
1579
|
declare function addImage(alias: string, imageUrl?: string, options?: ImageSpriteOptions): ImageSprite;
|
|
1500
|
-
/**
|
|
1501
|
-
* @deprecated
|
|
1502
|
-
*/
|
|
1503
|
-
declare function loadImage(canvasImages: ImageSprite[] | ImageSprite): Promise<ImageSprite[]>;
|
|
1504
1580
|
/**
|
|
1505
1581
|
* Add and show a image in the canvas. This function is a combination of {@link addImage} and {@link loadImage}.
|
|
1506
1582
|
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
@@ -1541,10 +1617,6 @@ declare function getTexture(textureAlias?: string): Promise<Texture | void>;
|
|
|
1541
1617
|
* ```
|
|
1542
1618
|
*/
|
|
1543
1619
|
declare function addVideo(alias: string, videoUrl?: string, options?: VideoSpriteOptions): VideoSprite;
|
|
1544
|
-
/**
|
|
1545
|
-
* @deprecated
|
|
1546
|
-
*/
|
|
1547
|
-
declare function loadVideo(canvasVideos: VideoSprite[] | VideoSprite): Promise<VideoSprite[]>;
|
|
1548
1620
|
/**
|
|
1549
1621
|
* Add and show a video in the canvas. This function is a combination of {@link addVideo} and {@link loadVideo}.
|
|
1550
1622
|
* @param alias The unique alias of the video. You can use this alias to refer to this video
|
|
@@ -1560,20 +1632,7 @@ declare function loadVideo(canvasVideos: VideoSprite[] | VideoSprite): Promise<V
|
|
|
1560
1632
|
*/
|
|
1561
1633
|
declare function showVideo(alias: string, videoUrl?: string, options?: VideoSpriteOptions): Promise<VideoSprite>;
|
|
1562
1634
|
|
|
1563
|
-
interface ShakeEffectProps {
|
|
1564
|
-
/**
|
|
1565
|
-
* The speed of the shake effect. @default 20
|
|
1566
|
-
*/
|
|
1567
|
-
speed?: number;
|
|
1568
|
-
/**
|
|
1569
|
-
* The progression of the speed
|
|
1570
|
-
*/
|
|
1571
|
-
speedProgression?: TickerProgrationType;
|
|
1572
|
-
/**
|
|
1573
|
-
* If true, the effect only starts if the canvas element have a texture
|
|
1574
|
-
* @default false
|
|
1575
|
-
*/
|
|
1576
|
-
startOnlyIfHaveTexture?: boolean;
|
|
1635
|
+
interface ShakeEffectProps extends BaseTransitionProps, AnimationOptions {
|
|
1577
1636
|
/**
|
|
1578
1637
|
* The number of shocks. **Must be at least 3**.
|
|
1579
1638
|
* @default 10
|
|
@@ -1583,18 +1642,20 @@ interface ShakeEffectProps {
|
|
|
1583
1642
|
* The type of the shake effect
|
|
1584
1643
|
* @default "horizontal"
|
|
1585
1644
|
*/
|
|
1586
|
-
|
|
1645
|
+
shakeType?: "horizontal" | "vertical";
|
|
1587
1646
|
/**
|
|
1588
1647
|
* The maximum size of the shock.
|
|
1589
1648
|
* For horizontal type, it is the maximum size of the x axis.
|
|
1590
1649
|
* For vertical type, it is the maximum size of the y axis.
|
|
1591
1650
|
* @default 10
|
|
1592
1651
|
*/
|
|
1593
|
-
|
|
1652
|
+
maxShockSize?: number;
|
|
1594
1653
|
}
|
|
1595
1654
|
|
|
1596
1655
|
declare const canvas: CanvasManagerInterface;
|
|
1597
1656
|
|
|
1657
|
+
type canvasUtils_AnimationOptions = AnimationOptions;
|
|
1658
|
+
type canvasUtils_AnimationSequenceOptions = AnimationSequenceOptions;
|
|
1598
1659
|
type canvasUtils_CanvasBaseInterface<T2 extends CanvasBaseItemMemory> = CanvasBaseInterface<T2>;
|
|
1599
1660
|
declare const canvasUtils_CanvasBaseItem: typeof CanvasBaseItem;
|
|
1600
1661
|
declare const canvasUtils_CanvasBaseItemMemory: typeof CanvasBaseItemMemory;
|
|
@@ -1605,6 +1666,7 @@ declare const canvasUtils_CanvasGameState: typeof CanvasGameState;
|
|
|
1605
1666
|
type canvasUtils_CanvasManagerInterface = CanvasManagerInterface;
|
|
1606
1667
|
type canvasUtils_CanvasManagerStatic = CanvasManagerStatic;
|
|
1607
1668
|
declare const canvasUtils_CanvasManagerStatic: typeof CanvasManagerStatic;
|
|
1669
|
+
declare const canvasUtils_CommonTickerProps: typeof CommonTickerProps;
|
|
1608
1670
|
type canvasUtils_Container<C extends ContainerChild$1 = ContainerChild$1, Memory extends ContainerMemory = ContainerMemory> = Container<C, Memory>;
|
|
1609
1671
|
declare const canvasUtils_Container: typeof Container;
|
|
1610
1672
|
declare const canvasUtils_ContainerMemory: typeof ContainerMemory;
|
|
@@ -1618,9 +1680,12 @@ type canvasUtils_ImageSprite<Memory extends ImageSpriteMemory = ImageSpriteMemor
|
|
|
1618
1680
|
declare const canvasUtils_ImageSprite: typeof ImageSprite;
|
|
1619
1681
|
type canvasUtils_ImageSpriteMemory = ImageSpriteMemory;
|
|
1620
1682
|
type canvasUtils_ImageSpriteOptions = ImageSpriteOptions;
|
|
1683
|
+
type canvasUtils_KeyframesType<T> = KeyframesType<T>;
|
|
1621
1684
|
type canvasUtils_MoveInOutProps = MoveInOutProps;
|
|
1622
1685
|
declare const canvasUtils_MoveTicker: typeof MoveTicker;
|
|
1623
1686
|
declare const canvasUtils_MoveTickerProps: typeof MoveTickerProps;
|
|
1687
|
+
type canvasUtils_ObjectSegment<O extends CanvasBaseInterface<any>> = ObjectSegment<O>;
|
|
1688
|
+
type canvasUtils_ObjectSegmentWithTransition<O extends CanvasBaseInterface<any>> = ObjectSegmentWithTransition<O>;
|
|
1624
1689
|
declare const canvasUtils_PauseType: typeof PauseType;
|
|
1625
1690
|
type canvasUtils_PushInOutProps = PushInOutProps;
|
|
1626
1691
|
declare const canvasUtils_RegisteredCanvasComponents: typeof RegisteredCanvasComponents;
|
|
@@ -1629,6 +1694,7 @@ declare const canvasUtils_RegisteredTickers: typeof RegisteredTickers;
|
|
|
1629
1694
|
declare const canvasUtils_RepeatType: typeof RepeatType;
|
|
1630
1695
|
declare const canvasUtils_RotateTicker: typeof RotateTicker;
|
|
1631
1696
|
declare const canvasUtils_RotateTickerProps: typeof RotateTickerProps;
|
|
1697
|
+
type canvasUtils_SequenceOptions = SequenceOptions;
|
|
1632
1698
|
type canvasUtils_ShakeEffectProps = ShakeEffectProps;
|
|
1633
1699
|
type canvasUtils_ShowWithDissolveTransitionProps = ShowWithDissolveTransitionProps;
|
|
1634
1700
|
type canvasUtils_ShowWithFadeTransitionProps = ShowWithFadeTransitionProps;
|
|
@@ -1646,7 +1712,7 @@ declare const canvasUtils_Ticker: typeof Ticker;
|
|
|
1646
1712
|
declare const canvasUtils_TickerArgs: typeof TickerArgs;
|
|
1647
1713
|
declare const canvasUtils_TickerBase: typeof TickerBase;
|
|
1648
1714
|
declare const canvasUtils_TickerHistory: typeof TickerHistory;
|
|
1649
|
-
declare const
|
|
1715
|
+
declare const canvasUtils_TickerInfo: typeof TickerInfo;
|
|
1650
1716
|
declare const canvasUtils_TickerProgrationExponential: typeof TickerProgrationExponential;
|
|
1651
1717
|
declare const canvasUtils_TickerProgrationLinear: typeof TickerProgrationLinear;
|
|
1652
1718
|
declare const canvasUtils_TickerProgrationType: typeof TickerProgrationType;
|
|
@@ -1663,12 +1729,11 @@ declare const canvasUtils_ZoomTickerProps: typeof ZoomTickerProps;
|
|
|
1663
1729
|
declare const canvasUtils_addImage: typeof addImage;
|
|
1664
1730
|
declare const canvasUtils_addImageCointainer: typeof addImageCointainer;
|
|
1665
1731
|
declare const canvasUtils_addVideo: typeof addVideo;
|
|
1732
|
+
declare const canvasUtils_animate: typeof animate;
|
|
1666
1733
|
declare const canvasUtils_canvas: typeof canvas;
|
|
1667
1734
|
declare const canvasUtils_canvasComponentDecorator: typeof canvasComponentDecorator;
|
|
1668
1735
|
declare const canvasUtils_eventDecorator: typeof eventDecorator;
|
|
1669
1736
|
declare const canvasUtils_getTexture: typeof getTexture;
|
|
1670
|
-
declare const canvasUtils_loadImage: typeof loadImage;
|
|
1671
|
-
declare const canvasUtils_loadVideo: typeof loadVideo;
|
|
1672
1737
|
declare const canvasUtils_moveIn: typeof moveIn;
|
|
1673
1738
|
declare const canvasUtils_moveOut: typeof moveOut;
|
|
1674
1739
|
declare const canvasUtils_pushIn: typeof pushIn;
|
|
@@ -1685,7 +1750,7 @@ declare const canvasUtils_tickerDecorator: typeof tickerDecorator;
|
|
|
1685
1750
|
declare const canvasUtils_zoomIn: typeof zoomIn;
|
|
1686
1751
|
declare const canvasUtils_zoomOut: typeof zoomOut;
|
|
1687
1752
|
declare namespace canvasUtils {
|
|
1688
|
-
export { type canvasUtils_CanvasBaseInterface as CanvasBaseInterface, canvasUtils_CanvasBaseItem as CanvasBaseItem, canvasUtils_CanvasBaseItemMemory as CanvasBaseItemMemory, canvasUtils_CanvasEvent as CanvasEvent, type canvasUtils_CanvasEventNamesType as CanvasEventNamesType, canvasUtils_CanvasGameState as CanvasGameState, type canvasUtils_CanvasManagerInterface as CanvasManagerInterface, canvasUtils_CanvasManagerStatic as CanvasManagerStatic, canvasUtils_Container as Container, ContainerChild$1 as ContainerChild, canvasUtils_ContainerMemory as ContainerMemory, canvasUtils_FadeAlphaTicker as FadeAlphaTicker, canvasUtils_FadeAlphaTickerProps as FadeAlphaTickerProps, canvasUtils_ImageContainer as ImageContainer, type canvasUtils_ImageContainerMemory as ImageContainerMemory, type canvasUtils_ImageContainerOptions as ImageContainerOptions, canvasUtils_ImageSprite as ImageSprite, type canvasUtils_ImageSpriteMemory as ImageSpriteMemory, type canvasUtils_ImageSpriteOptions as ImageSpriteOptions, type canvasUtils_MoveInOutProps as MoveInOutProps, canvasUtils_MoveTicker as MoveTicker, canvasUtils_MoveTickerProps as MoveTickerProps, canvasUtils_PauseType as PauseType, type canvasUtils_PushInOutProps as PushInOutProps, canvasUtils_RegisteredCanvasComponents as RegisteredCanvasComponents, canvasUtils_RegisteredEvents as RegisteredEvents, canvasUtils_RegisteredTickers as RegisteredTickers, canvasUtils_RepeatType as RepeatType, canvasUtils_RotateTicker as RotateTicker, canvasUtils_RotateTickerProps as RotateTickerProps, type canvasUtils_ShakeEffectProps as ShakeEffectProps, type canvasUtils_ShowWithDissolveTransitionProps as ShowWithDissolveTransitionProps, type canvasUtils_ShowWithFadeTransitionProps as ShowWithFadeTransitionProps, canvasUtils_Sprite as Sprite, type canvasUtils_SpriteBaseMemory as SpriteBaseMemory, type canvasUtils_SpriteMemory as SpriteMemory, type canvasUtils_SpriteOptions as SpriteOptions, canvasUtils_Text as Text, type canvasUtils_TextMemory as TextMemory, type canvasUtils_TextOptions as TextOptions, type canvasUtils_TextureMemory as TextureMemory, canvasUtils_Ticker as Ticker, canvasUtils_TickerArgs as TickerArgs, canvasUtils_TickerBase as TickerBase, canvasUtils_TickerHistory as TickerHistory,
|
|
1753
|
+
export { type canvasUtils_AnimationOptions as AnimationOptions, type canvasUtils_AnimationSequenceOptions as AnimationSequenceOptions, type canvasUtils_CanvasBaseInterface as CanvasBaseInterface, canvasUtils_CanvasBaseItem as CanvasBaseItem, canvasUtils_CanvasBaseItemMemory as CanvasBaseItemMemory, canvasUtils_CanvasEvent as CanvasEvent, type canvasUtils_CanvasEventNamesType as CanvasEventNamesType, canvasUtils_CanvasGameState as CanvasGameState, type canvasUtils_CanvasManagerInterface as CanvasManagerInterface, canvasUtils_CanvasManagerStatic as CanvasManagerStatic, canvasUtils_CommonTickerProps as CommonTickerProps, canvasUtils_Container as Container, ContainerChild$1 as ContainerChild, canvasUtils_ContainerMemory as ContainerMemory, canvasUtils_FadeAlphaTicker as FadeAlphaTicker, canvasUtils_FadeAlphaTickerProps as FadeAlphaTickerProps, canvasUtils_ImageContainer as ImageContainer, type canvasUtils_ImageContainerMemory as ImageContainerMemory, type canvasUtils_ImageContainerOptions as ImageContainerOptions, canvasUtils_ImageSprite as ImageSprite, type canvasUtils_ImageSpriteMemory as ImageSpriteMemory, type canvasUtils_ImageSpriteOptions as ImageSpriteOptions, type canvasUtils_KeyframesType as KeyframesType, type canvasUtils_MoveInOutProps as MoveInOutProps, canvasUtils_MoveTicker as MoveTicker, canvasUtils_MoveTickerProps as MoveTickerProps, type canvasUtils_ObjectSegment as ObjectSegment, type canvasUtils_ObjectSegmentWithTransition as ObjectSegmentWithTransition, canvasUtils_PauseType as PauseType, type canvasUtils_PushInOutProps as PushInOutProps, canvasUtils_RegisteredCanvasComponents as RegisteredCanvasComponents, canvasUtils_RegisteredEvents as RegisteredEvents, canvasUtils_RegisteredTickers as RegisteredTickers, canvasUtils_RepeatType as RepeatType, canvasUtils_RotateTicker as RotateTicker, canvasUtils_RotateTickerProps as RotateTickerProps, type canvasUtils_SequenceOptions as SequenceOptions, type canvasUtils_ShakeEffectProps as ShakeEffectProps, type canvasUtils_ShowWithDissolveTransitionProps as ShowWithDissolveTransitionProps, type canvasUtils_ShowWithFadeTransitionProps as ShowWithFadeTransitionProps, canvasUtils_Sprite as Sprite, type canvasUtils_SpriteBaseMemory as SpriteBaseMemory, type canvasUtils_SpriteMemory as SpriteMemory, type canvasUtils_SpriteOptions as SpriteOptions, canvasUtils_Text as Text, type canvasUtils_TextMemory as TextMemory, type canvasUtils_TextOptions as TextOptions, type canvasUtils_TextureMemory as TextureMemory, canvasUtils_Ticker as Ticker, canvasUtils_TickerArgs as TickerArgs, canvasUtils_TickerBase as TickerBase, canvasUtils_TickerHistory as TickerHistory, canvasUtils_TickerInfo as TickerInfo, canvasUtils_TickerProgrationExponential as TickerProgrationExponential, canvasUtils_TickerProgrationLinear as TickerProgrationLinear, canvasUtils_TickerProgrationType as TickerProgrationType, canvasUtils_TickerTimeoutHistory as TickerTimeoutHistory, canvasUtils_TickerValue as TickerValue, canvasUtils_TickersSequence as TickersSequence, canvasUtils_VideoSprite as VideoSprite, type canvasUtils_VideoSpriteMemory as VideoSpriteMemory, type canvasUtils_VideoSpriteOptions as VideoSpriteOptions, type canvasUtils_ZoomInOutProps as ZoomInOutProps, canvasUtils_ZoomTicker as ZoomTicker, canvasUtils_ZoomTickerProps as ZoomTickerProps, canvasUtils_addImage as addImage, canvasUtils_addImageCointainer as addImageCointainer, canvasUtils_addVideo as addVideo, canvasUtils_animate as animate, canvasUtils_canvas as canvas, canvasUtils_canvasComponentDecorator as canvasComponentDecorator, canvasUtils_eventDecorator as eventDecorator, canvasUtils_getTexture as getTexture, canvasUtils_moveIn as moveIn, canvasUtils_moveOut as moveOut, canvasUtils_pushIn as pushIn, canvasUtils_pushOut as pushOut, canvasUtils_removeWithDissolve as removeWithDissolve, canvasUtils_removeWithFade as removeWithFade, canvasUtils_shakeEffect as shakeEffect, canvasUtils_showImage as showImage, canvasUtils_showImageContainer as showImageContainer, canvasUtils_showVideo as showVideo, canvasUtils_showWithDissolve as showWithDissolve, canvasUtils_showWithFade as showWithFade, canvasUtils_tickerDecorator as tickerDecorator, canvasUtils_zoomIn as zoomIn, canvasUtils_zoomOut as zoomOut };
|
|
1689
1754
|
}
|
|
1690
1755
|
|
|
1691
|
-
export { type
|
|
1756
|
+
export { type AnimationSequenceOptions as $, showVideo as A, type ImageContainerOptions as B, type CanvasManagerInterface as C, type ImageSpriteOptions as D, type SpriteOptions as E, type TextOptions as F, type VideoSpriteOptions as G, type CanvasBaseInterface as H, ImageContainer as I, type ShakeEffectProps as J, type ImageContainerMemory as K, type ImageSpriteMemory as L, type SpriteBaseMemory as M, type SpriteMemory as N, type TextMemory as O, type VideoSpriteMemory as P, type TextureMemory as Q, RegisteredCanvasComponents as R, Sprite as S, Text as T, type MoveInOutProps as U, VideoSprite as V, type PushInOutProps as W, type ShowWithDissolveTransitionProps as X, type ShowWithFadeTransitionProps as Y, type ZoomInOutProps as Z, type AnimationOptions as _, canvas as a, type KeyframesType as a0, type ObjectSegment as a1, type ObjectSegmentWithTransition as a2, type SequenceOptions as a3, type CanvasEventNamesType as a4, CanvasEvent as b, canvasUtils as c, CanvasManagerStatic as d, Container as e, ImageSprite as f, canvasComponentDecorator as g, eventDecorator as h, RegisteredEvents as i, moveOut as j, pushOut as k, removeWithFade as l, moveIn as m, showWithDissolve as n, showWithFade as o, pushIn as p, zoomOut as q, removeWithDissolve as r, shakeEffect as s, addImageCointainer as t, showImageContainer as u, addImage as v, showImage as w, getTexture as x, addVideo as y, zoomIn as z };
|