@drincs/pixi-vn 1.8.24 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/{ContainerMemory-D2HtgX7w.d.cts → ContainerMemory-BpDgacyr.d.cts} +2 -15
- package/dist/{ContainerMemory-D2HtgX7w.d.ts → ContainerMemory-BpDgacyr.d.ts} +2 -15
- package/dist/{HistoryChoiceMenuOption-BMsYentw.d.cts → HistoryChoiceMenuOption-BxMSXnyI.d.cts} +10 -1
- package/dist/{HistoryChoiceMenuOption-DQ-pnuPU.d.ts → HistoryChoiceMenuOption-hSI4SHV-.d.ts} +10 -1
- package/dist/{HistoryGameState-CmjUtlkV.d.ts → HistoryGameState-C8ATx9K6.d.ts} +1 -1
- package/dist/{HistoryGameState-C28NcKKl.d.cts → HistoryGameState-CGfvq5iL.d.cts} +1 -1
- package/dist/{HistoryStep-G9dUn0Lf.d.cts → HistoryStep-WGB6nA4N.d.cts} +5 -0
- package/dist/{HistoryStep-G9dUn0Lf.d.ts → HistoryStep-WGB6nA4N.d.ts} +5 -0
- package/dist/{OpenedLabel-DLfFuZgk.d.ts → OpenedLabel-CmRdzTXP.d.ts} +1 -1
- package/dist/{OpenedLabel-BxfL31aQ.d.cts → OpenedLabel-Cmd675NI.d.cts} +1 -1
- package/dist/SoundGameState-C_6ZsQX6.d.cts +186 -0
- package/dist/SoundGameState-C_6ZsQX6.d.ts +186 -0
- package/dist/{StorageGameState-CtjNJpvE.d.cts → StorageGameState-C3PGrFPr.d.cts} +2 -2
- package/dist/{StorageGameState-BJy57o6K.d.ts → StorageGameState-jAexrJLj.d.ts} +2 -2
- package/dist/canvas.cjs +2 -2
- package/dist/canvas.d.cts +265 -24
- package/dist/canvas.d.ts +265 -24
- package/dist/canvas.mjs +2 -2
- package/dist/characters.cjs +1 -1
- package/dist/characters.mjs +1 -1
- package/dist/chunk-HD353M4B.mjs +1 -0
- package/dist/chunk-I7DOUH5V.mjs +1 -0
- package/dist/history.cjs +1 -1
- package/dist/history.d.cts +51 -15
- package/dist/history.d.ts +51 -15
- package/dist/history.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +53 -34
- package/dist/index.d.ts +53 -34
- package/dist/index.mjs +2 -2
- package/dist/motion.cjs +1 -1
- package/dist/motion.mjs +1 -1
- package/dist/narration.cjs +2 -2
- package/dist/narration.d.cts +211 -52
- package/dist/narration.d.ts +211 -52
- package/dist/narration.mjs +2 -2
- package/dist/pixi/browser.js +115 -115
- package/dist/sound.cjs +1 -1
- package/dist/sound.d.cts +313 -6
- package/dist/sound.d.ts +313 -6
- package/dist/sound.mjs +1 -1
- package/dist/storage.cjs +1 -1
- package/dist/storage.d.cts +50 -3
- package/dist/storage.d.ts +50 -3
- package/dist/storage.mjs +1 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.mjs +2 -2
- package/package.json +2 -1
- package/dist/SoundManagerInterface-Dd0b88_N.d.cts +0 -436
- package/dist/SoundManagerInterface-Dd0b88_N.d.ts +0 -436
- package/dist/chunk-GIYMPXBT.mjs +0 -1
- package/dist/chunk-IWAXXFXE.mjs +0 -1
package/dist/canvas.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ import _drincs_pixi_vn_pixi_js__default, { Container as Container$1, ContainerCh
|
|
|
3
3
|
export { TextureSourceLike, Ticker as TickerValue } from '@drincs/pixi-vn/pixi.js';
|
|
4
4
|
import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion';
|
|
5
5
|
import { Devtools } from '@pixi/devtools';
|
|
6
|
-
import { T as TickerArgs, a as Ticker$1, C as CanvasBaseItemMemory, b as CanvasBaseItem, c as TickerInfo, d as TickersSequence,
|
|
7
|
-
export { k as addListenerHandler, l as analizePositionsExtensionProps } from './ContainerMemory-
|
|
6
|
+
import { T as TickerArgs, a as Ticker$1, C as CanvasBaseItemMemory, b as CanvasBaseItem, c as TickerInfo, d as TickersSequence, e as CanvasGameState, f as ContainerChild$1, A as AdditionalPositionsExtensionProps, L as ListenerExtensionMemory, g as ListenerExtension, h as AdditionalPositionsExtension, O as OnEventsHandlers, i as ContainerMemory, j as TickerHistory } from './ContainerMemory-BpDgacyr.cjs';
|
|
7
|
+
export { k as addListenerHandler, l as analizePositionsExtensionProps } from './ContainerMemory-BpDgacyr.cjs';
|
|
8
8
|
export { AnimationOptions as MotionAnimationOptions } from 'motion';
|
|
9
9
|
import { OnErrorHandler } from '@drincs/pixi-vn/core';
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ type TickerValue = Ticker;
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* A class is used to create a ticker element to add into a Pixi Application.
|
|
17
|
-
* You can use {@link canvas.
|
|
17
|
+
* You can use {@link canvas.tickers.add()} to add this element into the application.
|
|
18
18
|
* This class should be extended and the fn method should be overridden.
|
|
19
19
|
* You must use the {@link tickerDecorator} to register the ticker in the game.
|
|
20
20
|
* In Ren'Py is a transform.
|
|
@@ -29,7 +29,7 @@ type TickerValue = Ticker;
|
|
|
29
29
|
* speed?: number,
|
|
30
30
|
* },
|
|
31
31
|
* aliases: string[], // the aliases of the canvas elements that are connected to this ticker
|
|
32
|
-
* tickerId: string, // the id of the ticker. You can use this to get the ticker from the canvas.currentTickers
|
|
32
|
+
* tickerId: string, // the id of the ticker. You can use this to get the ticker from the canvas.tickers.currentTickers
|
|
33
33
|
* ): void {
|
|
34
34
|
* let speed = args.speed === undefined ? 0.1 : args.speed
|
|
35
35
|
* aliases.forEach((alias) => {
|
|
@@ -82,7 +82,7 @@ declare abstract class TickerBase<TArgs extends TickerArgs> implements Ticker$1<
|
|
|
82
82
|
* @param _ticker The ticker that is calling this method
|
|
83
83
|
* @param _args The arguments that you passed when you added the ticker
|
|
84
84
|
* @param _alias The alias of the canvas elements that are connected to this ticker
|
|
85
|
-
* @param _tickerId The id of the ticker. You can use this to get the ticker from the {@link canvas.currentTickers}
|
|
85
|
+
* @param _tickerId The id of the ticker. You can use this to get the ticker from the {@link canvas.tickers.currentTickers}
|
|
86
86
|
*/
|
|
87
87
|
abstract fn(_ticker: TickerValue, _args: TArgs, _alias: string | string[], _tickerId: string): void;
|
|
88
88
|
protected fnValue?: () => void;
|
|
@@ -222,10 +222,6 @@ type CommonTickerProps = {
|
|
|
222
222
|
* @default []
|
|
223
223
|
*/
|
|
224
224
|
tickerIdToResume?: string[] | string;
|
|
225
|
-
/**
|
|
226
|
-
* @deprecated Use {@link completeOnContinue} instead.
|
|
227
|
-
*/
|
|
228
|
-
forceCompleteBeforeNext?: boolean;
|
|
229
225
|
/**
|
|
230
226
|
* A boolean indicating whether the animation must complete before the next `step` of the game. If `true`, the game will force the animation to finish before proceeding.
|
|
231
227
|
* When true, calling {@link narration.continue()} forces the current content to complete before advancing to the next narrative step.
|
|
@@ -237,6 +233,228 @@ type CommonTickerProps = {
|
|
|
237
233
|
interface CanvasBaseInterface<T2 extends CanvasBaseItemMemory> extends CanvasBaseItem<T2>, Container$1 {
|
|
238
234
|
}
|
|
239
235
|
|
|
236
|
+
interface CanvasHtmlLayersInterface {
|
|
237
|
+
/**
|
|
238
|
+
* Add a HTML layer to the canvas.
|
|
239
|
+
* @param id The id of the layer.
|
|
240
|
+
* @param element The html element to be added.
|
|
241
|
+
* @param style The style of the layer. @default { position: "absolute", pointerEvents: "none", userSelect: "none" }.
|
|
242
|
+
* @example
|
|
243
|
+
* ```tsx
|
|
244
|
+
* const root = document.getElementById('root')
|
|
245
|
+
* if (!root) {
|
|
246
|
+
* throw new Error('root element not found')
|
|
247
|
+
* }
|
|
248
|
+
* const htmlLayer = canvas.htmlLayers.add("ui", root, {
|
|
249
|
+
* position: "absolute",
|
|
250
|
+
* pointerEvents: "none"
|
|
251
|
+
* })
|
|
252
|
+
* const reactRoot = createRoot(htmlLayer)
|
|
253
|
+
* reactRoot.render(
|
|
254
|
+
* <App />
|
|
255
|
+
* )
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
add(id: string, element: HTMLElement, style?: Partial<Pick<CSSStyleDeclaration, "position" | "pointerEvents" | "userSelect">>): HTMLDivElement;
|
|
259
|
+
/**
|
|
260
|
+
* Get a HTML layer from the canvas.
|
|
261
|
+
* @param id The id of the layer.
|
|
262
|
+
*/
|
|
263
|
+
get(id: string): HTMLElement | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* Remove a HTML layer from the canvas.
|
|
266
|
+
* @param id The id of the layer to be removed.
|
|
267
|
+
*/
|
|
268
|
+
remove(id: string): void;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
interface CanvasLayersInterface {
|
|
272
|
+
/**
|
|
273
|
+
* The PIXI Container that contains all the canvas elements.
|
|
274
|
+
*/
|
|
275
|
+
readonly gameLayer: Container$1;
|
|
276
|
+
/**
|
|
277
|
+
* Add a layer to the canvas.
|
|
278
|
+
* @param label The label of the layer.
|
|
279
|
+
* @param layer The layer to be added.
|
|
280
|
+
* @returns The layer.
|
|
281
|
+
* @example
|
|
282
|
+
* ```ts
|
|
283
|
+
* const uiLayer = new Container();
|
|
284
|
+
* canvas.layers.add("ui", uiLayer);
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
add(label: string, layer: Container$1): Layer | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* Get a layer from the canvas.
|
|
290
|
+
* @param label The label of the layer.
|
|
291
|
+
* @returns The layer.
|
|
292
|
+
* @example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const uiLayer = canvas.layers.get("ui");
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
get(label: string): Layer | null;
|
|
298
|
+
/**
|
|
299
|
+
* Remove a layer from the canvas.
|
|
300
|
+
* @param label The label of the layer to be removed.
|
|
301
|
+
* @example
|
|
302
|
+
* ```ts
|
|
303
|
+
* canvas.layers.remove("ui");
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
remove(label: string): void;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface CanvasTickersInterface {
|
|
310
|
+
/**
|
|
311
|
+
* Transfer the tickers from an old alias to a new alias.
|
|
312
|
+
* @param oldAlias Old alias
|
|
313
|
+
* @param newAlias New alias
|
|
314
|
+
* @param mode If "move", the old alias will be removed from the ticker. If "duplicate", the old alias will be kept in the ticker.
|
|
315
|
+
*/
|
|
316
|
+
transfer(oldAlias: string, newAlias: string, mode?: "move" | "duplicate"): void;
|
|
317
|
+
/**
|
|
318
|
+
* Currently tickers that are running.
|
|
319
|
+
*/
|
|
320
|
+
readonly currentTickers: Map<string, TickerInfo<any>>;
|
|
321
|
+
/**
|
|
322
|
+
* The steps of the tickers
|
|
323
|
+
*/
|
|
324
|
+
readonly currentTickersSteps: Map<string, Map<string, TickersSequence>>;
|
|
325
|
+
/**
|
|
326
|
+
* Find a ticker by its id.
|
|
327
|
+
* @param tickerId The id of the ticker to be found.
|
|
328
|
+
* @param args The args of the ticker.
|
|
329
|
+
* @returns The ticker if found, undefined otherwise.
|
|
330
|
+
*/
|
|
331
|
+
find<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker$1<TArgs> | undefined;
|
|
332
|
+
/**
|
|
333
|
+
* Run a ticker. You can run multiple add with the same alias and different tickerClasses.
|
|
334
|
+
* If you run a ticker with the same alias and tickerClass, the old ticker will be removed.
|
|
335
|
+
* If already exists a sequence of tickers with the same alias, it will be removed.
|
|
336
|
+
* @param canvasElementAlias The alias of the canvas element that will use the ticker.
|
|
337
|
+
* @param ticker The ticker class to be run.
|
|
338
|
+
* @returns The id of the ticker that was added.
|
|
339
|
+
* @example
|
|
340
|
+
* ```ts
|
|
341
|
+
* canvas.tickers.add("alien", new RotateTicker({ speed: 0.2 }))
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
add<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker$1<TArgs>): string | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* Run a sequence of tickers.
|
|
347
|
+
* @param alias The alias of canvas element that will use the tickers.
|
|
348
|
+
* @param steps The steps of the tickers.
|
|
349
|
+
* @param currentStepNumber The current step number. It is used to continue the sequence of tickers.
|
|
350
|
+
* @returns The id of tickers.
|
|
351
|
+
* @example
|
|
352
|
+
* ```ts
|
|
353
|
+
* canvas.tickers.addSequence("alien", [
|
|
354
|
+
* new RotateTicker({ speed: 0.1, clockwise: true }, 2), // runs for 2 seconds
|
|
355
|
+
* new RotateTicker({ speed: 0.2, clockwise: false }, 2),
|
|
356
|
+
* ])
|
|
357
|
+
* ```
|
|
358
|
+
* @deprecated
|
|
359
|
+
*/
|
|
360
|
+
addSequence(alias: string, steps: Ticker$1<any>[], currentStepNumber?: number): string | undefined;
|
|
361
|
+
/**
|
|
362
|
+
* Remove a connection between a canvas element and a ticker.
|
|
363
|
+
* And remove the ticker if there is no canvas element connected to it.
|
|
364
|
+
* @param alias The alias of the canvas element that will use the ticker.
|
|
365
|
+
* @param ticker The ticker class to be removed.
|
|
366
|
+
* @example
|
|
367
|
+
* ```ts
|
|
368
|
+
* canvas.tickers.unlinkComponent("alien", RotateTicker)
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
unlinkComponent(alias: string | string[], ticker?: {
|
|
372
|
+
new (): Ticker$1<any>;
|
|
373
|
+
} | string): void;
|
|
374
|
+
/**
|
|
375
|
+
* Remove all tickers from the canvas.
|
|
376
|
+
*/
|
|
377
|
+
removeAll(): void;
|
|
378
|
+
/**
|
|
379
|
+
* Remove a ticker by the id.
|
|
380
|
+
* @param tickerId The id or an array of ids of the ticker to be removed.
|
|
381
|
+
*/
|
|
382
|
+
remove(tickerId: string | string[]): void;
|
|
383
|
+
/**
|
|
384
|
+
* Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.
|
|
385
|
+
* @param filters The filters to pause the ticker.
|
|
386
|
+
* @returns The ids of the paused tickers.
|
|
387
|
+
*/
|
|
388
|
+
pause(filters: {
|
|
389
|
+
/**
|
|
390
|
+
* The alias of the canvas element that will use the ticker.
|
|
391
|
+
* Will pause all tickers that are connected to this canvas element.
|
|
392
|
+
*/
|
|
393
|
+
canvasAlias: string;
|
|
394
|
+
/**
|
|
395
|
+
* Ticker ids excluded from the pause. If not provided, all tickers will be paused.
|
|
396
|
+
*/
|
|
397
|
+
tickerIdsExcluded?: string[];
|
|
398
|
+
} | {
|
|
399
|
+
/**
|
|
400
|
+
* The id of the ticker to be paused. If provided, only this ticker will be paused.
|
|
401
|
+
*/
|
|
402
|
+
id: string | string[];
|
|
403
|
+
}): string[];
|
|
404
|
+
/**
|
|
405
|
+
* Resume a ticker.
|
|
406
|
+
* @param filters The filters to resume the ticker.
|
|
407
|
+
*/
|
|
408
|
+
resume(filters: {
|
|
409
|
+
/**
|
|
410
|
+
* The alias of the canvas element that will use the ticker.
|
|
411
|
+
* Will resume all tickers that are connected to this canvas element.
|
|
412
|
+
*/
|
|
413
|
+
canvasAlias: string;
|
|
414
|
+
} | {
|
|
415
|
+
/**
|
|
416
|
+
* The id of the ticker to be resumed. If provided, only this ticker will be resumed.
|
|
417
|
+
*/
|
|
418
|
+
id: string | string[];
|
|
419
|
+
}): void;
|
|
420
|
+
/**
|
|
421
|
+
* Check if a ticker is paused.
|
|
422
|
+
* @param alias The alias of the canvas element that will use the ticker.
|
|
423
|
+
* @param tickerId The ticker that will be checked.
|
|
424
|
+
* @returns If the ticker is paused.
|
|
425
|
+
*/
|
|
426
|
+
isPaused(alias: string, tickerId?: string): boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Add a ticker that must be completed before the next step.
|
|
429
|
+
* This method is used for example into a transition between scenes.
|
|
430
|
+
* @param step The step that the ticker must be completed before the next step.
|
|
431
|
+
*/
|
|
432
|
+
completeOnStepEnd(step: {
|
|
433
|
+
/**
|
|
434
|
+
* The id of the step.
|
|
435
|
+
*/
|
|
436
|
+
id: string;
|
|
437
|
+
/**
|
|
438
|
+
* If is a sequence of tickers, the alias of the sequence of tickers.
|
|
439
|
+
*/
|
|
440
|
+
alias?: string;
|
|
441
|
+
}): void;
|
|
442
|
+
/**
|
|
443
|
+
* This method force the completion of the tickers that are running.
|
|
444
|
+
* This funcions is called in the next step.
|
|
445
|
+
* @param id The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.
|
|
446
|
+
* @param alias The alias of the sequence of tickers.
|
|
447
|
+
*/
|
|
448
|
+
forceCompletion(id: string, alias?: string): Promise<void>;
|
|
449
|
+
onComplete(tickerId: string, options: {
|
|
450
|
+
aliasToRemoveAfter: string[];
|
|
451
|
+
tickerAliasToResume: string[];
|
|
452
|
+
tickerIdToResume: string[];
|
|
453
|
+
ignoreTickerSteps?: boolean;
|
|
454
|
+
stopTicker?: boolean;
|
|
455
|
+
}): void;
|
|
456
|
+
}
|
|
457
|
+
|
|
240
458
|
interface CanvasManagerInterface {
|
|
241
459
|
/**
|
|
242
460
|
* The PIXI Application instance.
|
|
@@ -245,7 +463,7 @@ interface CanvasManagerInterface {
|
|
|
245
463
|
readonly app: Application;
|
|
246
464
|
/**
|
|
247
465
|
* The PIXI Container that contains all the canvas elements.
|
|
248
|
-
*
|
|
466
|
+
* @deprecated Use {@link layers}.gameLayer instead.
|
|
249
467
|
*/
|
|
250
468
|
readonly gameLayer: Container$1;
|
|
251
469
|
/**
|
|
@@ -321,6 +539,7 @@ interface CanvasManagerInterface {
|
|
|
321
539
|
* @param oldAlias Old alias
|
|
322
540
|
* @param newAlias New alias
|
|
323
541
|
* @param mode If "move", the old alias will be removed from the ticker. If "duplicate", the old alias will be kept in the ticker.
|
|
542
|
+
* @deprecated Use {@link tickers}.transfer instead.
|
|
324
543
|
*/
|
|
325
544
|
transferTickers(oldAlias: string, newAlias: string, mode?: "move" | "duplicate"): void;
|
|
326
545
|
/**
|
|
@@ -403,10 +622,12 @@ interface CanvasManagerInterface {
|
|
|
403
622
|
/** Edit Tickers Methods */
|
|
404
623
|
/**
|
|
405
624
|
* Currently tickers that are running.
|
|
625
|
+
* @deprecated Use {@link tickers}.currentTickers instead.
|
|
406
626
|
*/
|
|
407
627
|
readonly currentTickers: Map<string, TickerInfo<any>>;
|
|
408
628
|
/**
|
|
409
629
|
* The steps of the tickers
|
|
630
|
+
* @deprecated Use {@link tickers}.currentTickersSteps instead.
|
|
410
631
|
*/
|
|
411
632
|
readonly currentTickersSteps: Map<string, Map<string, TickersSequence>>;
|
|
412
633
|
/**
|
|
@@ -414,6 +635,7 @@ interface CanvasManagerInterface {
|
|
|
414
635
|
* @param tickerId The id of the ticker to be found.
|
|
415
636
|
* @param args The args of the ticker.
|
|
416
637
|
* @returns The ticker if found, undefined otherwise.
|
|
638
|
+
* @deprecated Use {@link tickers}.find instead.
|
|
417
639
|
*/
|
|
418
640
|
findTicker<TArgs extends TickerArgs>(tickerId: string, args?: TArgs): Ticker$1<TArgs> | undefined;
|
|
419
641
|
/**
|
|
@@ -427,6 +649,7 @@ interface CanvasManagerInterface {
|
|
|
427
649
|
* ```ts
|
|
428
650
|
* canvas.addTicker("alien", new RotateTicker({ speed: 0.2 }))
|
|
429
651
|
* ```
|
|
652
|
+
* @deprecated Use {@link tickers}.add instead.
|
|
430
653
|
*/
|
|
431
654
|
addTicker<TArgs extends TickerArgs>(canvasElementAlias: string | string[], ticker: Ticker$1<TArgs>): string | undefined;
|
|
432
655
|
/**
|
|
@@ -439,13 +662,12 @@ interface CanvasManagerInterface {
|
|
|
439
662
|
* ```ts
|
|
440
663
|
* canvas.addTickersSequence("alien", [
|
|
441
664
|
* new RotateTicker({ speed: 0.1, clockwise: true }, 2), // 2 seconds
|
|
442
|
-
* Pause(1), // 1 second
|
|
443
665
|
* new RotateTicker({ speed: 0.2, clockwise: false }, 2),
|
|
444
|
-
* Repeat,
|
|
445
666
|
* ])
|
|
446
667
|
* ```
|
|
668
|
+
* @deprecated Use {@link tickers}.addSequence instead.
|
|
447
669
|
*/
|
|
448
|
-
addTickersSequence(alias: string, steps:
|
|
670
|
+
addTickersSequence(alias: string, steps: Ticker$1<any>[], currentStepNumber?: number): string | undefined;
|
|
449
671
|
/**
|
|
450
672
|
* Remove a connection between a canvas element and a ticker.
|
|
451
673
|
* And remove the ticker if there is no canvas element connected to it.
|
|
@@ -455,24 +677,27 @@ interface CanvasManagerInterface {
|
|
|
455
677
|
* ```ts
|
|
456
678
|
* canvas.unlinkComponentFromTicker("alien", RotateTicker)
|
|
457
679
|
* ```
|
|
458
|
-
* @deprecated
|
|
680
|
+
* @deprecated Use {@link tickers}.unlinkComponent instead.
|
|
459
681
|
*/
|
|
460
682
|
unlinkComponentFromTicker(alias: string | string[], ticker?: {
|
|
461
683
|
new (): Ticker$1<any>;
|
|
462
684
|
} | string): void;
|
|
463
685
|
/**
|
|
464
686
|
* Remove all tickers from the canvas.
|
|
687
|
+
* @deprecated Use {@link tickers}.removeAll instead.
|
|
465
688
|
*/
|
|
466
689
|
removeAllTickers(): void;
|
|
467
690
|
/**
|
|
468
691
|
* Remove a ticker by the id.
|
|
469
692
|
* @param tickerId The id or an array of ids of the ticker to be removed.
|
|
693
|
+
* @deprecated Use {@link tickers}.remove instead.
|
|
470
694
|
*/
|
|
471
695
|
removeTicker(tickerId: string | string[]): void;
|
|
472
696
|
/**
|
|
473
697
|
* Pause a ticker. If a paused ticker have a time to be removed, it will be removed after the time.
|
|
474
698
|
* @param filters The filters to pause the ticker.
|
|
475
699
|
* @returns The ids of the paused tickers.
|
|
700
|
+
* @deprecated Use {@link tickers}.pause instead.
|
|
476
701
|
*/
|
|
477
702
|
pauseTicker(filters: {
|
|
478
703
|
/**
|
|
@@ -493,6 +718,7 @@ interface CanvasManagerInterface {
|
|
|
493
718
|
/**
|
|
494
719
|
* Resume a ticker.
|
|
495
720
|
* @param filters The filters to resume the ticker.
|
|
721
|
+
* @deprecated Use {@link tickers}.resume instead.
|
|
496
722
|
*/
|
|
497
723
|
resumeTicker(filters: {
|
|
498
724
|
/**
|
|
@@ -507,13 +733,17 @@ interface CanvasManagerInterface {
|
|
|
507
733
|
id: string | string[];
|
|
508
734
|
}): void;
|
|
509
735
|
/**
|
|
510
|
-
* @deprecated Use {@link
|
|
736
|
+
* @deprecated Use {@link tickers}.isPaused instead.
|
|
511
737
|
* Check if a ticker is paused.
|
|
512
738
|
* @param alias The alias of the canvas element that will use the ticker.
|
|
513
739
|
* @param tickerId The ticker that will be checked.
|
|
514
740
|
* @returns If the ticker is paused.
|
|
515
741
|
*/
|
|
516
742
|
isTickerPaused(alias: string, tickerId?: string): boolean;
|
|
743
|
+
/**
|
|
744
|
+
* Namespace for operations on canvas tickers.
|
|
745
|
+
*/
|
|
746
|
+
readonly tickers: CanvasTickersInterface;
|
|
517
747
|
/**
|
|
518
748
|
* Pause the rendering of gameLayer and pause currently running tickers.
|
|
519
749
|
* Use {@link resume} to restore rendering and resume only
|
|
@@ -529,6 +759,7 @@ interface CanvasManagerInterface {
|
|
|
529
759
|
* Add a ticker that must be completed before the next step.
|
|
530
760
|
* This method is used for example into a transition between scenes.
|
|
531
761
|
* @param step The step that the ticker must be completed before the next step.
|
|
762
|
+
* @deprecated Use {@link tickers}.completeOnStepEnd instead.
|
|
532
763
|
*/
|
|
533
764
|
completeTickerOnStepEnd(step: {
|
|
534
765
|
/**
|
|
@@ -545,6 +776,7 @@ interface CanvasManagerInterface {
|
|
|
545
776
|
* This funcions is called in the next step.
|
|
546
777
|
* @param id The id of the ticker. If the alias provided, the id is the id of the sequence of tickers.
|
|
547
778
|
* @param alias The alias of the sequence of tickers.
|
|
779
|
+
* @deprecated Use {@link tickers}.forceCompletion instead.
|
|
548
780
|
*/
|
|
549
781
|
forceCompletionOfTicker(id: string, alias?: string): Promise<void>;
|
|
550
782
|
/**
|
|
@@ -585,6 +817,7 @@ interface CanvasManagerInterface {
|
|
|
585
817
|
* const uiLayer = new Container();
|
|
586
818
|
* canvas.addLayer("ui", uiLayer);
|
|
587
819
|
* ```
|
|
820
|
+
* @deprecated Use {@link layers}.add instead.
|
|
588
821
|
*/
|
|
589
822
|
addLayer(label: string, layer: Container$1): Layer | undefined;
|
|
590
823
|
/**
|
|
@@ -595,6 +828,7 @@ interface CanvasManagerInterface {
|
|
|
595
828
|
* ```ts
|
|
596
829
|
* const uiLayer = canvas.getLayer("ui");
|
|
597
830
|
* ```
|
|
831
|
+
* @deprecated Use {@link layers}.get instead.
|
|
598
832
|
*/
|
|
599
833
|
getLayer(label: string): Layer | null;
|
|
600
834
|
/**
|
|
@@ -604,6 +838,7 @@ interface CanvasManagerInterface {
|
|
|
604
838
|
* ```ts
|
|
605
839
|
* canvas.removeLayer("ui");
|
|
606
840
|
* ```
|
|
841
|
+
* @deprecated Use {@link layers}.remove instead.
|
|
607
842
|
*/
|
|
608
843
|
removeLayer(label: string): void;
|
|
609
844
|
/**
|
|
@@ -626,18 +861,29 @@ interface CanvasManagerInterface {
|
|
|
626
861
|
* <App />
|
|
627
862
|
* )
|
|
628
863
|
* ```
|
|
864
|
+
* @deprecated Use {@link htmlLayers}.add instead.
|
|
629
865
|
*/
|
|
630
866
|
addHtmlLayer(id: string, element: HTMLElement, style?: Partial<Pick<CSSStyleDeclaration, "position" | "pointerEvents" | "userSelect">>): HTMLDivElement;
|
|
631
867
|
/**
|
|
632
868
|
* Get a HTML layer from the canvas.
|
|
633
869
|
* @param id The id of the layer to be removed.
|
|
870
|
+
* @deprecated Use {@link htmlLayers}.remove instead.
|
|
634
871
|
*/
|
|
635
872
|
removeHtmlLayer(id: string): void;
|
|
636
873
|
/**
|
|
637
874
|
* Get a HTML layer from the canvas.
|
|
638
875
|
* @param id The id of the layer.
|
|
876
|
+
* @deprecated Use {@link htmlLayers}.get instead.
|
|
639
877
|
*/
|
|
640
878
|
getHtmlLayer(id: string): HTMLElement | undefined;
|
|
879
|
+
/**
|
|
880
|
+
* Namespace for operations on canvas layers.
|
|
881
|
+
*/
|
|
882
|
+
readonly layers: CanvasLayersInterface;
|
|
883
|
+
/**
|
|
884
|
+
* Namespace for operations on canvas HTML layers.
|
|
885
|
+
*/
|
|
886
|
+
readonly htmlLayers: CanvasHtmlLayersInterface;
|
|
641
887
|
/**
|
|
642
888
|
* Extract the canvas as an image.
|
|
643
889
|
* @returns The image as a base64 string.
|
|
@@ -657,6 +903,9 @@ interface CanvasManagerInterface {
|
|
|
657
903
|
* @param data The object.
|
|
658
904
|
*/
|
|
659
905
|
restore(data: object): Promise<void>;
|
|
906
|
+
/**
|
|
907
|
+
* @deprecated Use {@link tickers}.onComplete instead.
|
|
908
|
+
*/
|
|
660
909
|
onTickerComplete(tickerId: string, options: {
|
|
661
910
|
aliasToRemoveAfter: string[];
|
|
662
911
|
tickerAliasToResume: string[];
|
|
@@ -710,10 +959,6 @@ interface VideoSpriteOptions extends ImageSpriteOptions {
|
|
|
710
959
|
* Interface for Asset memory
|
|
711
960
|
*/
|
|
712
961
|
interface AssetMemory {
|
|
713
|
-
/**
|
|
714
|
-
* @deprecated
|
|
715
|
-
*/
|
|
716
|
-
image?: string;
|
|
717
962
|
alias?: string;
|
|
718
963
|
url: string;
|
|
719
964
|
}
|
|
@@ -1409,10 +1654,6 @@ declare namespace CanvasPropertyUtility {
|
|
|
1409
1654
|
}
|
|
1410
1655
|
|
|
1411
1656
|
interface BaseTransitionProps {
|
|
1412
|
-
/**
|
|
1413
|
-
* @deprecated Use {@link completeOnContinue} instead.
|
|
1414
|
-
*/
|
|
1415
|
-
forceCompleteBeforeNext?: boolean;
|
|
1416
1657
|
/**
|
|
1417
1658
|
* If true, the transition will be completed before the next step.
|
|
1418
1659
|
* For example, if the transition is a dissolve transition, the "alpha" of the texture will be 1 before the next step.
|
|
@@ -1804,4 +2045,4 @@ declare const UPDATE_PRIORITY: typeof _drincs_pixi_vn_pixi_js.UPDATE_PRIORITY;
|
|
|
1804
2045
|
|
|
1805
2046
|
declare const canvas: CanvasManagerInterface;
|
|
1806
2047
|
|
|
1807
|
-
export { AdditionalPositionsExtension, AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetAliasIdType, type AssetMemory, Assets, type BundleIdType, type CanvasBaseInterface, CanvasBaseItem, CanvasBaseItemMemory, CanvasGameState, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, Color, type CommonTickerProps, Container, ContainerChild$1 as ContainerChild, ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, ListenerExtension, ListenerExtensionMemory, type MoveInOutProps, OnEventsHandlers,
|
|
2048
|
+
export { AdditionalPositionsExtension, AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetAliasIdType, type AssetMemory, Assets, type BundleIdType, type CanvasBaseInterface, CanvasBaseItem, CanvasBaseItemMemory, CanvasGameState, type CanvasHtmlLayersInterface, type CanvasLayersInterface, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, type CanvasTickersInterface, Color, type CommonTickerProps, Container, ContainerChild$1 as ContainerChild, ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, ListenerExtension, ListenerExtensionMemory, type MoveInOutProps, OnEventsHandlers, type PixivnAssetAliasIds, type PixivnBundleIds, type PushInOutProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, RegisteredTickers, type ShakeEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, Text, type TextMemory, type TextOptions, TextStyle, Texture, Ticker$1 as Ticker, TickerArgs, TickerBase, TickerHistory, TickerInfo, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, TickersSequence, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type ZoomInOutProps, addImage, addImageCointainer, addVideo, canvas, canvasComponentDecorator, drawCanvasErrorHandler, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, tickerDecorator, zoomIn, zoomOut };
|