@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
|
@@ -1,467 +0,0 @@
|
|
|
1
|
-
import { Ticker, UPDATE_PRIORITY } from 'pixi.js';
|
|
2
|
-
import { a as TickerArgs, T as Ticker$1, e as TickerIdType } from '../../TickersSequence-Cf1Vcu22.js';
|
|
3
|
-
export { b as TickerHistory, c as TickerInfo, d as TickersSequence } from '../../TickersSequence-Cf1Vcu22.js';
|
|
4
|
-
import { ObjectTarget, AnimationOptions, AnimationPlaybackControlsWithThen, ObjectSegment, At, SequenceOptions } from 'motion';
|
|
5
|
-
|
|
6
|
-
type TickerValue = Ticker;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* A class is used to create a ticker element to add into a Pixi Application.
|
|
10
|
-
* You can use {@link canvas.addTicker()} to add this element into the application.
|
|
11
|
-
* This class should be extended and the fn method should be overridden.
|
|
12
|
-
* You must use the {@link tickerDecorator} to register the ticker in the game.
|
|
13
|
-
* In Ren'Py is a transform.
|
|
14
|
-
* @template TArgs The type of the arguments that you want to pass to the ticker.
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* \@tickerDecorator() // this is equivalent to tickerDecorator("RotateTicker")
|
|
18
|
-
* export class RotateTicker extends TickerBase<{ speed?: number }> {
|
|
19
|
-
* override fn(
|
|
20
|
-
* t: TickerValue, // the ticker that is calling this method
|
|
21
|
-
* args: { // the arguments that you passed when you added the ticker
|
|
22
|
-
* speed?: number,
|
|
23
|
-
* },
|
|
24
|
-
* aliases: string[], // the aliases of the canvas elements that are connected to this ticker
|
|
25
|
-
* tickerId: string, // the id of the ticker. You can use this to get the ticker from the canvas.currentTickers
|
|
26
|
-
* ): void {
|
|
27
|
-
* let speed = args.speed === undefined ? 0.1 : args.speed
|
|
28
|
-
* aliases.forEach((alias) => {
|
|
29
|
-
* let element = canvas.find(alias)
|
|
30
|
-
* if (element && element instanceof Container) {
|
|
31
|
-
* if (clockwise)
|
|
32
|
-
* element.rotation += speed * t.deltaTime
|
|
33
|
-
* else
|
|
34
|
-
* element.rotation -= speed * t.deltaTime
|
|
35
|
-
* }
|
|
36
|
-
* })
|
|
37
|
-
* }
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
declare abstract class TickerBase<TArgs extends TickerArgs> implements Ticker$1<TArgs> {
|
|
42
|
-
/**
|
|
43
|
-
* @param args The arguments that you want to pass to the ticker.
|
|
44
|
-
* @param duration The duration of the ticker in seconds. If is undefined, the step will end only when the animation is finished (if the animation doesn't have a goal to reach then it won't finish). @default undefined
|
|
45
|
-
* @param priority The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
|
|
46
|
-
*/
|
|
47
|
-
constructor(args: TArgs, duration?: number, priority?: UPDATE_PRIORITY);
|
|
48
|
-
/**
|
|
49
|
-
* Get the id of the ticker. This variable is used in the system to get the ticker by id, {@link RegisteredTickers.getInstance}
|
|
50
|
-
*/
|
|
51
|
-
id: TickerIdType;
|
|
52
|
-
args: TArgs;
|
|
53
|
-
duration?: number;
|
|
54
|
-
priority?: UPDATE_PRIORITY;
|
|
55
|
-
protected ticker: Ticker;
|
|
56
|
-
protected tickerId?: string;
|
|
57
|
-
canvasElementAliases: string[];
|
|
58
|
-
/**
|
|
59
|
-
* The method that will be called every frame.
|
|
60
|
-
* This method should be overridden and you can use {@link canvas.add()} to get the canvas element of the canvas, and edit them.
|
|
61
|
-
* @param _ticker The ticker that is calling this method
|
|
62
|
-
* @param _args The arguments that you passed when you added the ticker
|
|
63
|
-
* @param _alias The alias of the canvas elements that are connected to this ticker
|
|
64
|
-
* @param _tickerId The id of the ticker. You can use this to get the ticker from the {@link canvas.currentTickers}
|
|
65
|
-
*/
|
|
66
|
-
abstract fn(_ticker: TickerValue, _args: TArgs, _alias: string | string[], _tickerId: string): void;
|
|
67
|
-
protected fnValue?: () => void;
|
|
68
|
-
complete(_options?: {
|
|
69
|
-
ignoreTickerSteps?: boolean;
|
|
70
|
-
}): void;
|
|
71
|
-
stop(): void;
|
|
72
|
-
start(id: string): void;
|
|
73
|
-
pause(): void;
|
|
74
|
-
play(): void;
|
|
75
|
-
get paused(): boolean;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
type TickerProgrationType = TickerProgrationLinear | TickerProgrationExponential;
|
|
79
|
-
|
|
80
|
-
interface TickerProgrationLinear {
|
|
81
|
-
/**
|
|
82
|
-
* The amount of the speed to increase every frame.
|
|
83
|
-
*/
|
|
84
|
-
amt: number;
|
|
85
|
-
/**
|
|
86
|
-
* The limit of the effect
|
|
87
|
-
*/
|
|
88
|
-
limit?: number;
|
|
89
|
-
type: "linear";
|
|
90
|
-
}
|
|
91
|
-
interface TickerProgrationExponential {
|
|
92
|
-
/**
|
|
93
|
-
* The percentage of the speed to increase every frame. if the percentage is 0.1, the speed will increase by 10% every frame.
|
|
94
|
-
*/
|
|
95
|
-
percentage: number;
|
|
96
|
-
/**
|
|
97
|
-
* The limit of the effect
|
|
98
|
-
*/
|
|
99
|
-
limit?: number;
|
|
100
|
-
type: "exponential";
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
type CommonTickerProps = {
|
|
104
|
-
/**
|
|
105
|
-
* The alias to remove after the effect is done
|
|
106
|
-
* @default []
|
|
107
|
-
*/
|
|
108
|
-
aliasToRemoveAfter?: string[] | string;
|
|
109
|
-
/**
|
|
110
|
-
* If true, the effect only starts if the canvas element have a texture
|
|
111
|
-
* @default false
|
|
112
|
-
*/
|
|
113
|
-
startOnlyIfHaveTexture?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* The alias to resume after the effect is done
|
|
116
|
-
* @default []
|
|
117
|
-
*/
|
|
118
|
-
tickerAliasToResume?: string[] | string;
|
|
119
|
-
/**
|
|
120
|
-
* The id of the ticker to resume after the effect is done
|
|
121
|
-
* @default []
|
|
122
|
-
*/
|
|
123
|
-
tickerIdToResume?: string[] | string;
|
|
124
|
-
/**
|
|
125
|
-
* If set to `true`, the game will force the animation to complete before moving to the next step.
|
|
126
|
-
* @default false
|
|
127
|
-
*/
|
|
128
|
-
forceCompleteBeforeNext?: boolean;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @deprecated
|
|
133
|
-
*/
|
|
134
|
-
type FadeAlphaTickerProps = {
|
|
135
|
-
/**
|
|
136
|
-
* @deprecated use speed instead
|
|
137
|
-
* @default 1
|
|
138
|
-
*/
|
|
139
|
-
duration?: number;
|
|
140
|
-
/**
|
|
141
|
-
* The speed of the effect (1 alpha per 10 second)
|
|
142
|
-
* @default 5
|
|
143
|
-
*/
|
|
144
|
-
speed?: number;
|
|
145
|
-
/**
|
|
146
|
-
* The type of the fade
|
|
147
|
-
* @default "hide"
|
|
148
|
-
*/
|
|
149
|
-
type?: "hide" | "show";
|
|
150
|
-
/**
|
|
151
|
-
* The limit of the fade
|
|
152
|
-
* @default type === "hide" ? 0 : 1
|
|
153
|
-
*/
|
|
154
|
-
limit?: number;
|
|
155
|
-
/**
|
|
156
|
-
* The progression of the speed
|
|
157
|
-
*/
|
|
158
|
-
speedProgression?: TickerProgrationType;
|
|
159
|
-
} & CommonTickerProps;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* A ticker that fades the alpha of the canvas element of the canvas.
|
|
163
|
-
* This ticker can be used on all canvas elements that extend the {@link PixiContainer} class.
|
|
164
|
-
* @deprecated Use {@link canvas.animate}
|
|
165
|
-
* @example
|
|
166
|
-
* ```typescript
|
|
167
|
-
* let bunny = addImage("bunny1", "https://pixijs.com/assets/eggHead.png")
|
|
168
|
-
* await bunny.load()
|
|
169
|
-
* canvas.add("bunny", bunny);
|
|
170
|
-
* // ...
|
|
171
|
-
* const ticker = new FadeAlphaTicker({
|
|
172
|
-
* duration: 4, // 4 seconds
|
|
173
|
-
* type: "hide",
|
|
174
|
-
* }),
|
|
175
|
-
* canvas.addTicker("bunny", ticker)
|
|
176
|
-
* ```
|
|
177
|
-
*/
|
|
178
|
-
declare class FadeAlphaTicker extends TickerBase<FadeAlphaTickerProps> {
|
|
179
|
-
constructor(args?: FadeAlphaTickerProps, duration?: number, priority?: UPDATE_PRIORITY);
|
|
180
|
-
fn(ticker: TickerValue, args: FadeAlphaTickerProps, aliases: string[], _tickerId: string): void;
|
|
181
|
-
onComplete(alias: string | string[], _tickerId: string, args: FadeAlphaTickerProps): void;
|
|
182
|
-
private getLimit;
|
|
183
|
-
private speedConvert;
|
|
184
|
-
complete(options?: {
|
|
185
|
-
ignoreTickerSteps?: boolean;
|
|
186
|
-
}): void;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @deprecated
|
|
191
|
-
*/
|
|
192
|
-
type MoveTickerProps = {
|
|
193
|
-
/**
|
|
194
|
-
* The speed of the movement (1 pixels per 0.1 second)
|
|
195
|
-
* @default 10
|
|
196
|
-
*/
|
|
197
|
-
speed?: number | {
|
|
198
|
-
x: number;
|
|
199
|
-
y: number;
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* The destination of the movement
|
|
203
|
-
*/
|
|
204
|
-
destination: {
|
|
205
|
-
/**
|
|
206
|
-
* The type of the destination. Possible values are "pixel", "percentage" and "align":
|
|
207
|
-
* - "pixel": The destination is in pixel
|
|
208
|
-
* - "percentage": The destination is in percentage
|
|
209
|
-
* - "align": The destination is in align
|
|
210
|
-
* @default "pixel"
|
|
211
|
-
*/
|
|
212
|
-
type?: "pixel" | "percentage" | "align";
|
|
213
|
-
y: number;
|
|
214
|
-
x: number;
|
|
215
|
-
};
|
|
216
|
-
/**
|
|
217
|
-
* The progression of the speed
|
|
218
|
-
*/
|
|
219
|
-
speedProgression?: TickerProgrationType;
|
|
220
|
-
} & CommonTickerProps;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* A ticker that moves the canvas element of the canvas.
|
|
224
|
-
* This ticker can be used on all canvas elements that extend the {@link PixiContainer} class.
|
|
225
|
-
* @deprecated Use {@link canvas.animate}
|
|
226
|
-
* @example
|
|
227
|
-
* ```typescript
|
|
228
|
-
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
229
|
-
* canvas.add("alien", alien);
|
|
230
|
-
* const ticker = new MoveTicker({
|
|
231
|
-
* speed: 0.1,
|
|
232
|
-
* destination: { x: 100, y: 100 },
|
|
233
|
-
* }),
|
|
234
|
-
* ```
|
|
235
|
-
*/
|
|
236
|
-
declare class MoveTicker extends TickerBase<MoveTickerProps> {
|
|
237
|
-
fn(ticker: TickerValue, args: MoveTickerProps, aliases: string[], _tickerId: string): void;
|
|
238
|
-
onComplete(alias: string | string[], _tickerId: string, args: MoveTickerProps): void;
|
|
239
|
-
private speedConvert;
|
|
240
|
-
complete(options?: {
|
|
241
|
-
ignoreTickerSteps?: boolean;
|
|
242
|
-
}): void;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* A ticker that rotates the canvas element of the canvas. For centre rotation, set the anchor of the canvas element to 0.5.
|
|
247
|
-
* This ticker can be used on all canvas elements that extend the {@link PixiContainer} class.
|
|
248
|
-
* @deprecated Use {@link canvas.animate}
|
|
249
|
-
* @example
|
|
250
|
-
* ```typescript
|
|
251
|
-
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
252
|
-
* alien.anchor.set(0.5);
|
|
253
|
-
* canvas.add("alien", alien);
|
|
254
|
-
* const ticker = new RotateTicker({
|
|
255
|
-
* speed: 0.1,
|
|
256
|
-
* clockwise: true,
|
|
257
|
-
* }),
|
|
258
|
-
* canvas.addTicker("alien", ticker)
|
|
259
|
-
* ```
|
|
260
|
-
*/
|
|
261
|
-
declare class RotateTicker extends TickerBase<RotateTickerProps> {
|
|
262
|
-
constructor(args?: RotateTickerProps, duration?: number, priority?: UPDATE_PRIORITY);
|
|
263
|
-
fn(ticker: TickerValue, args: RotateTickerProps, aliases: string[], _tickerId: string): void;
|
|
264
|
-
onComplete(alias: string | string[], _tickerId: string, args: RotateTickerProps): void;
|
|
265
|
-
private speedConvert;
|
|
266
|
-
complete(options?: {
|
|
267
|
-
ignoreTickerSteps?: boolean;
|
|
268
|
-
}): void;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* A ticker that zooms the canvas element of the canvas.
|
|
273
|
-
* This ticker can be used on all canvas elements that extend the {@link PixiContainer} class.
|
|
274
|
-
* @deprecated Use {@link canvas.animate}
|
|
275
|
-
* @example
|
|
276
|
-
* ```typescript
|
|
277
|
-
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
278
|
-
* alien.anchor.set(0.5);
|
|
279
|
-
* canvas.add("alien", alien);
|
|
280
|
-
* const ticker = new ZoomTicker({
|
|
281
|
-
* speed: 0.1,
|
|
282
|
-
* }),
|
|
283
|
-
* canvas.addTicker("alien", ticker)
|
|
284
|
-
* ```
|
|
285
|
-
*/
|
|
286
|
-
declare class ZoomTicker extends TickerBase<ZoomTickerProps> {
|
|
287
|
-
constructor(args?: ZoomTickerProps, duration?: number, priority?: UPDATE_PRIORITY);
|
|
288
|
-
fn(ticker: TickerValue, args: ZoomTickerProps, alias: string[], _tickerId: string): void;
|
|
289
|
-
private speedConvert;
|
|
290
|
-
onComplete(alias: string | string[], _tickerId: string, args: ZoomTickerProps): void;
|
|
291
|
-
private getLimit;
|
|
292
|
-
complete(options?: {
|
|
293
|
-
ignoreTickerSteps?: boolean;
|
|
294
|
-
}): void;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Is a decorator that register a ticker in the game.
|
|
299
|
-
* Is a required decorator for use the ticker in the game.
|
|
300
|
-
* Thanks to this decoration the game has the possibility of updating the tickers to the latest modification and saving the game.
|
|
301
|
-
* @param name is th identifier of the label, by default is the name of the class
|
|
302
|
-
* @returns
|
|
303
|
-
*/
|
|
304
|
-
declare function tickerDecorator(name?: TickerIdType): (target: {
|
|
305
|
-
new (args: any, duration?: number, priority?: UPDATE_PRIORITY): Ticker$1<any>;
|
|
306
|
-
}) => void;
|
|
307
|
-
declare namespace RegisteredTickers {
|
|
308
|
-
/**
|
|
309
|
-
* Register a ticker in the game.
|
|
310
|
-
* @param target The class of the ticker.
|
|
311
|
-
* @param name Name of the ticker, by default it will use the class name. If the name is already registered, it will show a warning
|
|
312
|
-
*/
|
|
313
|
-
function add(target: {
|
|
314
|
-
new (args: any, duration?: number, priority?: UPDATE_PRIORITY): Ticker$1<any>;
|
|
315
|
-
}, name?: TickerIdType): void;
|
|
316
|
-
/**
|
|
317
|
-
* Get a ticker by the id.
|
|
318
|
-
* @param canvasId The id of the ticker.
|
|
319
|
-
* @returns The ticker type.
|
|
320
|
-
*/
|
|
321
|
-
function get<T = Ticker$1<any>>(tickerId: TickerIdType): T | undefined;
|
|
322
|
-
/**
|
|
323
|
-
* Get a ticker instance by the id.
|
|
324
|
-
* @param tickerId The id of the ticker.
|
|
325
|
-
* @param args The arguments that you want to pass to the ticker.
|
|
326
|
-
* @param duration The duration of the ticker. If is undefined, the ticker will be called every frame.
|
|
327
|
-
* @param priority The priority of the ticker. If is undefined, the priority will be UPDATE_PRIORITY.NORMAL.
|
|
328
|
-
* @returns The instance of the ticker
|
|
329
|
-
*/
|
|
330
|
-
function getInstance<TArgs extends TickerArgs>(tickerId: TickerIdType, args: TArgs, duration?: number, priority?: UPDATE_PRIORITY): Ticker$1<TArgs> | undefined;
|
|
331
|
-
/**
|
|
332
|
-
* Get a list of all tickers registered.
|
|
333
|
-
* @returns An array of tickers.
|
|
334
|
-
*/
|
|
335
|
-
function values(): {
|
|
336
|
-
new (args: any, duration?: number, priority?: UPDATE_PRIORITY): Ticker$1<any>;
|
|
337
|
-
}[];
|
|
338
|
-
/**
|
|
339
|
-
* Check if a ticker is registered.
|
|
340
|
-
* @param id The id of the ticker.
|
|
341
|
-
* @returns True if the ticker is registered, false otherwise.
|
|
342
|
-
*/
|
|
343
|
-
function has(id: string): boolean;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
type ObjectSegmentWithTransition<O extends {} = {}> = [
|
|
347
|
-
O,
|
|
348
|
-
ObjectTarget<O>,
|
|
349
|
-
AnimationOptions & At & {
|
|
350
|
-
ticker?: Ticker;
|
|
351
|
-
}
|
|
352
|
-
];
|
|
353
|
-
/**
|
|
354
|
-
* Animate a PixiJS component or components using [motion's animate](https://motion.dev/docs/animate) function.
|
|
355
|
-
* This function integrates with the PixiJS ticker to ensure smooth animations.
|
|
356
|
-
*
|
|
357
|
-
* Pixi’VN will **not** keep track of the animation state of this function (This feature is intended for animating PixiJS components used for UI.).
|
|
358
|
-
* If you want Pixi'VN to save the animation state in saves, use the {@link canvas.animate} function instead.
|
|
359
|
-
* @param components - The PixiJS component(s) to animate.
|
|
360
|
-
* @param keyframes - The keyframes to animate the component(s) with.
|
|
361
|
-
* @param options - Additional options for the animation, including duration, easing, and ticker.
|
|
362
|
-
* @returns An animation playback control object that can be used to start, stop, or control the animation.
|
|
363
|
-
* @template T - The type of PixiJS component(s) being animated.
|
|
364
|
-
*/
|
|
365
|
-
declare function animate<T extends {}>(components: T | T[], keyframes: ObjectTarget<T>, options?: AnimationOptions & {
|
|
366
|
-
ticker?: Ticker;
|
|
367
|
-
}): AnimationPlaybackControlsWithThen;
|
|
368
|
-
/**
|
|
369
|
-
* Animate a sequence of PixiJS components with transitions using [motion's animate](https://motion.dev/docs/animate) function.
|
|
370
|
-
* This function allows for complex animations involving multiple components and transitions.
|
|
371
|
-
* It integrates with the PixiJS ticker to ensure smooth animations.
|
|
372
|
-
* This function is intended for animating PixiJS components used for UI.
|
|
373
|
-
*
|
|
374
|
-
* Pixi’VN will **not** keep track of the animation state of this function (This feature is intended for animating PixiJS components used for UI.).
|
|
375
|
-
* If you want Pixi'VN to save the animation state in saves, use the {@link canvas.animate} function instead
|
|
376
|
-
*
|
|
377
|
-
* @param sequence An array of segments to animate, where each segment is an array containing:
|
|
378
|
-
* - The PixiJS component to animate.
|
|
379
|
-
* - The keyframes to animate the component with.
|
|
380
|
-
* - An options object that can include animation options and a ticker.
|
|
381
|
-
* @param options Additional options for the sequence, such as duration and repeat count.
|
|
382
|
-
* @returns An animation playback control object that can be used to start, stop, or control the animation.
|
|
383
|
-
* @template T - The type of PixiJS component(s) being animated.
|
|
384
|
-
*/
|
|
385
|
-
declare function animate<T extends {}>(sequence: (ObjectSegment<T> | ObjectSegmentWithTransition<T>)[], options?: SequenceOptions): AnimationPlaybackControlsWithThen;
|
|
386
|
-
|
|
387
|
-
interface TickerTimeoutHistory {
|
|
388
|
-
aliases: string[];
|
|
389
|
-
ticker: string;
|
|
390
|
-
canBeDeletedBeforeEnd: boolean;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* @deprecated
|
|
395
|
-
*/
|
|
396
|
-
type RotateTickerProps = {
|
|
397
|
-
/**
|
|
398
|
-
* The speed of the rotation (360 degree per 10 second)
|
|
399
|
-
* @default 1
|
|
400
|
-
*/
|
|
401
|
-
speed?: number;
|
|
402
|
-
/**
|
|
403
|
-
* The direction of the rotation
|
|
404
|
-
* @default true
|
|
405
|
-
*/
|
|
406
|
-
clockwise?: boolean;
|
|
407
|
-
/**
|
|
408
|
-
* The limit of the rotation, is specified in degree
|
|
409
|
-
* @default undefined
|
|
410
|
-
*/
|
|
411
|
-
limit?: number;
|
|
412
|
-
/**
|
|
413
|
-
* The progression of the speed
|
|
414
|
-
*/
|
|
415
|
-
speedProgression?: TickerProgrationType;
|
|
416
|
-
} & CommonTickerProps;
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* @deprecated
|
|
420
|
-
*/
|
|
421
|
-
type ZoomTickerProps = {
|
|
422
|
-
/**
|
|
423
|
-
* The speed of the zoom effect (100% zoom per 10 second)
|
|
424
|
-
* @default 10
|
|
425
|
-
*/
|
|
426
|
-
speed?: number | {
|
|
427
|
-
x: number;
|
|
428
|
-
y: number;
|
|
429
|
-
};
|
|
430
|
-
/**
|
|
431
|
-
* The type of the zoom effect
|
|
432
|
-
* @default "zoom"
|
|
433
|
-
*/
|
|
434
|
-
type?: "zoom" | "unzoom";
|
|
435
|
-
/**
|
|
436
|
-
* The limit of the effect
|
|
437
|
-
* @default type === "zoom" ? Infinity : 0
|
|
438
|
-
*/
|
|
439
|
-
limit?: number | {
|
|
440
|
-
x: number;
|
|
441
|
-
y: number;
|
|
442
|
-
};
|
|
443
|
-
/**
|
|
444
|
-
* The progression of the speed.
|
|
445
|
-
* There are two types of progression: linear and exponential.
|
|
446
|
-
* - Linear: The speed will increase by the amount of `amt` every frame.
|
|
447
|
-
* - Exponential: The speed will increase by the percentage of the current speed every frame.
|
|
448
|
-
* @default undefined
|
|
449
|
-
*/
|
|
450
|
-
speedProgression?: TickerProgrationType;
|
|
451
|
-
/**
|
|
452
|
-
* Is a special prop used in the zoom in/out transition.
|
|
453
|
-
* @default false
|
|
454
|
-
*/
|
|
455
|
-
isZoomInOut?: {
|
|
456
|
-
pivot: {
|
|
457
|
-
x: number;
|
|
458
|
-
y: number;
|
|
459
|
-
};
|
|
460
|
-
position: {
|
|
461
|
-
x: number;
|
|
462
|
-
y: number;
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
} & CommonTickerProps;
|
|
466
|
-
|
|
467
|
-
export { type CommonTickerProps, FadeAlphaTicker, type FadeAlphaTickerProps, MoveTicker, type MoveTickerProps, RegisteredTickers, RotateTicker, type RotateTickerProps, Ticker$1 as Ticker, TickerArgs, TickerBase, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, type TickerValue, ZoomTicker, type ZoomTickerProps, animate, tickerDecorator };
|