@drincs/pixi-vn 1.3.13 → 1.3.15
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/{classes/index.d.cts → CachedMap-DZLvJAnA.d.cts} +1 -1
- package/dist/{classes/index.d.ts → CachedMap-DZLvJAnA.d.ts} +1 -1
- package/dist/{OpenedLabel-DxlOwJKw.d.ts → HistoryChoiceMenuOption-BjnxDyK5.d.cts} +47 -2
- package/dist/{OpenedLabel-Dgkgemkv.d.cts → HistoryChoiceMenuOption-ZdrL_kYX.d.ts} +47 -2
- package/dist/{StorageElementType-DTGcnkzF.d.ts → StorageElementType-dAIVJeiw.d.cts} +1 -1
- package/dist/{StorageElementType-DTGcnkzF.d.cts → StorageElementType-dAIVJeiw.d.ts} +1 -1
- package/dist/history.cjs +1 -0
- package/dist/{history/index.d.ts → history.d.cts} +14 -8
- package/dist/{history/index.d.cts → history.d.ts} +14 -8
- package/dist/history.mjs +1 -0
- package/dist/index.cjs +143 -143
- package/dist/index.d.cts +3076 -216
- package/dist/index.d.ts +3076 -216
- package/dist/index.mjs +143 -143
- package/dist/narration.cjs +2 -0
- package/dist/{index-_rD16ks5.d.ts → narration.d.cts} +27 -44
- package/dist/{index-Bl9hiHQR.d.cts → narration.d.ts} +27 -44
- package/dist/narration.mjs +2 -0
- package/dist/storage.cjs +1 -0
- package/dist/{storage/index.d.ts → storage.d.cts} +75 -6
- package/dist/{storage/index.d.cts → storage.d.ts} +75 -6
- package/dist/storage.mjs +1 -0
- package/dist/unifier.cjs +1 -0
- package/dist/unifier.d.cts +230 -0
- package/dist/unifier.d.ts +230 -0
- package/dist/unifier.mjs +1 -0
- package/package.json +29 -2
- package/dist/ContainerMemory-CrY9QSo2.d.cts +0 -106
- package/dist/ContainerMemory-DrijxCcD.d.ts +0 -106
- package/dist/HistoryChoiceMenuOption-Kj_P28ke.d.ts +0 -49
- package/dist/HistoryChoiceMenuOption-unaLLfKR.d.cts +0 -49
- package/dist/HistoryGameState-i_gx3rGM.d.ts +0 -12
- package/dist/HistoryGameState-qeIMl_DH.d.cts +0 -12
- package/dist/NarrationGameState-CqDh48n_.d.ts +0 -24
- package/dist/NarrationGameState-Cu-OYzph.d.cts +0 -24
- package/dist/SoundGameState-BG_iPwjt.d.cts +0 -85
- package/dist/SoundGameState-BG_iPwjt.d.ts +0 -85
- package/dist/StorageGameState-B2kz-u_2.d.cts +0 -19
- package/dist/StorageGameState-Cnfj75sk.d.ts +0 -19
- package/dist/StoredClassModel-CjdhvNgB.d.cts +0 -56
- package/dist/StoredClassModel-CjdhvNgB.d.ts +0 -56
- package/dist/TickersSequence-Cf1Vcu22.d.cts +0 -133
- package/dist/TickersSequence-Cf1Vcu22.d.ts +0 -133
- package/dist/canvas/index.cjs +0 -3316
- package/dist/canvas/index.d.cts +0 -8
- package/dist/canvas/index.d.ts +0 -8
- package/dist/canvas/index.mjs +0 -3316
- package/dist/canvas/tickers/index.cjs +0 -3316
- package/dist/canvas/tickers/index.d.cts +0 -467
- package/dist/canvas/tickers/index.d.ts +0 -467
- package/dist/canvas/tickers/index.mjs +0 -3316
- package/dist/character/index.cjs +0 -572
- package/dist/character/index.d.cts +0 -3
- package/dist/character/index.d.ts +0 -3
- package/dist/character/index.mjs +0 -572
- package/dist/classes/index.cjs +0 -1
- package/dist/classes/index.mjs +0 -1
- package/dist/history/index.cjs +0 -1
- package/dist/history/index.mjs +0 -1
- package/dist/index-B4F3XaWz.d.cts +0 -1767
- package/dist/index-Cax-mGq_.d.cts +0 -216
- package/dist/index-Cvdua0o-.d.ts +0 -216
- package/dist/index-Czfdktw9.d.ts +0 -93
- package/dist/index-DZ1shoNp.d.cts +0 -93
- package/dist/index-DvpfJ2VQ.d.ts +0 -1767
- package/dist/interfaces/index.cjs +0 -1
- package/dist/interfaces/index.d.cts +0 -55
- package/dist/interfaces/index.d.ts +0 -55
- package/dist/interfaces/index.mjs +0 -0
- package/dist/narration/index.cjs +0 -573
- package/dist/narration/index.d.cts +0 -8
- package/dist/narration/index.d.ts +0 -8
- package/dist/narration/index.mjs +0 -573
- package/dist/sound/index.cjs +0 -572
- package/dist/sound/index.d.cts +0 -3
- package/dist/sound/index.d.ts +0 -3
- package/dist/sound/index.mjs +0 -572
- package/dist/storage/index.cjs +0 -1
- package/dist/storage/index.mjs +0 -1
- package/dist/utils/index.cjs +0 -1
- package/dist/utils/index.d.cts +0 -8
- package/dist/utils/index.d.ts +0 -8
- package/dist/utils/index.mjs +0 -1
package/dist/index-DvpfJ2VQ.d.ts
DELETED
|
@@ -1,1767 +0,0 @@
|
|
|
1
|
-
import * as pixi_js from 'pixi.js';
|
|
2
|
-
import { Container as Container$1, ContainerChild, Application, Rectangle, ApplicationOptions, 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';
|
|
3
|
-
import { Devtools } from '@pixi/devtools';
|
|
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';
|
|
8
|
-
|
|
9
|
-
type Layer = Container$1<ContainerChild>;
|
|
10
|
-
|
|
11
|
-
interface CanvasBaseInterface<T2 extends CanvasBaseItemMemory> extends CanvasBaseItem<T2>, Container$1 {
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface MotionComponentExtension {
|
|
15
|
-
pivot?: number;
|
|
16
|
-
pivotX?: number;
|
|
17
|
-
pivotY?: number;
|
|
18
|
-
scale?: number;
|
|
19
|
-
scaleX?: number;
|
|
20
|
-
scaleY?: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
type AnimationOptions = Omit<AnimationOptions$1, "onComplete" | "onPlay" | "onStop" | "onUpdate" | "onRepeat"> & Omit<CommonTickerProps, "startOnlyIfHaveTexture">;
|
|
24
|
-
|
|
25
|
-
type KeyframesType<T> = ObjectTarget<T> & MotionComponentExtension;
|
|
26
|
-
type AnimationSequenceOptions = Omit<AnimationOptions$1, "onComplete" | "onPlay" | "onStop" | "onUpdate" | "onRepeat">;
|
|
27
|
-
type SequenceOptions = SequenceOptions$1 & Omit<CommonTickerProps, "startOnlyIfHaveTexture">;
|
|
28
|
-
type ObjectSegment<O extends CanvasBaseInterface<any>> = [ObjectTarget<O>];
|
|
29
|
-
type ObjectSegmentWithTransition<O extends CanvasBaseInterface<any>> = [ObjectTarget<O>, AnimationOptions & At];
|
|
30
|
-
|
|
31
|
-
interface CanvasManagerInterface {
|
|
32
|
-
/**
|
|
33
|
-
* The PIXI Application instance.
|
|
34
|
-
* It not recommended to use this property directly.
|
|
35
|
-
*/
|
|
36
|
-
readonly app: Application;
|
|
37
|
-
/**
|
|
38
|
-
* The PIXI Container that contains all the canvas elements.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
readonly gameLayer: Container$1;
|
|
42
|
-
/**
|
|
43
|
-
* If the manager is initialized.
|
|
44
|
-
*/
|
|
45
|
-
readonly isInitialized: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated Use {@link width} instead.
|
|
48
|
-
*/
|
|
49
|
-
canvasWidth: number;
|
|
50
|
-
/**
|
|
51
|
-
* The width of the canvas.
|
|
52
|
-
*/
|
|
53
|
-
width: number;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated Use {@link height} instead.
|
|
56
|
-
*/
|
|
57
|
-
canvasHeight: number;
|
|
58
|
-
/**
|
|
59
|
-
* The height of the canvas.
|
|
60
|
-
*/
|
|
61
|
-
height: number;
|
|
62
|
-
/**
|
|
63
|
-
* The screen of the canvas ({@link Application.screen}).
|
|
64
|
-
*/
|
|
65
|
-
readonly screen: Rectangle;
|
|
66
|
-
/**
|
|
67
|
-
* Initialize the PixiJS Application and the interface div.
|
|
68
|
-
* This method should be called before any other method.
|
|
69
|
-
* @param element The html element where I will put the canvas. Example: document.body
|
|
70
|
-
* @param width The width of the canvas
|
|
71
|
-
* @param height The height of the canvas
|
|
72
|
-
* @param options The options of PixiJS Application
|
|
73
|
-
* @param devtoolsOptions The options of the devtools. You can read more about it in the [PixiJS Devtools documentation](https://pixijs.io/devtools/docs/plugin/)
|
|
74
|
-
* @example
|
|
75
|
-
* ```typescript
|
|
76
|
-
* const body = document.body
|
|
77
|
-
* if (!body) {
|
|
78
|
-
* throw new Error('body element not found')
|
|
79
|
-
* }
|
|
80
|
-
* await canvas.init(body, {
|
|
81
|
-
* width: 1920,
|
|
82
|
-
* height: 1080,
|
|
83
|
-
* backgroundColor: "#303030"
|
|
84
|
-
* })
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
init(element: HTMLElement, options: Partial<ApplicationOptions> & {
|
|
88
|
-
width: number;
|
|
89
|
-
height: number;
|
|
90
|
-
}, devtoolsOptions?: Devtools): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* The children of the canvas.
|
|
93
|
-
*/
|
|
94
|
-
readonly children: ContainerChild[];
|
|
95
|
-
/**
|
|
96
|
-
* Copy the properties of an old canvas element to a new canvas element.
|
|
97
|
-
* @param oldAlias Old alias
|
|
98
|
-
* @param newAlias New alias
|
|
99
|
-
* @returns
|
|
100
|
-
*/
|
|
101
|
-
copyCanvasElementProperty<T extends CanvasBaseItemMemory>(oldAlias: T | CanvasBaseInterface<T> | string, newAlias: CanvasBaseInterface<T> | string): Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* Transfer the tickers from an old alias to a new alias.
|
|
104
|
-
* @param oldAlias Old alias
|
|
105
|
-
* @param newAlias New alias
|
|
106
|
-
* @param mode If "move", the old alias will be removed from the ticker. If "duplicate", the old alias will be kept in the ticker.
|
|
107
|
-
*/
|
|
108
|
-
transferTickers(oldAlias: string, newAlias: string, mode?: "move" | "duplicate"): void;
|
|
109
|
-
/**
|
|
110
|
-
* Add a canvas element to the canvas.
|
|
111
|
-
* If there is a canvas element with the same alias, all "style", zIndex, and {@link TickerBase} will be transferred to the new canvas element,
|
|
112
|
-
* and the old canvas element will be removed.
|
|
113
|
-
* @param alias The alias of the canvas element.
|
|
114
|
-
* @param canvasComponent The canvas elements to be added.
|
|
115
|
-
* @param options The options of the canvas element.
|
|
116
|
-
* @example
|
|
117
|
-
* ```typescript
|
|
118
|
-
* const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
|
|
119
|
-
* const sprite = Sprite.from(texture);
|
|
120
|
-
* canvas.add("bunny", sprite);
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
add(alias: string, canvasComponent: CanvasBaseInterface<any>, options?: {
|
|
124
|
-
/**
|
|
125
|
-
* If there is a canvas element with the same alias, the "style" of the old canvas element will be imported to the new canvas element.
|
|
126
|
-
* @default false
|
|
127
|
-
*/
|
|
128
|
-
ignoreOldStyle?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* The zIndex of the canvas element.
|
|
131
|
-
* @default undefined
|
|
132
|
-
*/
|
|
133
|
-
zIndex?: number;
|
|
134
|
-
}): void;
|
|
135
|
-
/**
|
|
136
|
-
* Remove a canvas element from the canvas.
|
|
137
|
-
* And remove all tickers that are not connected to any canvas element.
|
|
138
|
-
* @param alias The alias of the canvas element to be removed.
|
|
139
|
-
* @param options The options of the canvas element.
|
|
140
|
-
* @returns
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* canvas.remove("bunny");
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
remove(alias: string | string[], options?: {
|
|
147
|
-
/**
|
|
148
|
-
* If true, the tickers that are connected to the canvas element will not be removed.
|
|
149
|
-
* @default false
|
|
150
|
-
*/
|
|
151
|
-
ignoreTickers?: boolean;
|
|
152
|
-
}): void;
|
|
153
|
-
/**
|
|
154
|
-
* Get a canvas element by the alias.
|
|
155
|
-
* @param alias The alias of the canvas element.
|
|
156
|
-
* @returns The canvas element.
|
|
157
|
-
* @example
|
|
158
|
-
* ```typescript
|
|
159
|
-
* const sprite = canvas.find<Sprite>("bunny");
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
find<T extends CanvasBaseInterface<any>>(alias: string): T | undefined;
|
|
163
|
-
/**
|
|
164
|
-
* Check if a DisplayObject is on the canvas.
|
|
165
|
-
* @param pixiElement The DisplayObject to be checked.
|
|
166
|
-
* @returns If the DisplayObject is on the canvas.
|
|
167
|
-
*/
|
|
168
|
-
canvasElementIsOnCanvas<T extends Container$1>(pixiElement: T): boolean;
|
|
169
|
-
/**
|
|
170
|
-
* Remove all canvas elements from the canvas.
|
|
171
|
-
*/
|
|
172
|
-
removeAll(): void;
|
|
173
|
-
/**
|
|
174
|
-
* Edit the alias of a canvas element. The tickers that are connected to the canvas element will be transferred.
|
|
175
|
-
* @param oldAlias The old alias of the canvas element.
|
|
176
|
-
* @param newAlias The new alias of the canvas element.
|
|
177
|
-
* @param options The options of the canvas element.
|
|
178
|
-
*/
|
|
179
|
-
editAlias(oldAlias: string, newAlias: string, options?: {
|
|
180
|
-
/**
|
|
181
|
-
* If true, the tickers that are connected to the canvas element will not be transferred.
|
|
182
|
-
* @default false
|
|
183
|
-
*/
|
|
184
|
-
ignoreTickers?: boolean;
|
|
185
|
-
}): void;
|
|
186
|
-
/** Edit Tickers Methods */
|
|
187
|
-
/**
|
|
188
|
-
* Currently tickers that are running.
|
|
189
|
-
*/
|
|
190
|
-
readonly currentTickers: {
|
|
191
|
-
[id: string]: TickerInfo<any>;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* The steps of the tickers
|
|
195
|
-
*/
|
|
196
|
-
readonly currentTickersSteps: {
|
|
197
|
-
[alias: string]: {
|
|
198
|
-
[tickerId: string]: TickersSequence;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Find a ticker by its id.
|
|
203
|
-
* @param tickerId The id of the ticker.
|
|
204
|
-
* @param args The args of the ticker.
|
|
205
|
-
* @returns The ticker if found, undefined otherwise.
|
|
206
|
-
*/
|
|
207
|
-
findTicker<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker<TArgs> | undefined;
|
|
208
|
-
/**
|
|
209
|
-
* Run a ticker. You can run multiple addTicker with the same alias and different tickerClasses.
|
|
210
|
-
* If you run a ticker with the same alias and tickerClass, the old ticker will be removed.
|
|
211
|
-
* If already exists a sequence of tickers with the same alias, it will be removed.
|
|
212
|
-
* @param canvasElementAlias The alias of the canvas element that will use the ticker.
|
|
213
|
-
* @param ticker The ticker class to be run.
|
|
214
|
-
* @returns The id of the ticker.
|
|
215
|
-
* @example
|
|
216
|
-
* ```typescript
|
|
217
|
-
* canvas.addTicker("alien", new RotateTicker({ speed: 0.2 }))
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
addTicker<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker<TArgs>): string | undefined;
|
|
221
|
-
/**
|
|
222
|
-
* Run a sequence of tickers.
|
|
223
|
-
* @param alias The alias of canvas element that will use the tickers.
|
|
224
|
-
* @param steps The steps of the tickers.
|
|
225
|
-
* @param currentStepNumber The current step number. It is used to continue the sequence of tickers.
|
|
226
|
-
* @returns The id of tickers.
|
|
227
|
-
* @example
|
|
228
|
-
* ```typescript
|
|
229
|
-
* canvas.addTickersSequence("alien", [
|
|
230
|
-
* new RotateTicker({ speed: 0.1, clockwise: true }, 2), // 2 seconds
|
|
231
|
-
* Pause(1), // 1 second
|
|
232
|
-
* new RotateTicker({ speed: 0.2, clockwise: false }, 2),
|
|
233
|
-
* Repeat,
|
|
234
|
-
* ])
|
|
235
|
-
* ```
|
|
236
|
-
*/
|
|
237
|
-
addTickersSequence(alias: string, steps: (Ticker<any> | RepeatType | PauseType)[], currentStepNumber?: number): string | undefined;
|
|
238
|
-
/**
|
|
239
|
-
* Remove a connection between a canvas element and a ticker.
|
|
240
|
-
* And remove the ticker if there is no canvas element connected to it.
|
|
241
|
-
* @param alias The alias of the canvas element that will use the ticker.
|
|
242
|
-
* @param ticker The ticker class to be removed.
|
|
243
|
-
* @example
|
|
244
|
-
* ```typescript
|
|
245
|
-
* canvas.unlinkComponentFromTicker("alien", RotateTicker)
|
|
246
|
-
* ```
|
|
247
|
-
* @deprecated
|
|
248
|
-
*/
|
|
249
|
-
unlinkComponentFromTicker(alias: string | string[], ticker?: {
|
|
250
|
-
new (): Ticker<any>;
|
|
251
|
-
} | string): void;
|
|
252
|
-
/**
|
|
253
|
-
* Remove all tickers from the canvas.
|
|
254
|
-
*/
|
|
255
|
-
removeAllTickers(): void;
|
|
256
|
-
/**
|
|
257
|
-
* Remove a ticker by the id.
|
|
258
|
-
* @param tickerId The id of the ticker.
|
|
259
|
-
*/
|
|
260
|
-
removeTicker(tickerId: string | string[]): void;
|
|
261
|
-
/**
|
|
262
|
-
* Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.
|
|
263
|
-
* @param filters The filters to pause the ticker.
|
|
264
|
-
* @returns The ids of the paused tickers.
|
|
265
|
-
*/
|
|
266
|
-
pauseTicker(filters: {
|
|
267
|
-
/**
|
|
268
|
-
* The alias of the canvas element that will use the ticker.
|
|
269
|
-
* Will pause all tickers that are connected to this canvas element.
|
|
270
|
-
*/
|
|
271
|
-
canvasAlias: string;
|
|
272
|
-
/**
|
|
273
|
-
* Ticker ids excluded from the pause. If not provided, all tickers will be paused.
|
|
274
|
-
*/
|
|
275
|
-
tickerIdsExcluded?: string[];
|
|
276
|
-
} | {
|
|
277
|
-
/**
|
|
278
|
-
* The id of the ticker to be paused. If provided, only this ticker will be paused.
|
|
279
|
-
*/
|
|
280
|
-
id: string | string[];
|
|
281
|
-
}): string[];
|
|
282
|
-
/**
|
|
283
|
-
* Resume a ticker.
|
|
284
|
-
* @param filters The filters to resume the ticker.
|
|
285
|
-
*/
|
|
286
|
-
resumeTicker(filters: {
|
|
287
|
-
/**
|
|
288
|
-
* The alias of the canvas element that will use the ticker.
|
|
289
|
-
* Will resume all tickers that are connected to this canvas element.
|
|
290
|
-
*/
|
|
291
|
-
canvasAlias: string;
|
|
292
|
-
} | {
|
|
293
|
-
/**
|
|
294
|
-
* The id of the ticker to be resumed. If provided, only this ticker will be resumed.
|
|
295
|
-
*/
|
|
296
|
-
id: string | string[];
|
|
297
|
-
}): void;
|
|
298
|
-
/**
|
|
299
|
-
* Check if a ticker is paused.
|
|
300
|
-
* @param alias The alias of the canvas element that will use the ticker.
|
|
301
|
-
* @param tickerId The ticker that will be checked.
|
|
302
|
-
* @returns If the ticker is paused.
|
|
303
|
-
*/
|
|
304
|
-
isTickerPaused(alias: string, tickerId?: string): boolean;
|
|
305
|
-
/**
|
|
306
|
-
* Add a ticker that must be completed before the next step.
|
|
307
|
-
* This method is used for example into a transition between scenes.
|
|
308
|
-
* @param step The step that the ticker must be completed before the next step.
|
|
309
|
-
*/
|
|
310
|
-
completeTickerOnStepEnd(step: {
|
|
311
|
-
/**
|
|
312
|
-
* The id of the step.
|
|
313
|
-
*/
|
|
314
|
-
id: string;
|
|
315
|
-
/**
|
|
316
|
-
* If is a sequence of tickers, the alias of the sequence of tickers.
|
|
317
|
-
*/
|
|
318
|
-
alias?: string;
|
|
319
|
-
}): void;
|
|
320
|
-
/**
|
|
321
|
-
* This method force the completion of the tickers that are running.
|
|
322
|
-
* This funcions is called in the next step.
|
|
323
|
-
* @param id The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.
|
|
324
|
-
* @param alias The alias of the sequence of tickers.
|
|
325
|
-
*/
|
|
326
|
-
forceCompletionOfTicker(id: string, alias?: string): Promise<void>;
|
|
327
|
-
/**
|
|
328
|
-
* Animate a Pixi’VN component or components using [motion's animate](https://motion.dev/docs/animate) function.
|
|
329
|
-
* This function integrates with the PixiJS ticker to ensure smooth animations.
|
|
330
|
-
*
|
|
331
|
-
* Pixi’VN will keep track of the animation state of this function.
|
|
332
|
-
* So Pixi’VN will save the animation state in saves.
|
|
333
|
-
* @param components - The PixiJS component(s) to animate.
|
|
334
|
-
* @param keyframes - The keyframes to animate the component(s) with.
|
|
335
|
-
* @param options - Additional options for the animation, including duration, easing, and ticker.
|
|
336
|
-
* @param priority - The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
|
|
337
|
-
* @returns The id of tickers.
|
|
338
|
-
* @template T - The type of Pixi’VN component(s) being animated.
|
|
339
|
-
*/
|
|
340
|
-
animate<T extends CanvasBaseInterface<any>>(components: T | string | (string | T)[], keyframes: KeyframesType<T>, options?: AnimationOptions, priority?: UPDATE_PRIORITY): string | undefined;
|
|
341
|
-
/**
|
|
342
|
-
* Animate a Pixi’VN component or components using [motion's animate](https://motion.dev/docs/animate) function.
|
|
343
|
-
* This function integrates with the PixiJS ticker to ensure smooth animations.
|
|
344
|
-
*
|
|
345
|
-
* Pixi’VN will keep track of the animation state of this function.
|
|
346
|
-
* So Pixi’VN will save the animation state in saves.
|
|
347
|
-
* @param components - The PixiJS component(s) to animate.
|
|
348
|
-
* @param sequence - The sequence of keyframes to animate the component(s) with.
|
|
349
|
-
* @param options - Additional options for the animation, including duration, easing, and ticker.
|
|
350
|
-
* @param priority - The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
|
|
351
|
-
* @returns The id of tickers.
|
|
352
|
-
* @template T - The type of Pixi’VN component(s) being animated.
|
|
353
|
-
*/
|
|
354
|
-
animate<T extends CanvasBaseInterface<any>>(components: T | string, sequence: (ObjectSegment<T> | ObjectSegmentWithTransition<T>)[], options?: SequenceOptions, priority?: UPDATE_PRIORITY): string | undefined;
|
|
355
|
-
/**
|
|
356
|
-
* Add a layer to the canvas.
|
|
357
|
-
* @param label The label of the layer.
|
|
358
|
-
* @param layer The layer to be added.
|
|
359
|
-
* @returns The layer.
|
|
360
|
-
* @example
|
|
361
|
-
* ```typescript
|
|
362
|
-
* const uiLayer = new Container();
|
|
363
|
-
* canvas.addLayer("ui", uiLayer);
|
|
364
|
-
* ```
|
|
365
|
-
*/
|
|
366
|
-
addLayer(label: string, layer: Container$1): Layer | undefined;
|
|
367
|
-
/**
|
|
368
|
-
* Get a layer from the canvas.
|
|
369
|
-
* @param label The label of the layer.
|
|
370
|
-
* @returns The layer.
|
|
371
|
-
* @example
|
|
372
|
-
* ```typescript
|
|
373
|
-
* const uiLayer = canvas.getLayer("ui");
|
|
374
|
-
* ```
|
|
375
|
-
*/
|
|
376
|
-
getLayer(label: string): Layer | null;
|
|
377
|
-
/**
|
|
378
|
-
* Remove a layer from the canvas.
|
|
379
|
-
* @param label The label of the layer to be removed.
|
|
380
|
-
* @example
|
|
381
|
-
* ```typescript
|
|
382
|
-
* canvas.removeLayer("ui");
|
|
383
|
-
* ```
|
|
384
|
-
*/
|
|
385
|
-
removeLayer(label: string): void;
|
|
386
|
-
/**
|
|
387
|
-
* Add a HTML layer to the canvas.
|
|
388
|
-
* @param id The id of the layer.
|
|
389
|
-
* @param element The html element to be added.
|
|
390
|
-
* @param style The style of the layer. @default { position: "absolute", pointerEvents: "none" }.
|
|
391
|
-
* @example
|
|
392
|
-
* ```tsx
|
|
393
|
-
* const root = document.getElementById('root')
|
|
394
|
-
* if (!root) {
|
|
395
|
-
* throw new Error('root element not found')
|
|
396
|
-
* }
|
|
397
|
-
* const htmlLayer = canvas.addHtmlLayer("ui", root, {
|
|
398
|
-
* position: "absolute",
|
|
399
|
-
* pointerEvents: "none"
|
|
400
|
-
* })
|
|
401
|
-
* const reactRoot = createRoot(htmlLayer)
|
|
402
|
-
* reactRoot.render(
|
|
403
|
-
* <App />
|
|
404
|
-
* )
|
|
405
|
-
* ```
|
|
406
|
-
*/
|
|
407
|
-
addHtmlLayer(id: string, element: HTMLElement, style?: Pick<CSSStyleDeclaration, "position" | "pointerEvents">): HTMLDivElement;
|
|
408
|
-
/**
|
|
409
|
-
* Get a HTML layer from the canvas.
|
|
410
|
-
* @param id The id of the layer to be removed.
|
|
411
|
-
*/
|
|
412
|
-
removeHtmlLayer(id: string): void;
|
|
413
|
-
/**
|
|
414
|
-
* Get a HTML layer from the canvas.
|
|
415
|
-
* @param id The id of the layer.
|
|
416
|
-
*/
|
|
417
|
-
getHtmlLayer(id: string): HTMLElement | undefined;
|
|
418
|
-
/**
|
|
419
|
-
* Extract the canvas as an image.
|
|
420
|
-
* @returns The image as a base64 string.
|
|
421
|
-
*/
|
|
422
|
-
extractImage(): Promise<string>;
|
|
423
|
-
/**
|
|
424
|
-
* Clear the canvas and the tickers.
|
|
425
|
-
*/
|
|
426
|
-
clear(): void;
|
|
427
|
-
/**
|
|
428
|
-
* Export the canvas and the tickers to an object.
|
|
429
|
-
* @returns The object.
|
|
430
|
-
*/
|
|
431
|
-
export(): CanvasGameState;
|
|
432
|
-
/**
|
|
433
|
-
* Restore the canvas and the tickers from an object.
|
|
434
|
-
* @param data The object.
|
|
435
|
-
*/
|
|
436
|
-
restore(data: object): Promise<void>;
|
|
437
|
-
/**
|
|
438
|
-
* @deprecated Use {@link onTickerComplete}
|
|
439
|
-
*/
|
|
440
|
-
onEndOfTicker(tickerId: string, options: {
|
|
441
|
-
aliasToRemoveAfter: string[];
|
|
442
|
-
tickerAliasToResume: string[];
|
|
443
|
-
tickerIdToResume: string[];
|
|
444
|
-
ignoreTickerSteps?: boolean;
|
|
445
|
-
}): void;
|
|
446
|
-
onTickerComplete(tickerId: string, options: {
|
|
447
|
-
aliasToRemoveAfter: string[];
|
|
448
|
-
tickerAliasToResume: string[];
|
|
449
|
-
tickerIdToResume: string[];
|
|
450
|
-
ignoreTickerSteps?: boolean;
|
|
451
|
-
stopTicker?: boolean;
|
|
452
|
-
}): void;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
interface AdditionalPositionsExtensionProps {
|
|
456
|
-
/**
|
|
457
|
-
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
458
|
-
* For example:
|
|
459
|
-
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
460
|
-
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
461
|
-
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
462
|
-
*
|
|
463
|
-
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
464
|
-
*/
|
|
465
|
-
align?: Partial<PointData> | number;
|
|
466
|
-
/**
|
|
467
|
-
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
468
|
-
* For example:
|
|
469
|
-
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
470
|
-
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
471
|
-
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
472
|
-
*
|
|
473
|
-
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
474
|
-
*/
|
|
475
|
-
xAlign?: number;
|
|
476
|
-
/**
|
|
477
|
-
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
478
|
-
* For example:
|
|
479
|
-
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
480
|
-
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
481
|
-
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
482
|
-
*
|
|
483
|
-
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
484
|
-
*/
|
|
485
|
-
yAlign?: number;
|
|
486
|
-
/**
|
|
487
|
-
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
488
|
-
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
489
|
-
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
490
|
-
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
491
|
-
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
492
|
-
*
|
|
493
|
-
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
494
|
-
*/
|
|
495
|
-
percentagePosition?: Partial<PointData> | number;
|
|
496
|
-
/**
|
|
497
|
-
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
498
|
-
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
499
|
-
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
500
|
-
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
501
|
-
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
502
|
-
*
|
|
503
|
-
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
504
|
-
*/
|
|
505
|
-
percentageX?: number;
|
|
506
|
-
/**
|
|
507
|
-
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
508
|
-
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
509
|
-
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
510
|
-
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
511
|
-
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
512
|
-
*
|
|
513
|
-
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
514
|
-
*/
|
|
515
|
-
percentageY?: number;
|
|
516
|
-
/**
|
|
517
|
-
* @deprecated Use {@link align} instead.
|
|
518
|
-
*/
|
|
519
|
-
xPercentagePosition?: number;
|
|
520
|
-
/**
|
|
521
|
-
* @deprecated Use {@link align} instead.
|
|
522
|
-
*/
|
|
523
|
-
yPercentagePosition?: number;
|
|
524
|
-
}
|
|
525
|
-
declare class AdditionalPositionsExtension {
|
|
526
|
-
/**
|
|
527
|
-
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
528
|
-
* For example:
|
|
529
|
-
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
530
|
-
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
531
|
-
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
532
|
-
*
|
|
533
|
-
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
534
|
-
*/
|
|
535
|
-
set align(_value: Partial<PointData> | number);
|
|
536
|
-
get align(): Partial<PointData> | number;
|
|
537
|
-
/**
|
|
538
|
-
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
539
|
-
* For example:
|
|
540
|
-
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
541
|
-
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
542
|
-
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
543
|
-
*
|
|
544
|
-
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
545
|
-
*/
|
|
546
|
-
set xAlign(_value: number);
|
|
547
|
-
get xAlign(): number;
|
|
548
|
-
/**
|
|
549
|
-
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
550
|
-
* For example:
|
|
551
|
-
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
552
|
-
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
553
|
-
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
554
|
-
*
|
|
555
|
-
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
556
|
-
*/
|
|
557
|
-
set yAlign(_value: number);
|
|
558
|
-
get yAlign(): number;
|
|
559
|
-
/**
|
|
560
|
-
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
561
|
-
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
562
|
-
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
563
|
-
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
564
|
-
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
565
|
-
*
|
|
566
|
-
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
567
|
-
*/
|
|
568
|
-
set percentagePosition(_value: Partial<PointData> | number);
|
|
569
|
-
get percentagePosition(): Partial<PointData> | number;
|
|
570
|
-
/**
|
|
571
|
-
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
572
|
-
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
573
|
-
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
574
|
-
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
575
|
-
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
576
|
-
*
|
|
577
|
-
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
578
|
-
*/
|
|
579
|
-
set percentageX(_value: number);
|
|
580
|
-
get percentageX(): number;
|
|
581
|
-
/**
|
|
582
|
-
* @deprecated Use {@link align} instead.
|
|
583
|
-
*/
|
|
584
|
-
set xPercentagePosition(_value: number);
|
|
585
|
-
get xPercentagePosition(): number;
|
|
586
|
-
/**
|
|
587
|
-
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
588
|
-
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
589
|
-
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
590
|
-
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
591
|
-
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
592
|
-
*
|
|
593
|
-
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
594
|
-
*/
|
|
595
|
-
set percentageY(_value: number);
|
|
596
|
-
get percentageY(): number;
|
|
597
|
-
/**
|
|
598
|
-
* @deprecated Use {@link align} instead.
|
|
599
|
-
*/
|
|
600
|
-
set yPercentagePosition(_value: number);
|
|
601
|
-
get yPercentagePosition(): number;
|
|
602
|
-
get positionType(): "pixel" | "percentage" | "align";
|
|
603
|
-
get positionInfo(): {
|
|
604
|
-
x: number;
|
|
605
|
-
y: number;
|
|
606
|
-
type: "pixel" | "percentage" | "align";
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
interface AnchorExtensionProps {
|
|
611
|
-
anchor?: PointData | number;
|
|
612
|
-
}
|
|
613
|
-
declare class AnchorExtension extends Container$1 {
|
|
614
|
-
/**
|
|
615
|
-
* The anchor sets the origin point of the imageContainer. The default value is taken from the {@link Texture}
|
|
616
|
-
* and passed to the constructor.
|
|
617
|
-
*
|
|
618
|
-
* The default is `(0,0)`, this means the imageContainer's origin is the top left.
|
|
619
|
-
*
|
|
620
|
-
* Setting the anchor to `(0.5,0.5)` means the imageContainer's origin is centered.
|
|
621
|
-
*
|
|
622
|
-
* Setting the anchor to `(1,1)` would mean the imageContainer's origin point will be the bottom right corner.
|
|
623
|
-
*
|
|
624
|
-
* If you pass only single parameter, it will set both x and y to the same value as shown in the example below.
|
|
625
|
-
* @example
|
|
626
|
-
* import { ImageContainer } from '@drincs/pixi-vn';
|
|
627
|
-
*
|
|
628
|
-
* const imageContainer = new ImageContainer();
|
|
629
|
-
* imageContainer.anchor = 0.5;
|
|
630
|
-
*/
|
|
631
|
-
get anchor(): PointData;
|
|
632
|
-
set anchor(_value: PointData | number);
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
interface SpriteOptions extends Omit<SpriteOptions$1, "on"> {
|
|
636
|
-
/**
|
|
637
|
-
* Add a listener for a given event.
|
|
638
|
-
* Unlike {@link onEvent}, this method does **not track the event association in the current game state**, so it will not be included in saves.
|
|
639
|
-
*/
|
|
640
|
-
on?: <T extends EventEmitter.EventNames<string | symbol>>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any) => this;
|
|
641
|
-
}
|
|
642
|
-
interface TextOptions extends Omit<TextOptions$1, "on"> {
|
|
643
|
-
/**
|
|
644
|
-
* Add a listener for a given event.
|
|
645
|
-
* Unlike {@link onEvent}, this method does **not track the event association in the current game state**, so it will not be included in saves.
|
|
646
|
-
*/
|
|
647
|
-
on?: <T extends EventEmitter.EventNames<string | symbol>>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any) => this;
|
|
648
|
-
}
|
|
649
|
-
interface ImageContainerOptions<C extends ContainerChild$1 = ContainerChild$1> extends ContainerOptions<C>, AnchorExtensionProps, AdditionalPositionsExtensionProps {
|
|
650
|
-
}
|
|
651
|
-
interface ImageSpriteOptions extends SpriteOptions, AdditionalPositionsExtensionProps {
|
|
652
|
-
}
|
|
653
|
-
interface VideoSpriteOptions extends ImageSpriteOptions {
|
|
654
|
-
loop?: boolean;
|
|
655
|
-
paused?: boolean;
|
|
656
|
-
currentTime?: number;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
type EventIdType = string;
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Interface for texture memory
|
|
663
|
-
*/
|
|
664
|
-
interface TextureMemory {
|
|
665
|
-
/**
|
|
666
|
-
* @deprecated
|
|
667
|
-
*/
|
|
668
|
-
image?: string;
|
|
669
|
-
alias?: string;
|
|
670
|
-
url: string;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
interface SpriteBaseMemory extends SpriteOptions$1, CanvasBaseItemMemory {
|
|
674
|
-
/**
|
|
675
|
-
* @deprecated
|
|
676
|
-
*/
|
|
677
|
-
textureImage?: TextureMemory;
|
|
678
|
-
textureData: TextureMemory;
|
|
679
|
-
onEvents: {
|
|
680
|
-
[name: string]: EventIdType;
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
* Interface for the canvas sprite memory
|
|
685
|
-
*/
|
|
686
|
-
interface SpriteMemory extends SpriteBaseMemory {
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* The memory of the image. It uses for save the state of the image.
|
|
691
|
-
*/
|
|
692
|
-
interface ImageSpriteMemory extends SpriteBaseMemory, AdditionalPositionsExtensionProps {
|
|
693
|
-
/**
|
|
694
|
-
* @deprecated use SpriteBaseMemory.textureAlias
|
|
695
|
-
*/
|
|
696
|
-
imageLink?: string;
|
|
697
|
-
loadIsStarted: boolean;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
/**
|
|
701
|
-
* The memory of the video. It uses for save the state of the video.
|
|
702
|
-
*/
|
|
703
|
-
interface VideoSpriteMemory extends ImageSpriteMemory {
|
|
704
|
-
loop: boolean;
|
|
705
|
-
paused: boolean;
|
|
706
|
-
currentTime: number;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* CanvasEventNamesType is a type that is used to define the event names for the canvas.
|
|
711
|
-
*/
|
|
712
|
-
type CanvasEventNamesType = keyof AllFederatedEventMap;
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* CanvasEvent is a class that is used to create a pixi event, and connect it to a canvas element, with on().
|
|
716
|
-
* This class should be extended and the fn method should be overridden.
|
|
717
|
-
* You must use the {@link eventDecorator} to register the event in the game.
|
|
718
|
-
* @example
|
|
719
|
-
* ```typescript
|
|
720
|
-
* \@eventDecorator() // this is equivalent to eventDecorator("EventTest")
|
|
721
|
-
* export class EventTest extends CanvasEvent<Sprite> {
|
|
722
|
-
* override fn(event: CanvasEventNamesType, sprite: Sprite): void {
|
|
723
|
-
* if (event === 'pointerdown') {
|
|
724
|
-
* sprite.scale.x *= 1.25;
|
|
725
|
-
* sprite.scale.y *= 1.25;
|
|
726
|
-
* }
|
|
727
|
-
* }
|
|
728
|
-
* }
|
|
729
|
-
* ```
|
|
730
|
-
*/
|
|
731
|
-
declare class CanvasEvent<C> {
|
|
732
|
-
constructor();
|
|
733
|
-
fn(_event: CanvasEventNamesType, _element: C): void;
|
|
734
|
-
/**
|
|
735
|
-
* Get the id of the event. This variable is used in the system to get the event by id, {@link RegisteredEvents.getInstance}.
|
|
736
|
-
*/
|
|
737
|
-
id: EventIdType;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* This class is a extension of the [PIXI.Sprite class](https://pixijs.com/8.x/examples/sprite/basic), it has the same properties and methods,
|
|
742
|
-
* but it has the ability to be saved and loaded by the Pixi’VN library.
|
|
743
|
-
* @example
|
|
744
|
-
* ```typescript
|
|
745
|
-
* const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
|
|
746
|
-
* const sprite = Sprite.from(texture);
|
|
747
|
-
*
|
|
748
|
-
* sprite.anchor.set(0.5);
|
|
749
|
-
* sprite.x = canvas.screen.width / 2;
|
|
750
|
-
* sprite.y = canvas.screen.height / 2;
|
|
751
|
-
*
|
|
752
|
-
* sprite.eventMode = 'static';
|
|
753
|
-
* sprite.cursor = 'pointer';
|
|
754
|
-
* sprite.onEvent('pointerdown', EventTest);
|
|
755
|
-
*
|
|
756
|
-
* canvas.add("bunny", sprite);
|
|
757
|
-
* ```
|
|
758
|
-
*/
|
|
759
|
-
declare class Sprite<Memory extends SpriteOptions$1 & CanvasBaseItemMemory = SpriteMemory> extends Sprite$1 implements CanvasBaseItem<Memory | SpriteMemory> {
|
|
760
|
-
constructor(options?: SpriteOptions | Omit<Texture, "on">);
|
|
761
|
-
pixivnId: string;
|
|
762
|
-
private _textureAlias?;
|
|
763
|
-
get textureAlias(): string;
|
|
764
|
-
set textureAlias(value: string);
|
|
765
|
-
get memory(): Memory | SpriteMemory;
|
|
766
|
-
set memory(_value: Memory | SpriteMemory);
|
|
767
|
-
setMemory(value: Memory | SpriteMemory): Promise<void>;
|
|
768
|
-
private _onEvents;
|
|
769
|
-
get onEvents(): {
|
|
770
|
-
[name: string]: string;
|
|
771
|
-
};
|
|
772
|
-
/**
|
|
773
|
-
* is same function as on(), but it keeps in memory the children.
|
|
774
|
-
* @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
|
|
775
|
-
* @param eventClass The class that extends CanvasEvent.
|
|
776
|
-
* @returns
|
|
777
|
-
* @example
|
|
778
|
-
* ```typescript
|
|
779
|
-
* \@eventDecorator()
|
|
780
|
-
* export class EventTest extends CanvasEvent<Sprite> {
|
|
781
|
-
* override fn(event: CanvasEventNamesType, sprite: Sprite): void {
|
|
782
|
-
* if (event === 'pointerdown') {
|
|
783
|
-
* sprite.scale.x *= 1.25;
|
|
784
|
-
* sprite.scale.y *= 1.25;
|
|
785
|
-
* }
|
|
786
|
-
* }
|
|
787
|
-
* }
|
|
788
|
-
* ```
|
|
789
|
-
*
|
|
790
|
-
* ```typescript
|
|
791
|
-
* let sprite = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
792
|
-
* await sprite.load()
|
|
793
|
-
*
|
|
794
|
-
* sprite.eventMode = 'static';
|
|
795
|
-
* sprite.cursor = 'pointer';
|
|
796
|
-
* sprite.onEvent('pointerdown', EventTest);
|
|
797
|
-
*
|
|
798
|
-
* canvas.add("bunny", sprite);
|
|
799
|
-
* ```
|
|
800
|
-
*/
|
|
801
|
-
onEvent<T extends typeof CanvasEvent<typeof this>>(event: CanvasEventNamesType, eventClass: T): this;
|
|
802
|
-
/**
|
|
803
|
-
* Add a listener for a given event.
|
|
804
|
-
* Unlike {@link onEvent}, this method does **not track the event association in the current game state**, so it will not be included in saves.
|
|
805
|
-
*/
|
|
806
|
-
on<T extends keyof ContainerEvents<ContainerChild> | keyof {
|
|
807
|
-
[K: symbol]: any;
|
|
808
|
-
[K: {} & string]: any;
|
|
809
|
-
}>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
|
|
810
|
-
[K: symbol]: any;
|
|
811
|
-
[K: {} & string]: any;
|
|
812
|
-
}>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
|
|
813
|
-
[K: symbol]: any;
|
|
814
|
-
[K: {} & string]: any;
|
|
815
|
-
}>]) => void, context?: any): this;
|
|
816
|
-
static from(source: Texture | TextureSourceLike, skipCache?: boolean): Sprite<any>;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* This class is a extension of the {@link Sprite} class, it has the same properties and methods,
|
|
821
|
-
* but it has some features that make texture management easier.
|
|
822
|
-
* You need to use {@link ImageSprite.load()} to show the image in the canvas.
|
|
823
|
-
* This class is used for functions like {@link addImage} and {@link showWithDissolve}.
|
|
824
|
-
* @example
|
|
825
|
-
* ```typescript
|
|
826
|
-
* let alien = new ImageSprite({
|
|
827
|
-
* anchor: { x: 0.5, y: 0.5 },
|
|
828
|
-
* x: 100,
|
|
829
|
-
* y: 100,
|
|
830
|
-
* }, 'https://pixijs.com/assets/eggHead.png')
|
|
831
|
-
* await alien.load()
|
|
832
|
-
* canvas.add("alien", alien)
|
|
833
|
-
* ```
|
|
834
|
-
* @example
|
|
835
|
-
* ```typescript
|
|
836
|
-
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
837
|
-
* alien.anchor.set(0.5);
|
|
838
|
-
* alien.x = 100
|
|
839
|
-
* alien.y = 100
|
|
840
|
-
* await alien.load()
|
|
841
|
-
* ```
|
|
842
|
-
*/
|
|
843
|
-
declare class ImageSprite<Memory extends ImageSpriteMemory = ImageSpriteMemory> extends Sprite<Memory> implements AdditionalPositionsExtension {
|
|
844
|
-
pixivnId: string;
|
|
845
|
-
constructor(options?: ImageSpriteOptions | Omit<Texture, "on"> | undefined, textureAlias?: string);
|
|
846
|
-
get memory(): ImageSpriteMemory;
|
|
847
|
-
set memory(_value: ImageSpriteMemory);
|
|
848
|
-
setMemory(value: ImageSpriteMemory): Promise<void>;
|
|
849
|
-
static from(source: Texture | TextureSourceLike, skipCache?: boolean): ImageSprite<ImageSpriteMemory>;
|
|
850
|
-
private _loadIsStarted;
|
|
851
|
-
get loadIsStarted(): boolean;
|
|
852
|
-
/**
|
|
853
|
-
* Load the image from the link and set the texture of the sprite.
|
|
854
|
-
* @returns A promise that resolves when the image is loaded.
|
|
855
|
-
*/
|
|
856
|
-
load(): Promise<void>;
|
|
857
|
-
set texture(value: Texture<TextureSource<any>>);
|
|
858
|
-
get texture(): Texture<TextureSource<any>>;
|
|
859
|
-
/**
|
|
860
|
-
* Check if the texture is empty.
|
|
861
|
-
* @returns A boolean that is true if the texture is empty.
|
|
862
|
-
*/
|
|
863
|
-
get haveEmptyTexture(): boolean;
|
|
864
|
-
/** AdditionalPositions */
|
|
865
|
-
private _align;
|
|
866
|
-
set align(value: Partial<PointData> | number);
|
|
867
|
-
get align(): Partial<PointData> | number;
|
|
868
|
-
set xAlign(value: number);
|
|
869
|
-
get xAlign(): number;
|
|
870
|
-
set yAlign(value: number);
|
|
871
|
-
get yAlign(): number;
|
|
872
|
-
private _percentagePosition;
|
|
873
|
-
set percentagePosition(value: Partial<PointData> | number);
|
|
874
|
-
get percentagePosition(): Partial<PointData> | number;
|
|
875
|
-
get percentageX(): number;
|
|
876
|
-
set percentageX(_value: number);
|
|
877
|
-
get percentageY(): number;
|
|
878
|
-
set percentageY(_value: number);
|
|
879
|
-
set xPercentagePosition(_value: number);
|
|
880
|
-
get xPercentagePosition(): number;
|
|
881
|
-
set yPercentagePosition(_value: number);
|
|
882
|
-
get yPercentagePosition(): number;
|
|
883
|
-
get positionType(): "pixel" | "percentage" | "align";
|
|
884
|
-
get positionInfo(): {
|
|
885
|
-
x: number;
|
|
886
|
-
y: number;
|
|
887
|
-
type: "pixel" | "percentage" | "align";
|
|
888
|
-
};
|
|
889
|
-
set positionInfo(value: {
|
|
890
|
-
x: number;
|
|
891
|
-
y: number;
|
|
892
|
-
type?: "pixel" | "percentage" | "align";
|
|
893
|
-
});
|
|
894
|
-
private reloadPosition;
|
|
895
|
-
get position(): ObservablePoint;
|
|
896
|
-
set position(value: ObservablePoint);
|
|
897
|
-
get x(): number;
|
|
898
|
-
set x(value: number);
|
|
899
|
-
get y(): number;
|
|
900
|
-
set y(value: number);
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
/**
|
|
904
|
-
* This class is a extension of the {@link ImageSprite} class, it has the same properties and methods,
|
|
905
|
-
* but it has some features that make video management easier.
|
|
906
|
-
* You need to use {@link VideoSprite.load()} to show the video in the canvas.
|
|
907
|
-
* This class is used for functions like {@link addVideo} and {@link showWithDissolve}.
|
|
908
|
-
* @example
|
|
909
|
-
* ```typescript
|
|
910
|
-
* let film = new VideoSprite({
|
|
911
|
-
* x: 100,
|
|
912
|
-
* y: 100,
|
|
913
|
-
* }, 'https://pixijs.com/assets/video.mp4')
|
|
914
|
-
* await film.load()
|
|
915
|
-
* canvas.add("film", film)
|
|
916
|
-
* ```
|
|
917
|
-
* @example
|
|
918
|
-
* ```typescript
|
|
919
|
-
* let film = addVideo("film", 'https://pixijs.com/assets/video.mp4')
|
|
920
|
-
* film.currentTime = 2
|
|
921
|
-
* await film.load()
|
|
922
|
-
* ```
|
|
923
|
-
*/
|
|
924
|
-
declare class VideoSprite extends ImageSprite<VideoSpriteMemory> {
|
|
925
|
-
constructor(options?: VideoSpriteOptions | Texture | undefined, textureAlias?: string);
|
|
926
|
-
pixivnId: string;
|
|
927
|
-
get memory(): VideoSpriteMemory;
|
|
928
|
-
set memory(_value: VideoSpriteMemory);
|
|
929
|
-
setMemory(value: VideoSpriteMemory): Promise<void>;
|
|
930
|
-
static from(source: Texture | TextureSourceLike, skipCache?: boolean): VideoSprite;
|
|
931
|
-
load(): Promise<void>;
|
|
932
|
-
private _looop;
|
|
933
|
-
/**
|
|
934
|
-
* Set to true if you want the video to loop.
|
|
935
|
-
*/
|
|
936
|
-
get loop(): boolean;
|
|
937
|
-
set loop(value: boolean);
|
|
938
|
-
private _paused;
|
|
939
|
-
/**
|
|
940
|
-
* Set to true if you want the video to be paused.
|
|
941
|
-
*/
|
|
942
|
-
get paused(): boolean;
|
|
943
|
-
set paused(value: boolean);
|
|
944
|
-
/**
|
|
945
|
-
* Pause the video.
|
|
946
|
-
*/
|
|
947
|
-
pause(): void;
|
|
948
|
-
/**
|
|
949
|
-
* Play the video.
|
|
950
|
-
*/
|
|
951
|
-
play(): void;
|
|
952
|
-
private _currentTime;
|
|
953
|
-
/**
|
|
954
|
-
* The current time of the video.
|
|
955
|
-
*/
|
|
956
|
-
get currentTime(): number;
|
|
957
|
-
set currentTime(value: number);
|
|
958
|
-
/**
|
|
959
|
-
* Restart the video.
|
|
960
|
-
*/
|
|
961
|
-
restart(): void;
|
|
962
|
-
/**
|
|
963
|
-
* The duration of the video.
|
|
964
|
-
*/
|
|
965
|
-
get duration(): number | undefined;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* Interface for the canvas container memory
|
|
970
|
-
*/
|
|
971
|
-
interface ImageContainerMemory extends ContainerMemory<ImageSprite>, AdditionalPositionsExtensionProps {
|
|
972
|
-
elements: ImageSpriteMemory[];
|
|
973
|
-
anchor?: PointData;
|
|
974
|
-
loadIsStarted: boolean;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
* This class is a extension of the [PIXI.Container class](https://pixijs.com/8.x/examples/basic/container), it has the same properties and methods,
|
|
979
|
-
* but it has the ability to be saved and loaded by the Pixi’VN library.
|
|
980
|
-
* @example
|
|
981
|
-
* ```typescript
|
|
982
|
-
* const container = new Container();
|
|
983
|
-
* canvas.add(container);
|
|
984
|
-
* const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
|
|
985
|
-
* for (let i = 0; i < 25; i++)
|
|
986
|
-
* {
|
|
987
|
-
* const bunny = new Sprite(texture);
|
|
988
|
-
* bunny.x = (i % 5) * 40;
|
|
989
|
-
* bunny.y = Math.floor(i / 5) * 40;
|
|
990
|
-
* container.addChild(bunny);
|
|
991
|
-
* }
|
|
992
|
-
* ```
|
|
993
|
-
*/
|
|
994
|
-
declare class Container<C extends ContainerChild$1 = ContainerChild$1, Memory extends ContainerMemory = ContainerMemory> extends Container$1<C> implements CanvasBaseItem<Memory> {
|
|
995
|
-
constructor(options?: ContainerOptions<C>);
|
|
996
|
-
pixivnId: string;
|
|
997
|
-
get memory(): Memory;
|
|
998
|
-
set memory(_value: Memory);
|
|
999
|
-
setMemory(value: Memory): Promise<void>;
|
|
1000
|
-
protected importChildren(value: Memory): Promise<void>;
|
|
1001
|
-
private _onEvents;
|
|
1002
|
-
get onEvents(): {
|
|
1003
|
-
[name: string]: string;
|
|
1004
|
-
};
|
|
1005
|
-
/**
|
|
1006
|
-
* is same function as on(), but it keeps in memory the children.
|
|
1007
|
-
* @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
|
|
1008
|
-
* @param eventClass The class that extends CanvasEvent.
|
|
1009
|
-
* @returns
|
|
1010
|
-
* @example
|
|
1011
|
-
* ```typescript
|
|
1012
|
-
* \@eventDecorator()
|
|
1013
|
-
* export class EventTest extends CanvasEvent<Container> {
|
|
1014
|
-
* override fn(event: CanvasEventNamesType, container: Container): void {
|
|
1015
|
-
* if (event === 'pointerdown') {
|
|
1016
|
-
* container.scale.x *= 1.25;
|
|
1017
|
-
* container.scale.y *= 1.25;
|
|
1018
|
-
* }
|
|
1019
|
-
* }
|
|
1020
|
-
* }
|
|
1021
|
-
* ```
|
|
1022
|
-
*
|
|
1023
|
-
* ```typescript
|
|
1024
|
-
* const container = new Container();
|
|
1025
|
-
*
|
|
1026
|
-
* container.eventMode = 'static';
|
|
1027
|
-
* container.cursor = 'pointer';
|
|
1028
|
-
* container.onEvent('pointerdown', EventTest);
|
|
1029
|
-
*
|
|
1030
|
-
* canvas.add("container", container);
|
|
1031
|
-
* ```
|
|
1032
|
-
*/
|
|
1033
|
-
onEvent<T extends CanvasEventNamesType, T2 extends typeof CanvasEvent<typeof this>>(event: T, eventClass: T2): this;
|
|
1034
|
-
/**
|
|
1035
|
-
* Add a listener for a given event.
|
|
1036
|
-
* Unlike {@link onEvent}, this method does **not track the event association in the current game state**, so it will not be included in saves.
|
|
1037
|
-
*/
|
|
1038
|
-
on<T extends keyof ContainerEvents<ContainerChild$1> | keyof {
|
|
1039
|
-
[K: symbol]: any;
|
|
1040
|
-
[K: {} & string]: any;
|
|
1041
|
-
}>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild$1> & {
|
|
1042
|
-
[K: symbol]: any;
|
|
1043
|
-
[K: {} & string]: any;
|
|
1044
|
-
}>[Extract<T, keyof ContainerEvents<ContainerChild$1> | keyof {
|
|
1045
|
-
[K: symbol]: any;
|
|
1046
|
-
[K: {} & string]: any;
|
|
1047
|
-
}>]) => void, context?: any): this;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
/**
|
|
1051
|
-
* This class is a extension of the {@link Container}, it has the same properties and methods,
|
|
1052
|
-
* but this container is composed only of {@link ImageSprite} and introduces the {@link ImageContainer.load} functionality
|
|
1053
|
-
* @example
|
|
1054
|
-
* ```typescript
|
|
1055
|
-
* const liamBodyImageUrl = 'https://example.com/assets/liam/body.png';
|
|
1056
|
-
* const liamHeadImageUrl = 'https://example.com/assets/liam/head.png';
|
|
1057
|
-
* const container = new ImageContainer(undefined, [liamBodyImageUrl, liamHeadImageUrl]);
|
|
1058
|
-
* await container.load()
|
|
1059
|
-
* canvas.add(container);
|
|
1060
|
-
* ```
|
|
1061
|
-
*/
|
|
1062
|
-
declare class ImageContainer extends Container<ImageSprite, ImageContainerMemory> implements AnchorExtension, AdditionalPositionsExtension {
|
|
1063
|
-
constructor(options?: ImageContainerOptions<ImageSprite>, textureAliases?: string[]);
|
|
1064
|
-
get memory(): ImageContainerMemory;
|
|
1065
|
-
set memory(_value: ImageContainerMemory);
|
|
1066
|
-
setMemory(value: ImageContainerMemory): Promise<void>;
|
|
1067
|
-
pixivnId: string;
|
|
1068
|
-
private _loadIsStarted;
|
|
1069
|
-
get loadIsStarted(): boolean;
|
|
1070
|
-
/**
|
|
1071
|
-
* Load the children images.
|
|
1072
|
-
* @returns A promise that resolves when the images are loaded.
|
|
1073
|
-
*/
|
|
1074
|
-
load(): Promise<void>;
|
|
1075
|
-
/**
|
|
1076
|
-
* The texture of the first child.
|
|
1077
|
-
* If there is no child, it returns a new {@link Texture}.
|
|
1078
|
-
*/
|
|
1079
|
-
get texture(): Texture<pixi_js.TextureSource<any>>;
|
|
1080
|
-
/**
|
|
1081
|
-
* Check if there is a child with the empty texture.
|
|
1082
|
-
* @returns A boolean that is true if there is a child with the empty texture.
|
|
1083
|
-
*/
|
|
1084
|
-
get haveEmptyTexture(): boolean;
|
|
1085
|
-
/** Anchor */
|
|
1086
|
-
private _anchor?;
|
|
1087
|
-
get anchor(): PointData;
|
|
1088
|
-
set anchor(value: PointData | number);
|
|
1089
|
-
private reloadAnchor;
|
|
1090
|
-
get pivot(): ObservablePoint;
|
|
1091
|
-
set pivot(value: ObservablePoint);
|
|
1092
|
-
/** AdditionalPositions */
|
|
1093
|
-
private _align;
|
|
1094
|
-
set align(value: Partial<PointData> | number);
|
|
1095
|
-
get align(): Partial<PointData> | number;
|
|
1096
|
-
set xAlign(value: number);
|
|
1097
|
-
get xAlign(): number;
|
|
1098
|
-
set yAlign(value: number);
|
|
1099
|
-
get yAlign(): number;
|
|
1100
|
-
private _percentagePosition;
|
|
1101
|
-
set percentagePosition(value: Partial<PointData> | number);
|
|
1102
|
-
get percentagePosition(): Partial<PointData> | number;
|
|
1103
|
-
set percentageX(_value: number);
|
|
1104
|
-
get percentageX(): number;
|
|
1105
|
-
set xPercentagePosition(_value: number);
|
|
1106
|
-
get xPercentagePosition(): number;
|
|
1107
|
-
set yPercentagePosition(_value: number);
|
|
1108
|
-
get yPercentagePosition(): number;
|
|
1109
|
-
set percentageY(_value: number);
|
|
1110
|
-
get percentageY(): number;
|
|
1111
|
-
get positionType(): "pixel" | "percentage" | "align";
|
|
1112
|
-
get positionInfo(): {
|
|
1113
|
-
x: number;
|
|
1114
|
-
y: number;
|
|
1115
|
-
type: "pixel" | "percentage" | "align";
|
|
1116
|
-
};
|
|
1117
|
-
set positionInfo(value: {
|
|
1118
|
-
x: number;
|
|
1119
|
-
y: number;
|
|
1120
|
-
type?: "pixel" | "percentage" | "align";
|
|
1121
|
-
});
|
|
1122
|
-
private reloadPosition;
|
|
1123
|
-
get position(): ObservablePoint;
|
|
1124
|
-
set position(value: ObservablePoint);
|
|
1125
|
-
get x(): number;
|
|
1126
|
-
set x(value: number);
|
|
1127
|
-
get y(): number;
|
|
1128
|
-
set y(value: number);
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
/**
|
|
1132
|
-
* This class is responsible for managing the canvas, the tickers, the events, and the window size and the children of the window.
|
|
1133
|
-
*/
|
|
1134
|
-
declare class CanvasManagerStatic {
|
|
1135
|
-
private constructor();
|
|
1136
|
-
private static _app;
|
|
1137
|
-
static get app(): Application<pixi_js.Renderer>;
|
|
1138
|
-
static get gameLayer(): Container$1<pixi_js.ContainerChild>;
|
|
1139
|
-
/**
|
|
1140
|
-
* This is the div that have same size of the canvas.
|
|
1141
|
-
* This is useful to put interface elements.
|
|
1142
|
-
* You can use React or other framework to put elements in this div.
|
|
1143
|
-
*/
|
|
1144
|
-
static htmlLayers: HTMLElement[];
|
|
1145
|
-
static canvasWidth: number;
|
|
1146
|
-
static canvasHeight: number;
|
|
1147
|
-
static _isInitialized: boolean;
|
|
1148
|
-
static init(element: HTMLElement, width: number, height: number, options?: Partial<ApplicationOptions>, devtoolsOptions?: Devtools): Promise<void>;
|
|
1149
|
-
/**
|
|
1150
|
-
* Add the canvas into a html element.
|
|
1151
|
-
* @param element it is the html element where I will put the canvas. Example: document.body
|
|
1152
|
-
*/
|
|
1153
|
-
private static addCanvasIntoHTMLElement;
|
|
1154
|
-
static addHtmlLayer(id: string, element: HTMLElement, style?: Pick<CSSStyleDeclaration, "position" | "pointerEvents">): HTMLDivElement;
|
|
1155
|
-
static removeHtmlLayer(id: string): void;
|
|
1156
|
-
static getHtmlLayer(id: string): HTMLElement | undefined;
|
|
1157
|
-
/**
|
|
1158
|
-
* This method returns the scale of the screen.
|
|
1159
|
-
*/
|
|
1160
|
-
private static get screenScale();
|
|
1161
|
-
/**
|
|
1162
|
-
* This method returns the width of the screen enlarged by the scale.
|
|
1163
|
-
*/
|
|
1164
|
-
private static get screenWidth();
|
|
1165
|
-
/**
|
|
1166
|
-
* This method returns the height of the screen enlarged by the scale.
|
|
1167
|
-
*/
|
|
1168
|
-
private static get screenHeight();
|
|
1169
|
-
/**
|
|
1170
|
-
* This method returns the horizontal margin of the screen.
|
|
1171
|
-
*/
|
|
1172
|
-
private static get horizontalMargin();
|
|
1173
|
-
/**
|
|
1174
|
-
* This method returns the vertical margin of the screen.
|
|
1175
|
-
*/
|
|
1176
|
-
private static get verticalMargin();
|
|
1177
|
-
/**
|
|
1178
|
-
* This method is called when the screen is resized.
|
|
1179
|
-
*/
|
|
1180
|
-
private static resize;
|
|
1181
|
-
/**
|
|
1182
|
-
* The order of the elements in the canvas, is determined by the zIndex.
|
|
1183
|
-
*/
|
|
1184
|
-
static get childrenAliasesOrder(): string[];
|
|
1185
|
-
/** Edit Tickers Methods */
|
|
1186
|
-
static get currentTickersWithoutCreatedBySteps(): {
|
|
1187
|
-
[k: string]: TickerHistory<any>;
|
|
1188
|
-
};
|
|
1189
|
-
static _currentTickers: {
|
|
1190
|
-
[id: string]: TickerInfo<any>;
|
|
1191
|
-
};
|
|
1192
|
-
static _currentTickersSequence: {
|
|
1193
|
-
[alias: string]: {
|
|
1194
|
-
[tickerId: string]: TickersSequence;
|
|
1195
|
-
};
|
|
1196
|
-
};
|
|
1197
|
-
static _currentTickersTimeouts: {
|
|
1198
|
-
[timeout: string]: TickerTimeoutHistory;
|
|
1199
|
-
};
|
|
1200
|
-
static _tickersToCompleteOnStepEnd: {
|
|
1201
|
-
tikersIds: {
|
|
1202
|
-
id: string;
|
|
1203
|
-
}[];
|
|
1204
|
-
stepAlias: {
|
|
1205
|
-
id: string;
|
|
1206
|
-
alias: string;
|
|
1207
|
-
}[];
|
|
1208
|
-
};
|
|
1209
|
-
/**
|
|
1210
|
-
* @deprecated
|
|
1211
|
-
*/
|
|
1212
|
-
static _tickersOnPause: {
|
|
1213
|
-
[aliasOrId: string]: PauseTickerType;
|
|
1214
|
-
};
|
|
1215
|
-
static generateTickerId(tickerData: TickerInfo<any> | TickersSequence): string;
|
|
1216
|
-
static addTickerTimeoutInfo(aliases: string | string[], ticker: string, timeout: string, canBeDeletedBeforeEnd: boolean): void;
|
|
1217
|
-
static removeTickerTimeoutInfo(timeout: NodeJS.Timeout | string): void;
|
|
1218
|
-
static removeTickerTimeout(timeout: NodeJS.Timeout | string): void;
|
|
1219
|
-
static removeTickerTimeoutsByAlias(alias: string, checkCanBeDeletedBeforeEnd: boolean): void;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* Interface for the canvas text memory
|
|
1224
|
-
*/
|
|
1225
|
-
interface TextMemory extends TextOptions$1, CanvasBaseItemMemory {
|
|
1226
|
-
onEvents: {
|
|
1227
|
-
[name: string]: EventIdType;
|
|
1228
|
-
};
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
/**
|
|
1232
|
-
* This class is a extension of the [PIXI.Text class](https://pixijs.com/8.x/examples/text/pixi-text), it has the same properties and methods,
|
|
1233
|
-
* but it has the ability to be saved and loaded by the Pixi’VN library.
|
|
1234
|
-
* @example
|
|
1235
|
-
* ```typescript
|
|
1236
|
-
* const text = new Text();
|
|
1237
|
-
* text.text = "Hello World"
|
|
1238
|
-
* canvas.add("text", text);
|
|
1239
|
-
* ```
|
|
1240
|
-
*/
|
|
1241
|
-
declare class Text extends Text$1 implements CanvasBaseItem<TextMemory> {
|
|
1242
|
-
constructor(options?: TextOptions);
|
|
1243
|
-
pixivnId: string;
|
|
1244
|
-
get memory(): TextMemory;
|
|
1245
|
-
set memory(_value: TextMemory);
|
|
1246
|
-
setMemory(value: TextMemory): Promise<void>;
|
|
1247
|
-
private _onEvents;
|
|
1248
|
-
get onEvents(): {
|
|
1249
|
-
[name: string]: string;
|
|
1250
|
-
};
|
|
1251
|
-
/**
|
|
1252
|
-
* is same function as on(), but it keeps in memory the children.
|
|
1253
|
-
* @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
|
|
1254
|
-
* @param eventClass The class that extends CanvasEvent.
|
|
1255
|
-
* @returns
|
|
1256
|
-
* @example
|
|
1257
|
-
* ```typescript
|
|
1258
|
-
* \@eventDecorator()
|
|
1259
|
-
* export class EventTest extends CanvasEvent<Text> {
|
|
1260
|
-
* override fn(event: CanvasEventNamesType, text: Text): void {
|
|
1261
|
-
* if (event === 'pointerdown') {
|
|
1262
|
-
* text.scale.x *= 1.25;
|
|
1263
|
-
* text.scale.y *= 1.25;
|
|
1264
|
-
* }
|
|
1265
|
-
* }
|
|
1266
|
-
* }
|
|
1267
|
-
* ```
|
|
1268
|
-
*
|
|
1269
|
-
* ```typescript
|
|
1270
|
-
* const text = new Text();
|
|
1271
|
-
* text.text = "Hello World"
|
|
1272
|
-
*
|
|
1273
|
-
* text.eventMode = 'static';
|
|
1274
|
-
* text.cursor = 'pointer';
|
|
1275
|
-
* text.onEvent('pointerdown', EventTest);
|
|
1276
|
-
*
|
|
1277
|
-
* canvas.add("text", text);
|
|
1278
|
-
* ```
|
|
1279
|
-
*/
|
|
1280
|
-
onEvent<T extends typeof CanvasEvent<typeof this>>(event: CanvasEventNamesType, eventClass: T): this;
|
|
1281
|
-
/**
|
|
1282
|
-
* Add a listener for a given event.
|
|
1283
|
-
* Unlike {@link onEvent}, this method does **not track the event association in the current game state**, so it will not be included in saves.
|
|
1284
|
-
*/
|
|
1285
|
-
on<T extends keyof ContainerEvents<ContainerChild> | keyof {
|
|
1286
|
-
[K: symbol]: any;
|
|
1287
|
-
[K: {} & string]: any;
|
|
1288
|
-
}>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
|
|
1289
|
-
[K: symbol]: any;
|
|
1290
|
-
[K: {} & string]: any;
|
|
1291
|
-
}>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
|
|
1292
|
-
[K: symbol]: any;
|
|
1293
|
-
[K: {} & string]: any;
|
|
1294
|
-
}>]) => void, context?: any): this;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
type CanvasElementAliasType = string;
|
|
1298
|
-
|
|
1299
|
-
/**
|
|
1300
|
-
* Is a decorator that register a canvas component in the game.
|
|
1301
|
-
* @param name Name of the canvas component, by default it will use the class name. If the name is already registered, it will show a warning
|
|
1302
|
-
* @returns
|
|
1303
|
-
*/
|
|
1304
|
-
declare function canvasComponentDecorator(name?: CanvasElementAliasType): (target: typeof CanvasBaseItem<any>) => void;
|
|
1305
|
-
declare namespace RegisteredCanvasComponents {
|
|
1306
|
-
/**
|
|
1307
|
-
* Register a canvas component in the game.
|
|
1308
|
-
* @param target The class of the canvas component.
|
|
1309
|
-
* @param name Name of the canvas component, by default it will use the class name. If the name is already registered, it will show a warning
|
|
1310
|
-
*/
|
|
1311
|
-
function add(target: typeof CanvasBaseItem<any>, name?: CanvasElementAliasType): void;
|
|
1312
|
-
/**
|
|
1313
|
-
* Get a canvas component by the id.
|
|
1314
|
-
* @param canvasId The id of the canvas component.
|
|
1315
|
-
* @returns The canvas component type.
|
|
1316
|
-
*/
|
|
1317
|
-
function get<T extends typeof CanvasBaseItem<any>>(canvasId: CanvasElementAliasType): T | undefined;
|
|
1318
|
-
/**
|
|
1319
|
-
* Get a list of all canvas components registered.
|
|
1320
|
-
* @returns An array of canvas components.
|
|
1321
|
-
*/
|
|
1322
|
-
function values(): (typeof CanvasBaseItem<any>)[];
|
|
1323
|
-
/**
|
|
1324
|
-
* Check if a canvas component is registered.
|
|
1325
|
-
* @param id The id of the canvas component.
|
|
1326
|
-
* @returns True if the canvas component is registered, false otherwise.
|
|
1327
|
-
*/
|
|
1328
|
-
function has(id: string): boolean;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
/**
|
|
1332
|
-
* Is a decorator that register a event in the game.
|
|
1333
|
-
* Is a required decorator for use the event in the game.
|
|
1334
|
-
* Thanks to this decoration the game has the possibility of updating the events to the latest modification and saving the game.
|
|
1335
|
-
* @param name is th identifier of the event, by default is the name of the class
|
|
1336
|
-
* @returns
|
|
1337
|
-
*/
|
|
1338
|
-
declare function eventDecorator(name?: EventIdType): (target: typeof CanvasEvent<any>) => void;
|
|
1339
|
-
declare namespace RegisteredEvents {
|
|
1340
|
-
/**
|
|
1341
|
-
* Register a event in the game.
|
|
1342
|
-
* @param target The class of the event.
|
|
1343
|
-
* @param name Name of the event, by default it will use the class name. If the name is already registered, it will show a warning
|
|
1344
|
-
*/
|
|
1345
|
-
function add(target: typeof CanvasEvent<CanvasEventNamesType>, name?: EventIdType): void;
|
|
1346
|
-
/**
|
|
1347
|
-
* Get a event by the id.
|
|
1348
|
-
* @param canvasId The id of the event.
|
|
1349
|
-
* @returns The event type.
|
|
1350
|
-
*/
|
|
1351
|
-
function get<T = typeof CanvasEvent<CanvasBaseInterface<any>>>(eventId: EventIdType): T | undefined;
|
|
1352
|
-
/**
|
|
1353
|
-
* Get a event instance by the id.
|
|
1354
|
-
* @param eventId The id of the event.
|
|
1355
|
-
* @returns The event instance.
|
|
1356
|
-
*/
|
|
1357
|
-
function getInstance<T = CanvasEvent<CanvasBaseInterface<any>>>(eventId: EventIdType): T | undefined;
|
|
1358
|
-
/**
|
|
1359
|
-
* Get a list of all events registered.
|
|
1360
|
-
* @returns An array of events.
|
|
1361
|
-
*/
|
|
1362
|
-
function values(): (typeof CanvasEvent<CanvasEventNamesType>)[];
|
|
1363
|
-
/**
|
|
1364
|
-
* Check if a event is registered.
|
|
1365
|
-
* @param id The id of the event.
|
|
1366
|
-
* @returns True if the event is registered, false otherwise
|
|
1367
|
-
*/
|
|
1368
|
-
function has(id: string): boolean;
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
/**
|
|
1372
|
-
* Shake the canvas element.
|
|
1373
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1374
|
-
* @param alias
|
|
1375
|
-
* @param options
|
|
1376
|
-
* @param priority
|
|
1377
|
-
* @returns
|
|
1378
|
-
*/
|
|
1379
|
-
declare function shakeEffect(alias: string, options?: ShakeEffectProps, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1380
|
-
|
|
1381
|
-
interface BaseTransitionProps {
|
|
1382
|
-
/**
|
|
1383
|
-
* If true, the transition will be completed before the next step.
|
|
1384
|
-
* For example, if the transition is a dissolve transition, the "alpha" of the texture will be 1 before the next step.
|
|
1385
|
-
* @default true
|
|
1386
|
-
*/
|
|
1387
|
-
forceCompleteBeforeNext?: boolean;
|
|
1388
|
-
}
|
|
1389
|
-
interface ShowWithDissolveTransitionProps extends BaseTransitionProps, AnimationOptions {
|
|
1390
|
-
}
|
|
1391
|
-
interface ShowWithFadeTransitionProps extends BaseTransitionProps, AnimationOptions {
|
|
1392
|
-
}
|
|
1393
|
-
interface MoveInOutProps extends BaseTransitionProps, AnimationOptions {
|
|
1394
|
-
/**
|
|
1395
|
-
* The direction of the movement.
|
|
1396
|
-
* @default "right"
|
|
1397
|
-
*/
|
|
1398
|
-
direction?: "up" | "down" | "left" | "right";
|
|
1399
|
-
}
|
|
1400
|
-
interface ZoomInOutProps extends BaseTransitionProps, AnimationOptions {
|
|
1401
|
-
/**
|
|
1402
|
-
* The direction of the zoom effect.
|
|
1403
|
-
* @default "right"
|
|
1404
|
-
*/
|
|
1405
|
-
direction?: "up" | "down" | "left" | "right";
|
|
1406
|
-
}
|
|
1407
|
-
interface PushInOutProps extends BaseTransitionProps, AnimationOptions {
|
|
1408
|
-
/**
|
|
1409
|
-
* The direction of the push effect.
|
|
1410
|
-
* @default "right"
|
|
1411
|
-
*/
|
|
1412
|
-
direction?: "up" | "down" | "left" | "right";
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
type TComponent = CanvasBaseInterface<any> | string | string[] | {
|
|
1416
|
-
value: string;
|
|
1417
|
-
options: ImageSpriteOptions;
|
|
1418
|
-
} | {
|
|
1419
|
-
value: string[];
|
|
1420
|
-
options: ImageContainerOptions;
|
|
1421
|
-
};
|
|
1422
|
-
/**
|
|
1423
|
-
* Show a image in the canvas with a disolve effect.
|
|
1424
|
-
* Disolve effect is a effect that the image is shown with a fade in.
|
|
1425
|
-
* If exist a image with the same alias, then the image is replaced and the first image is removed after the effect is done.
|
|
1426
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1427
|
-
* @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.
|
|
1428
|
-
* If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
|
|
1429
|
-
* If you don't provide the component, then the alias is used as the url.
|
|
1430
|
-
* @param props The properties of the effect
|
|
1431
|
-
* @param priority The priority of the effect
|
|
1432
|
-
* @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.
|
|
1433
|
-
*/
|
|
1434
|
-
declare function showWithDissolve(alias: string, component?: TComponent, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1435
|
-
/**
|
|
1436
|
-
* Remove a image from the canvas with a disolve effect.
|
|
1437
|
-
* Disolve effect is a effect that the image is removed with a fade out.
|
|
1438
|
-
* This function is equivalent to {@link removeWithFade}.
|
|
1439
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1440
|
-
* @param props The properties of the effect
|
|
1441
|
-
* @param priority The priority of the effect
|
|
1442
|
-
* @returns The ids of the tickers that are used in the effect.
|
|
1443
|
-
*/
|
|
1444
|
-
declare function removeWithDissolve(alias: string, props?: ShowWithDissolveTransitionProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1445
|
-
/**
|
|
1446
|
-
* Show a image in the canvas with a fade effect.
|
|
1447
|
-
* Fade effect is a effect that the image is shown with a fade in.
|
|
1448
|
-
* 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.
|
|
1449
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1450
|
-
* @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.
|
|
1451
|
-
* If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
|
|
1452
|
-
* If you don't provide the component, then the alias is used as the url.
|
|
1453
|
-
* @param props The properties of the effect
|
|
1454
|
-
* @param priority The priority of the effect
|
|
1455
|
-
* @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.
|
|
1456
|
-
*/
|
|
1457
|
-
declare function showWithFade(alias: string, component?: TComponent, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1458
|
-
/**
|
|
1459
|
-
* Remove a image from the canvas with a fade effect.
|
|
1460
|
-
* Fade effect is a effect that the image is removed with a fade out.
|
|
1461
|
-
* This function is equivalent to {@link removeWithDissolve}.
|
|
1462
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1463
|
-
* @param props The properties of the effect
|
|
1464
|
-
* @param priority The priority of the effect
|
|
1465
|
-
* @returns The ids of the tickers that are used in the effect.
|
|
1466
|
-
*/
|
|
1467
|
-
declare function removeWithFade(alias: string, props?: ShowWithFadeTransitionProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1468
|
-
/**
|
|
1469
|
-
* 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.
|
|
1470
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1471
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1472
|
-
* @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.
|
|
1473
|
-
* If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
|
|
1474
|
-
* If you don't provide the component, then the alias is used as the url.
|
|
1475
|
-
* @param props The properties of the effect
|
|
1476
|
-
* @param priority The priority of the effect
|
|
1477
|
-
* @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.
|
|
1478
|
-
*/
|
|
1479
|
-
declare function moveIn(alias: string, component?: TComponent, props?: MoveInOutProps & {
|
|
1480
|
-
/**
|
|
1481
|
-
* If true, then the old component is removed with a move out, after the new image is moved in.
|
|
1482
|
-
* @default false
|
|
1483
|
-
*/
|
|
1484
|
-
removeOldComponentWithMoveOut?: boolean;
|
|
1485
|
-
}, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1486
|
-
/**
|
|
1487
|
-
* 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.
|
|
1488
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1489
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1490
|
-
* @param props The properties of the effect
|
|
1491
|
-
* @param priority The priority of the effect
|
|
1492
|
-
* @returns The ids of the tickers that are used in the effect.
|
|
1493
|
-
*/
|
|
1494
|
-
declare function moveOut(alias: string, props?: MoveInOutProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1495
|
-
/**
|
|
1496
|
-
* Show a image in the canvas with a zoom effect. The image is zoomed in from the center of the canvas.
|
|
1497
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1498
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1499
|
-
* @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.
|
|
1500
|
-
* If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
|
|
1501
|
-
* If you don't provide the component, then the alias is used as the url.
|
|
1502
|
-
* @param props The properties of the effect
|
|
1503
|
-
* @param priority The priority of the effect
|
|
1504
|
-
* @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.
|
|
1505
|
-
*/
|
|
1506
|
-
declare function zoomIn(alias: string, component?: TComponent, props?: ZoomInOutProps & {
|
|
1507
|
-
/**
|
|
1508
|
-
* If true, then the old component is removed with a zoom out, after the new image is zoomed in.
|
|
1509
|
-
* @default false
|
|
1510
|
-
*/
|
|
1511
|
-
removeOldComponentWithZoomOut?: boolean;
|
|
1512
|
-
}, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1513
|
-
/**
|
|
1514
|
-
* Remove a image from the canvas with a zoom effect. The image is zoomed out to the center of the canvas.
|
|
1515
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1516
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1517
|
-
* @param props The properties of the effect
|
|
1518
|
-
* @param priority The priority of the effect
|
|
1519
|
-
* @returns The ids of the tickers that are used in the effect.
|
|
1520
|
-
*/
|
|
1521
|
-
declare function zoomOut(alias: string, props?: ZoomInOutProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1522
|
-
/**
|
|
1523
|
-
* 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.
|
|
1524
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1525
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1526
|
-
* @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.
|
|
1527
|
-
* If imageUrl is an array, then the {@link ImageContainer} is added to the canvas.
|
|
1528
|
-
* If you don't provide the component, then the alias is used as the url.
|
|
1529
|
-
* @param props The properties of the effect
|
|
1530
|
-
* @param priority The priority of the effect
|
|
1531
|
-
* @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.
|
|
1532
|
-
*/
|
|
1533
|
-
declare function pushIn(alias: string, component?: TComponent, props?: PushInOutProps, priority?: UPDATE_PRIORITY): Promise<string[] | undefined>;
|
|
1534
|
-
/**
|
|
1535
|
-
* Remove a image from the canvas with a push effect. The image is pushed out to the outside of the canvas.
|
|
1536
|
-
* If there is a/more ticker(s) with the same alias, then the ticker(s) is/are paused.
|
|
1537
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1538
|
-
* @param props The properties of the effect
|
|
1539
|
-
* @param priority The priority of the effect
|
|
1540
|
-
* @returns The ids of the tickers that are used in the effect.
|
|
1541
|
-
*/
|
|
1542
|
-
declare function pushOut(alias: string, props?: PushInOutProps, priority?: UPDATE_PRIORITY): string[] | undefined;
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* Add a list of images in the container, after that, the images are added to the canvas.
|
|
1546
|
-
* Is the same that {@link showImageContainer}, but the image is not shown.
|
|
1547
|
-
* If you want to show the image, then you need to use the function {@link ImageSprite.load()}.
|
|
1548
|
-
* @param alias is the unique alias of the image. You can use this alias to refer to this image
|
|
1549
|
-
* @param imageUrls is the url of the image. If you don't provide the url, then the alias is used as the url.
|
|
1550
|
-
* @param options The options of the image.
|
|
1551
|
-
* @returns the container of the image.
|
|
1552
|
-
* @example
|
|
1553
|
-
* ```typescript
|
|
1554
|
-
* let bunny = addImageContainer("bunny", ["https://pixijs.com/assets/bunny-body.png", "https://pixijs.com/assets/bunny-eyes.png"])
|
|
1555
|
-
* await bunny.load()
|
|
1556
|
-
* ```
|
|
1557
|
-
*/
|
|
1558
|
-
declare function addImageCointainer(alias: string, imageUrls: string[], options?: ImageContainerOptions<ImageSprite>): ImageContainer;
|
|
1559
|
-
/**
|
|
1560
|
-
* Add a list of images in the container, after that, the images are added and shown in the canvas.
|
|
1561
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1562
|
-
* @param imageUrls The url of the image.
|
|
1563
|
-
* @param options The options of the image.
|
|
1564
|
-
* @returns A promise that is resolved when the image is loaded.
|
|
1565
|
-
* @example
|
|
1566
|
-
* ```typescript
|
|
1567
|
-
* let bunny = showImageContainer("bunny", ["https://pixijs.com/assets/bunny-body.png", "https://pixijs.com/assets/bunny-eyes.png"])
|
|
1568
|
-
* ```
|
|
1569
|
-
*/
|
|
1570
|
-
declare function showImageContainer(alias: string, imageUrls: string[], options?: ImageContainerOptions<ImageSprite>): Promise<ImageContainer>;
|
|
1571
|
-
|
|
1572
|
-
/**
|
|
1573
|
-
* Add a image in the canvas.
|
|
1574
|
-
* Is the same that {@link showImage}, but the image is not shown.
|
|
1575
|
-
* If you want to show the image, then you need to use the function {@link ImageSprite.load()}.
|
|
1576
|
-
* @param alias is the unique alias of the image. You can use this alias to refer to this image
|
|
1577
|
-
* @param imageUrl is the url of the image. If you don't provide the url, then the alias is used as the url.
|
|
1578
|
-
* @param options The options of the image.
|
|
1579
|
-
* @returns the container of the image.
|
|
1580
|
-
* @example
|
|
1581
|
-
* ```typescript
|
|
1582
|
-
* let bunny1 = addImage("bunny1", "https://pixijs.com/assets/bunny1.png")
|
|
1583
|
-
* await bunny1.load()
|
|
1584
|
-
* Assets.add({ alias: "bunny2", src: "https://pixijs.com/assets/bunny2.png" })
|
|
1585
|
-
* let bunny2 = addImage("bunny2")
|
|
1586
|
-
* await bunny2.load()
|
|
1587
|
-
* ```
|
|
1588
|
-
*/
|
|
1589
|
-
declare function addImage(alias: string, imageUrl?: string, options?: ImageSpriteOptions): ImageSprite;
|
|
1590
|
-
/**
|
|
1591
|
-
* Add and show a image in the canvas. This function is a combination of {@link addImage} and {@link loadImage}.
|
|
1592
|
-
* @param alias The unique alias of the image. You can use this alias to refer to this image
|
|
1593
|
-
* @param imageUrl The url of the image.
|
|
1594
|
-
* @param options The options of the image.
|
|
1595
|
-
* @returns A promise that is resolved when the image is loaded.
|
|
1596
|
-
* @example
|
|
1597
|
-
* ```typescript
|
|
1598
|
-
* let bunny1 = showImage("bunny1", "https://pixijs.com/assets/bunny1.png")
|
|
1599
|
-
* Assets.add({ alias: "bunny2", src: "https://pixijs.com/assets/bunny2.png" })
|
|
1600
|
-
* let bunny2 = showImage("bunny2")
|
|
1601
|
-
* ```
|
|
1602
|
-
*/
|
|
1603
|
-
declare function showImage(alias: string, imageUrl?: string, options?: ImageSpriteOptions): Promise<ImageSprite>;
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* Get a texture from a url.
|
|
1607
|
-
* @param textureAlias is the url of the file.
|
|
1608
|
-
* @returns the texture of the image or video, or a text with the error.
|
|
1609
|
-
*/
|
|
1610
|
-
declare function getTexture(textureAlias?: string): Promise<Texture | void>;
|
|
1611
|
-
|
|
1612
|
-
/**
|
|
1613
|
-
* Add a video in the canvas.
|
|
1614
|
-
* Is the same that {@link showVideo}, but the video is not shown.
|
|
1615
|
-
* If you want to show the video, then you need to use the function {@link VideoSprite.load()}.
|
|
1616
|
-
* @param alias is the unique alias of the video. You can use this alias to refer to this video
|
|
1617
|
-
* @param videoUrl is the url of the video. If you don't provide the url, then the alias is used as the url.
|
|
1618
|
-
* @param options The options of the video.
|
|
1619
|
-
* @returns the container of the video.
|
|
1620
|
-
* @example
|
|
1621
|
-
* ```typescript
|
|
1622
|
-
* let video1 = addVideo("video1", "https://pixijs.com/assets/video1.mp4")
|
|
1623
|
-
* await video1.load()
|
|
1624
|
-
* Assets.add({ alias: "video2", src: "https://pixijs.com/assets/video2.png" })
|
|
1625
|
-
* let video2 = addVideo("video2")
|
|
1626
|
-
* await video2.load()
|
|
1627
|
-
* ```
|
|
1628
|
-
*/
|
|
1629
|
-
declare function addVideo(alias: string, videoUrl?: string, options?: VideoSpriteOptions): VideoSprite;
|
|
1630
|
-
/**
|
|
1631
|
-
* Add and show a video in the canvas. This function is a combination of {@link addVideo} and {@link loadVideo}.
|
|
1632
|
-
* @param alias The unique alias of the video. You can use this alias to refer to this video
|
|
1633
|
-
* @param videoUrl The url of the video.
|
|
1634
|
-
* @param options The options of the video.
|
|
1635
|
-
* @returns A promise that is resolved when the video is loaded.
|
|
1636
|
-
* @example
|
|
1637
|
-
* ```typescript
|
|
1638
|
-
* let video1 = showVideo("video1", "https://pixijs.com/assets/video1.mp4")
|
|
1639
|
-
* Assets.add({ alias: "video2", src: "https://pixijs.com/assets/video2.png" })
|
|
1640
|
-
* let video2 = showVideo("video2")
|
|
1641
|
-
* ```
|
|
1642
|
-
*/
|
|
1643
|
-
declare function showVideo(alias: string, videoUrl?: string, options?: VideoSpriteOptions): Promise<VideoSprite>;
|
|
1644
|
-
|
|
1645
|
-
interface ShakeEffectProps extends BaseTransitionProps, AnimationOptions {
|
|
1646
|
-
/**
|
|
1647
|
-
* The number of shocks. **Must be at least 3**.
|
|
1648
|
-
* @default 10
|
|
1649
|
-
*/
|
|
1650
|
-
shocksNumber?: number;
|
|
1651
|
-
/**
|
|
1652
|
-
* The type of the shake effect
|
|
1653
|
-
* @default "horizontal"
|
|
1654
|
-
*/
|
|
1655
|
-
shakeType?: "horizontal" | "vertical";
|
|
1656
|
-
/**
|
|
1657
|
-
* The maximum size of the shock.
|
|
1658
|
-
* For horizontal type, it is the maximum size of the x axis.
|
|
1659
|
-
* For vertical type, it is the maximum size of the y axis.
|
|
1660
|
-
* @default 10
|
|
1661
|
-
*/
|
|
1662
|
-
maxShockSize?: number;
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
declare const canvas: CanvasManagerInterface;
|
|
1666
|
-
|
|
1667
|
-
type canvasUtils_AnimationOptions = AnimationOptions;
|
|
1668
|
-
type canvasUtils_AnimationSequenceOptions = AnimationSequenceOptions;
|
|
1669
|
-
type canvasUtils_CanvasBaseInterface<T2 extends CanvasBaseItemMemory> = CanvasBaseInterface<T2>;
|
|
1670
|
-
declare const canvasUtils_CanvasBaseItem: typeof CanvasBaseItem;
|
|
1671
|
-
declare const canvasUtils_CanvasBaseItemMemory: typeof CanvasBaseItemMemory;
|
|
1672
|
-
type canvasUtils_CanvasEvent<C> = CanvasEvent<C>;
|
|
1673
|
-
declare const canvasUtils_CanvasEvent: typeof CanvasEvent;
|
|
1674
|
-
type canvasUtils_CanvasEventNamesType = CanvasEventNamesType;
|
|
1675
|
-
declare const canvasUtils_CanvasGameState: typeof CanvasGameState;
|
|
1676
|
-
type canvasUtils_CanvasManagerInterface = CanvasManagerInterface;
|
|
1677
|
-
type canvasUtils_CanvasManagerStatic = CanvasManagerStatic;
|
|
1678
|
-
declare const canvasUtils_CanvasManagerStatic: typeof CanvasManagerStatic;
|
|
1679
|
-
declare const canvasUtils_CommonTickerProps: typeof CommonTickerProps;
|
|
1680
|
-
type canvasUtils_Container<C extends ContainerChild$1 = ContainerChild$1, Memory extends ContainerMemory = ContainerMemory> = Container<C, Memory>;
|
|
1681
|
-
declare const canvasUtils_Container: typeof Container;
|
|
1682
|
-
declare const canvasUtils_ContainerMemory: typeof ContainerMemory;
|
|
1683
|
-
declare const canvasUtils_FadeAlphaTicker: typeof FadeAlphaTicker;
|
|
1684
|
-
declare const canvasUtils_FadeAlphaTickerProps: typeof FadeAlphaTickerProps;
|
|
1685
|
-
type canvasUtils_ImageContainer = ImageContainer;
|
|
1686
|
-
declare const canvasUtils_ImageContainer: typeof ImageContainer;
|
|
1687
|
-
type canvasUtils_ImageContainerMemory = ImageContainerMemory;
|
|
1688
|
-
type canvasUtils_ImageContainerOptions<C extends ContainerChild$1 = ContainerChild$1> = ImageContainerOptions<C>;
|
|
1689
|
-
type canvasUtils_ImageSprite<Memory extends ImageSpriteMemory = ImageSpriteMemory> = ImageSprite<Memory>;
|
|
1690
|
-
declare const canvasUtils_ImageSprite: typeof ImageSprite;
|
|
1691
|
-
type canvasUtils_ImageSpriteMemory = ImageSpriteMemory;
|
|
1692
|
-
type canvasUtils_ImageSpriteOptions = ImageSpriteOptions;
|
|
1693
|
-
type canvasUtils_KeyframesType<T> = KeyframesType<T>;
|
|
1694
|
-
type canvasUtils_Layer = Layer;
|
|
1695
|
-
type canvasUtils_MoveInOutProps = MoveInOutProps;
|
|
1696
|
-
declare const canvasUtils_MoveTicker: typeof MoveTicker;
|
|
1697
|
-
declare const canvasUtils_MoveTickerProps: typeof MoveTickerProps;
|
|
1698
|
-
type canvasUtils_ObjectSegment<O extends CanvasBaseInterface<any>> = ObjectSegment<O>;
|
|
1699
|
-
type canvasUtils_ObjectSegmentWithTransition<O extends CanvasBaseInterface<any>> = ObjectSegmentWithTransition<O>;
|
|
1700
|
-
declare const canvasUtils_PauseType: typeof PauseType;
|
|
1701
|
-
type canvasUtils_PushInOutProps = PushInOutProps;
|
|
1702
|
-
declare const canvasUtils_RegisteredCanvasComponents: typeof RegisteredCanvasComponents;
|
|
1703
|
-
declare const canvasUtils_RegisteredEvents: typeof RegisteredEvents;
|
|
1704
|
-
declare const canvasUtils_RegisteredTickers: typeof RegisteredTickers;
|
|
1705
|
-
declare const canvasUtils_RepeatType: typeof RepeatType;
|
|
1706
|
-
declare const canvasUtils_RotateTicker: typeof RotateTicker;
|
|
1707
|
-
declare const canvasUtils_RotateTickerProps: typeof RotateTickerProps;
|
|
1708
|
-
type canvasUtils_SequenceOptions = SequenceOptions;
|
|
1709
|
-
type canvasUtils_ShakeEffectProps = ShakeEffectProps;
|
|
1710
|
-
type canvasUtils_ShowWithDissolveTransitionProps = ShowWithDissolveTransitionProps;
|
|
1711
|
-
type canvasUtils_ShowWithFadeTransitionProps = ShowWithFadeTransitionProps;
|
|
1712
|
-
type canvasUtils_Sprite<Memory extends SpriteOptions$1 & CanvasBaseItemMemory = SpriteMemory> = Sprite<Memory>;
|
|
1713
|
-
declare const canvasUtils_Sprite: typeof Sprite;
|
|
1714
|
-
type canvasUtils_SpriteBaseMemory = SpriteBaseMemory;
|
|
1715
|
-
type canvasUtils_SpriteMemory = SpriteMemory;
|
|
1716
|
-
type canvasUtils_SpriteOptions = SpriteOptions;
|
|
1717
|
-
type canvasUtils_Text = Text;
|
|
1718
|
-
declare const canvasUtils_Text: typeof Text;
|
|
1719
|
-
type canvasUtils_TextMemory = TextMemory;
|
|
1720
|
-
type canvasUtils_TextOptions = TextOptions;
|
|
1721
|
-
type canvasUtils_TextureMemory = TextureMemory;
|
|
1722
|
-
declare const canvasUtils_Ticker: typeof Ticker;
|
|
1723
|
-
declare const canvasUtils_TickerArgs: typeof TickerArgs;
|
|
1724
|
-
declare const canvasUtils_TickerBase: typeof TickerBase;
|
|
1725
|
-
declare const canvasUtils_TickerHistory: typeof TickerHistory;
|
|
1726
|
-
declare const canvasUtils_TickerInfo: typeof TickerInfo;
|
|
1727
|
-
declare const canvasUtils_TickerProgrationExponential: typeof TickerProgrationExponential;
|
|
1728
|
-
declare const canvasUtils_TickerProgrationLinear: typeof TickerProgrationLinear;
|
|
1729
|
-
declare const canvasUtils_TickerProgrationType: typeof TickerProgrationType;
|
|
1730
|
-
declare const canvasUtils_TickerTimeoutHistory: typeof TickerTimeoutHistory;
|
|
1731
|
-
declare const canvasUtils_TickerValue: typeof TickerValue;
|
|
1732
|
-
declare const canvasUtils_TickersSequence: typeof TickersSequence;
|
|
1733
|
-
type canvasUtils_VideoSprite = VideoSprite;
|
|
1734
|
-
declare const canvasUtils_VideoSprite: typeof VideoSprite;
|
|
1735
|
-
type canvasUtils_VideoSpriteMemory = VideoSpriteMemory;
|
|
1736
|
-
type canvasUtils_VideoSpriteOptions = VideoSpriteOptions;
|
|
1737
|
-
type canvasUtils_ZoomInOutProps = ZoomInOutProps;
|
|
1738
|
-
declare const canvasUtils_ZoomTicker: typeof ZoomTicker;
|
|
1739
|
-
declare const canvasUtils_ZoomTickerProps: typeof ZoomTickerProps;
|
|
1740
|
-
declare const canvasUtils_addImage: typeof addImage;
|
|
1741
|
-
declare const canvasUtils_addImageCointainer: typeof addImageCointainer;
|
|
1742
|
-
declare const canvasUtils_addVideo: typeof addVideo;
|
|
1743
|
-
declare const canvasUtils_animate: typeof animate;
|
|
1744
|
-
declare const canvasUtils_canvas: typeof canvas;
|
|
1745
|
-
declare const canvasUtils_canvasComponentDecorator: typeof canvasComponentDecorator;
|
|
1746
|
-
declare const canvasUtils_eventDecorator: typeof eventDecorator;
|
|
1747
|
-
declare const canvasUtils_getTexture: typeof getTexture;
|
|
1748
|
-
declare const canvasUtils_moveIn: typeof moveIn;
|
|
1749
|
-
declare const canvasUtils_moveOut: typeof moveOut;
|
|
1750
|
-
declare const canvasUtils_pushIn: typeof pushIn;
|
|
1751
|
-
declare const canvasUtils_pushOut: typeof pushOut;
|
|
1752
|
-
declare const canvasUtils_removeWithDissolve: typeof removeWithDissolve;
|
|
1753
|
-
declare const canvasUtils_removeWithFade: typeof removeWithFade;
|
|
1754
|
-
declare const canvasUtils_shakeEffect: typeof shakeEffect;
|
|
1755
|
-
declare const canvasUtils_showImage: typeof showImage;
|
|
1756
|
-
declare const canvasUtils_showImageContainer: typeof showImageContainer;
|
|
1757
|
-
declare const canvasUtils_showVideo: typeof showVideo;
|
|
1758
|
-
declare const canvasUtils_showWithDissolve: typeof showWithDissolve;
|
|
1759
|
-
declare const canvasUtils_showWithFade: typeof showWithFade;
|
|
1760
|
-
declare const canvasUtils_tickerDecorator: typeof tickerDecorator;
|
|
1761
|
-
declare const canvasUtils_zoomIn: typeof zoomIn;
|
|
1762
|
-
declare const canvasUtils_zoomOut: typeof zoomOut;
|
|
1763
|
-
declare namespace canvasUtils {
|
|
1764
|
-
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_Layer as Layer, type canvasUtils_MoveInOutProps as MoveInOutProps, canvasUtils_MoveTicker as MoveTicker, canvasUtils_MoveTickerProps as MoveTickerProps, type canvasUtils_ObjectSegment as ObjectSegment, type canvasUtils_ObjectSegmentWithTransition as ObjectSegmentWithTransition, pixi_js as PIXI, 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 };
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
export { type AnimationOptions 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 Layer as L, type ImageSpriteMemory as M, type SpriteBaseMemory as N, type SpriteMemory as O, type TextMemory as P, type VideoSpriteMemory as Q, RegisteredCanvasComponents as R, Sprite as S, Text as T, type TextureMemory as U, VideoSprite as V, type MoveInOutProps as W, type PushInOutProps as X, type ShowWithDissolveTransitionProps as Y, type ShowWithFadeTransitionProps as Z, type ZoomInOutProps as _, canvas as a, type AnimationSequenceOptions as a0, type KeyframesType as a1, type ObjectSegment as a2, type ObjectSegmentWithTransition as a3, type SequenceOptions as a4, type CanvasEventNamesType as a5, 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 };
|