@drincs/pixi-vn 1.5.19 → 1.6.1
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/{HistoryChoiceMenuOption-BOHqf57l.d.ts → HistoryChoiceMenuOption-BQc_jAe-.d.ts} +2 -7
- package/dist/{HistoryChoiceMenuOption-PzBGGqOC.d.cts → HistoryChoiceMenuOption-ok3Zd5pB.d.cts} +2 -7
- package/dist/{StoredClassModel-BgRY86sq.d.ts → StoredClassModel-CUrGRJi0.d.cts} +5 -2
- package/dist/{StoredClassModel-BgRY86sq.d.cts → StoredClassModel-D-s0mEVj.d.ts} +5 -2
- package/dist/canvas.cjs +2 -3
- package/dist/canvas.d.cts +32 -38
- package/dist/canvas.d.ts +32 -38
- package/dist/canvas.mjs +2 -3
- package/dist/characters.cjs +1 -2
- package/dist/characters.d.cts +3 -2
- package/dist/characters.d.ts +3 -2
- package/dist/characters.mjs +1 -2
- package/dist/chunk-D45QSSXG.mjs +1 -0
- package/dist/chunk-HACUDOYJ.mjs +1 -0
- package/dist/chunk-IWAXXFXE.mjs +1 -0
- package/dist/chunk-L4IHQ3VT.mjs +1 -0
- package/dist/{chunk-JJFD2BVW.mjs → chunk-TTRUPDAB.mjs} +1 -2
- package/dist/chunk-XSN6P5JL.mjs +0 -0
- package/dist/chunk-ZW3MIPMS.mjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +43 -16
- package/dist/core.d.ts +43 -16
- package/dist/core.mjs +1 -1
- package/dist/history.cjs +1 -2
- package/dist/history.d.cts +3 -4
- package/dist/history.d.ts +3 -4
- package/dist/history.mjs +1 -2
- package/dist/index.cjs +2 -3
- package/dist/index.d.cts +294 -122
- package/dist/index.d.ts +294 -122
- package/dist/index.mjs +2 -3
- package/dist/motion.cjs +1 -2
- package/dist/motion.d.cts +18 -0
- package/dist/motion.d.ts +18 -0
- package/dist/motion.mjs +1 -2
- package/dist/narration.cjs +2 -3
- package/dist/narration.d.cts +9 -20
- package/dist/narration.d.ts +9 -20
- package/dist/narration.mjs +2 -3
- package/dist/pixi/browser.js +35 -35
- package/dist/sound.cjs +1 -2
- package/dist/sound.d.cts +193 -72
- package/dist/sound.d.ts +193 -72
- package/dist/sound.mjs +1 -2
- package/dist/storage.cjs +1 -2
- package/dist/storage.d.cts +20 -71
- package/dist/storage.d.ts +20 -71
- package/dist/storage.mjs +1 -2
- package/dist/vite-listener.cjs +1 -2
- package/dist/vite-listener.mjs +1 -2
- package/dist/vite.cjs +1 -2
- package/dist/vite.mjs +1 -2
- package/package.json +10 -12
- package/dist/chunk-46QBDRUK.mjs +0 -2
- package/dist/chunk-52EK6LYW.mjs +0 -2
- package/dist/chunk-INJYRMJ3.mjs +0 -2
- package/dist/chunk-JJFD2BVW.mjs.map +0 -1
- package/dist/chunk-OXRIVLY2.mjs +0 -2
- package/dist/chunk-SOFV7YZ5.mjs +0 -2
- package/dist/chunk-XZMYXKAY.mjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/motion.cjs.map +0 -1
- package/dist/motion.mjs.map +0 -1
- package/dist/vite-listener.cjs.map +0 -1
- package/dist/vite-listener.mjs.map +0 -1
- package/dist/vite.cjs.map +0 -1
- package/dist/vite.mjs.map +0 -1
package/dist/canvas.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ export { TextureSourceLike, Ticker as TickerValue } from '@drincs/pixi-vn/pixi.j
|
|
|
4
4
|
import { ObjectTarget, AnimationOptions as AnimationOptions$1, At, SequenceOptions as SequenceOptions$1 } from 'motion';
|
|
5
5
|
export { AnimationOptions as MotionAnimationOptions } from 'motion';
|
|
6
6
|
import { Devtools } from '@pixi/devtools';
|
|
7
|
+
import { OnErrorHandler } from '@drincs/pixi-vn/core';
|
|
7
8
|
|
|
8
9
|
interface MotionComponentExtension {
|
|
9
10
|
pivot?: number;
|
|
@@ -408,10 +409,12 @@ declare class CanvasBaseItem<T2 extends CanvasBaseItemMemory> {
|
|
|
408
409
|
constructor(..._options: any);
|
|
409
410
|
/**
|
|
410
411
|
* This method return the memory of the canvas element.
|
|
412
|
+
* @throws {PixiError} when the method is not overridden in the subclass.
|
|
411
413
|
*/
|
|
412
414
|
get memory(): T2;
|
|
413
415
|
/**
|
|
414
416
|
* This method set the memory of the canvas element.
|
|
417
|
+
* @throws {PixiError} when the method is not overridden in the subclass.
|
|
415
418
|
*/
|
|
416
419
|
setMemory(_value: T2): Promise<void> | void;
|
|
417
420
|
/**
|
|
@@ -425,23 +428,21 @@ declare class CanvasBaseItem<T2 extends CanvasBaseItemMemory> {
|
|
|
425
428
|
*/
|
|
426
429
|
interface CanvasBaseItemMemory {
|
|
427
430
|
pixivnId: string;
|
|
431
|
+
/**
|
|
432
|
+
* The index of the container in its parent, if it has one
|
|
433
|
+
*/
|
|
434
|
+
index?: number;
|
|
435
|
+
/**
|
|
436
|
+
* The label of the parent container, if it has one
|
|
437
|
+
*/
|
|
438
|
+
parentLabel?: string;
|
|
439
|
+
label?: string;
|
|
428
440
|
zIndex?: number;
|
|
429
441
|
}
|
|
430
442
|
|
|
431
443
|
interface CanvasBaseInterface<T2 extends CanvasBaseItemMemory> extends CanvasBaseItem<T2>, Container$1 {
|
|
432
444
|
}
|
|
433
445
|
|
|
434
|
-
type PauseTickerType = {
|
|
435
|
-
/**
|
|
436
|
-
* Ticker ids excluded
|
|
437
|
-
*/
|
|
438
|
-
tickerIdsExcluded?: string[];
|
|
439
|
-
/**
|
|
440
|
-
* Ticker ids included
|
|
441
|
-
*/
|
|
442
|
-
tickerIdsIncluded?: string[];
|
|
443
|
-
};
|
|
444
|
-
|
|
445
446
|
/**
|
|
446
447
|
* Interface exported canvas
|
|
447
448
|
*/
|
|
@@ -462,12 +463,6 @@ interface CanvasGameState {
|
|
|
462
463
|
* @deprecated
|
|
463
464
|
*/
|
|
464
465
|
elementAliasesOrder: string[];
|
|
465
|
-
/**
|
|
466
|
-
* @deprecated
|
|
467
|
-
*/
|
|
468
|
-
tickersOnPause: {
|
|
469
|
-
[alias: string]: PauseTickerType;
|
|
470
|
-
};
|
|
471
466
|
tickersToCompleteOnStepEnd: {
|
|
472
467
|
tikersIds: {
|
|
473
468
|
id: string;
|
|
@@ -755,6 +750,7 @@ interface CanvasManagerInterface {
|
|
|
755
750
|
id: string | string[];
|
|
756
751
|
}): void;
|
|
757
752
|
/**
|
|
753
|
+
* @deprecated Use {@link findTicker}(id).paused
|
|
758
754
|
* Check if a ticker is paused.
|
|
759
755
|
* @param alias The alias of the canvas element that will use the ticker.
|
|
760
756
|
* @param tickerId The ticker that will be checked.
|
|
@@ -1115,10 +1111,6 @@ interface AssetMemory {
|
|
|
1115
1111
|
}
|
|
1116
1112
|
|
|
1117
1113
|
interface SpriteBaseMemory extends SpriteOptions$1, CanvasBaseItemMemory, ListenerExtensionMemory, AdditionalPositionsExtensionProps {
|
|
1118
|
-
/**
|
|
1119
|
-
* @deprecated
|
|
1120
|
-
*/
|
|
1121
|
-
textureImage?: AssetMemory;
|
|
1122
1114
|
textureData?: AssetMemory;
|
|
1123
1115
|
}
|
|
1124
1116
|
/**
|
|
@@ -1338,14 +1330,6 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
|
|
|
1338
1330
|
* The elements contained in this container
|
|
1339
1331
|
*/
|
|
1340
1332
|
elements: CanvasBaseItemMemory[];
|
|
1341
|
-
/**
|
|
1342
|
-
* The index of the container in its parent, if it has one
|
|
1343
|
-
*/
|
|
1344
|
-
index?: number;
|
|
1345
|
-
/**
|
|
1346
|
-
* The label of the parent container, if it has one
|
|
1347
|
-
*/
|
|
1348
|
-
parentLabel?: string;
|
|
1349
1333
|
}
|
|
1350
1334
|
|
|
1351
1335
|
/**
|
|
@@ -1479,6 +1463,10 @@ declare class ImageContainer extends Container<ImageSprite, ImageContainerMemory
|
|
|
1479
1463
|
declare class CanvasManagerStatic {
|
|
1480
1464
|
private constructor();
|
|
1481
1465
|
private static _app;
|
|
1466
|
+
/**
|
|
1467
|
+
* The Pixi.js application instance.
|
|
1468
|
+
* @throws {PixiError} when the canvas has not been initialized yet (i.e. before calling `Game.init()`).
|
|
1469
|
+
*/
|
|
1482
1470
|
static get app(): Application<_drincs_pixi_vn_pixi_js.Renderer>;
|
|
1483
1471
|
static get gameLayer(): _drincs_pixi_vn_pixi_js.Container<_drincs_pixi_vn_pixi_js.ContainerChild>;
|
|
1484
1472
|
/**
|
|
@@ -1543,12 +1531,6 @@ declare class CanvasManagerStatic {
|
|
|
1543
1531
|
alias: string;
|
|
1544
1532
|
}[];
|
|
1545
1533
|
};
|
|
1546
|
-
/**
|
|
1547
|
-
* @deprecated
|
|
1548
|
-
*/
|
|
1549
|
-
static _tickersOnPause: {
|
|
1550
|
-
[aliasOrId: string]: PauseTickerType;
|
|
1551
|
-
};
|
|
1552
1534
|
static generateTickerId(...args: any[]): string;
|
|
1553
1535
|
static addTickerTimeoutInfo(aliases: string | string[], ticker: string, timeout: string, canBeDeletedBeforeEnd: boolean): void;
|
|
1554
1536
|
static removeTickerTimeoutInfo(timeout: NodeJS.Timeout | string): void;
|
|
@@ -1965,6 +1947,13 @@ declare function pushIn(alias: string, component?: TComponent, props?: PushInOut
|
|
|
1965
1947
|
*/
|
|
1966
1948
|
declare function pushOut(alias: string, props?: PushInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
|
|
1967
1949
|
|
|
1950
|
+
/**
|
|
1951
|
+
* Canvas error handler: when a `PixiError` contains `canvasElementInfo`,
|
|
1952
|
+
* draw a simple `ErrorGraphics` placeholder on the canvas so the scene
|
|
1953
|
+
* remains visible and debuggable.
|
|
1954
|
+
*/
|
|
1955
|
+
declare function drawCanvasErrorHandler(): OnErrorHandler;
|
|
1956
|
+
|
|
1968
1957
|
/**
|
|
1969
1958
|
* Add a list of images in the container, after that, the images are added to the canvas.
|
|
1970
1959
|
* Is the same that {@link showImageContainer}, but the image is not shown.
|
|
@@ -2001,6 +1990,7 @@ declare function showImageContainer(alias: string, imageUrls: string[], options?
|
|
|
2001
1990
|
* @param imageUrl is the url of the image. If you don't provide the url, then the alias is used as the url.
|
|
2002
1991
|
* @param options The options of the image.
|
|
2003
1992
|
* @returns the container of the image.
|
|
1993
|
+
* @throws {PixiError} when `imageUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2004
1994
|
* @example
|
|
2005
1995
|
* ```typescript
|
|
2006
1996
|
* let bunny1 = addImage("bunny1", "https://pixijs.com/assets/bunny1.png")
|
|
@@ -2017,6 +2007,7 @@ declare function addImage(alias: string, imageUrl?: string, options?: ImageSprit
|
|
|
2017
2007
|
* @param imageUrl The url of the image.
|
|
2018
2008
|
* @param options The options of the image.
|
|
2019
2009
|
* @returns A promise that is resolved when the image is loaded.
|
|
2010
|
+
* @throws {PixiError} when `imageUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2020
2011
|
* @example
|
|
2021
2012
|
* ```typescript
|
|
2022
2013
|
* let bunny1 = showImage("bunny1", "https://pixijs.com/assets/bunny1.png")
|
|
@@ -2042,9 +2033,10 @@ declare function showText(alias: string, text: string, options?: Omit<TextOption
|
|
|
2042
2033
|
/**
|
|
2043
2034
|
* Get a texture from a url.
|
|
2044
2035
|
* @param textureAlias is the url of the file.
|
|
2045
|
-
* @returns the texture of the image or video, or
|
|
2036
|
+
* @returns the texture of the image or video, or `undefined` when `textureAlias` is the `"EMPTY"` sentinel value.
|
|
2037
|
+
* @throws {PixiError} when the alias is missing, the asset is not found in the cache/network, or the loaded resource is not a `Texture`.
|
|
2046
2038
|
*/
|
|
2047
|
-
declare function getTexture(textureAlias?: string): Promise<Texture$1 |
|
|
2039
|
+
declare function getTexture(textureAlias?: string): Promise<Texture$1 | undefined>;
|
|
2048
2040
|
|
|
2049
2041
|
/**
|
|
2050
2042
|
* Add a video in the canvas.
|
|
@@ -2054,6 +2046,7 @@ declare function getTexture(textureAlias?: string): Promise<Texture$1 | void>;
|
|
|
2054
2046
|
* @param videoUrl is the url of the video. If you don't provide the url, then the alias is used as the url.
|
|
2055
2047
|
* @param options The options of the video.
|
|
2056
2048
|
* @returns the container of the video.
|
|
2049
|
+
* @throws {PixiError} when `videoUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2057
2050
|
* @example
|
|
2058
2051
|
* ```typescript
|
|
2059
2052
|
* let video1 = addVideo("video1", "https://pixijs.com/assets/video1.mp4")
|
|
@@ -2070,6 +2063,7 @@ declare function addVideo(alias: string, videoUrl?: string, options?: VideoSprit
|
|
|
2070
2063
|
* @param videoUrl The url of the video.
|
|
2071
2064
|
* @param options The options of the video.
|
|
2072
2065
|
* @returns A promise that is resolved when the video is loaded.
|
|
2066
|
+
* @throws {PixiError} when `videoUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2073
2067
|
* @example
|
|
2074
2068
|
* ```typescript
|
|
2075
2069
|
* let video1 = showVideo("video1", "https://pixijs.com/assets/video1.mp4")
|
|
@@ -2108,4 +2102,4 @@ declare const UPDATE_PRIORITY: typeof _drincs_pixi_vn_pixi_js.UPDATE_PRIORITY;
|
|
|
2108
2102
|
|
|
2109
2103
|
declare const canvas: CanvasManagerInterface;
|
|
2110
2104
|
|
|
2111
|
-
export { type AdditionalPositionsExtension, type AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetMemory, Assets, type CanvasBaseInterface, CanvasBaseItem, type CanvasBaseItemMemory, type CanvasGameState, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, Color, type CommonTickerProps, Container, type ContainerChild, type ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, type ListenerExtension, type ListenerExtensionMemory, type MoveInOutProps, type OnEventsHandlers, type PauseType, type PushInOutProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, RegisteredTickers, type RepeatType, type ShakeEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, Text, type TextMemory, type TextOptions, TextStyle, Texture, type Ticker, type TickerArgs, TickerBase, type TickerHistory, type TickerInfo, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, type TickersSequence, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type ZoomInOutProps, addImage, addImageCointainer, addListenerHandler, addVideo, analizePositionsExtensionProps, canvas, canvasComponentDecorator, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, tickerDecorator, zoomIn, zoomOut };
|
|
2105
|
+
export { type AdditionalPositionsExtension, type AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetMemory, Assets, type CanvasBaseInterface, CanvasBaseItem, type CanvasBaseItemMemory, type CanvasGameState, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, Color, type CommonTickerProps, Container, type ContainerChild, type ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, type ListenerExtension, type ListenerExtensionMemory, type MoveInOutProps, type OnEventsHandlers, type PauseType, type PushInOutProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, RegisteredTickers, type RepeatType, type ShakeEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, Text, type TextMemory, type TextOptions, TextStyle, Texture, type Ticker, type TickerArgs, TickerBase, type TickerHistory, type TickerInfo, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, type TickersSequence, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type ZoomInOutProps, addImage, addImageCointainer, addListenerHandler, addVideo, analizePositionsExtensionProps, canvas, canvasComponentDecorator, drawCanvasErrorHandler, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, tickerDecorator, zoomIn, zoomOut };
|
package/dist/canvas.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { TextureSourceLike, Ticker as TickerValue } from '@drincs/pixi-vn/pixi.j
|
|
|
4
4
|
import { ObjectTarget, AnimationOptions as AnimationOptions$1, At, SequenceOptions as SequenceOptions$1 } from 'motion';
|
|
5
5
|
export { AnimationOptions as MotionAnimationOptions } from 'motion';
|
|
6
6
|
import { Devtools } from '@pixi/devtools';
|
|
7
|
+
import { OnErrorHandler } from '@drincs/pixi-vn/core';
|
|
7
8
|
|
|
8
9
|
interface MotionComponentExtension {
|
|
9
10
|
pivot?: number;
|
|
@@ -408,10 +409,12 @@ declare class CanvasBaseItem<T2 extends CanvasBaseItemMemory> {
|
|
|
408
409
|
constructor(..._options: any);
|
|
409
410
|
/**
|
|
410
411
|
* This method return the memory of the canvas element.
|
|
412
|
+
* @throws {PixiError} when the method is not overridden in the subclass.
|
|
411
413
|
*/
|
|
412
414
|
get memory(): T2;
|
|
413
415
|
/**
|
|
414
416
|
* This method set the memory of the canvas element.
|
|
417
|
+
* @throws {PixiError} when the method is not overridden in the subclass.
|
|
415
418
|
*/
|
|
416
419
|
setMemory(_value: T2): Promise<void> | void;
|
|
417
420
|
/**
|
|
@@ -425,23 +428,21 @@ declare class CanvasBaseItem<T2 extends CanvasBaseItemMemory> {
|
|
|
425
428
|
*/
|
|
426
429
|
interface CanvasBaseItemMemory {
|
|
427
430
|
pixivnId: string;
|
|
431
|
+
/**
|
|
432
|
+
* The index of the container in its parent, if it has one
|
|
433
|
+
*/
|
|
434
|
+
index?: number;
|
|
435
|
+
/**
|
|
436
|
+
* The label of the parent container, if it has one
|
|
437
|
+
*/
|
|
438
|
+
parentLabel?: string;
|
|
439
|
+
label?: string;
|
|
428
440
|
zIndex?: number;
|
|
429
441
|
}
|
|
430
442
|
|
|
431
443
|
interface CanvasBaseInterface<T2 extends CanvasBaseItemMemory> extends CanvasBaseItem<T2>, Container$1 {
|
|
432
444
|
}
|
|
433
445
|
|
|
434
|
-
type PauseTickerType = {
|
|
435
|
-
/**
|
|
436
|
-
* Ticker ids excluded
|
|
437
|
-
*/
|
|
438
|
-
tickerIdsExcluded?: string[];
|
|
439
|
-
/**
|
|
440
|
-
* Ticker ids included
|
|
441
|
-
*/
|
|
442
|
-
tickerIdsIncluded?: string[];
|
|
443
|
-
};
|
|
444
|
-
|
|
445
446
|
/**
|
|
446
447
|
* Interface exported canvas
|
|
447
448
|
*/
|
|
@@ -462,12 +463,6 @@ interface CanvasGameState {
|
|
|
462
463
|
* @deprecated
|
|
463
464
|
*/
|
|
464
465
|
elementAliasesOrder: string[];
|
|
465
|
-
/**
|
|
466
|
-
* @deprecated
|
|
467
|
-
*/
|
|
468
|
-
tickersOnPause: {
|
|
469
|
-
[alias: string]: PauseTickerType;
|
|
470
|
-
};
|
|
471
466
|
tickersToCompleteOnStepEnd: {
|
|
472
467
|
tikersIds: {
|
|
473
468
|
id: string;
|
|
@@ -755,6 +750,7 @@ interface CanvasManagerInterface {
|
|
|
755
750
|
id: string | string[];
|
|
756
751
|
}): void;
|
|
757
752
|
/**
|
|
753
|
+
* @deprecated Use {@link findTicker}(id).paused
|
|
758
754
|
* Check if a ticker is paused.
|
|
759
755
|
* @param alias The alias of the canvas element that will use the ticker.
|
|
760
756
|
* @param tickerId The ticker that will be checked.
|
|
@@ -1115,10 +1111,6 @@ interface AssetMemory {
|
|
|
1115
1111
|
}
|
|
1116
1112
|
|
|
1117
1113
|
interface SpriteBaseMemory extends SpriteOptions$1, CanvasBaseItemMemory, ListenerExtensionMemory, AdditionalPositionsExtensionProps {
|
|
1118
|
-
/**
|
|
1119
|
-
* @deprecated
|
|
1120
|
-
*/
|
|
1121
|
-
textureImage?: AssetMemory;
|
|
1122
1114
|
textureData?: AssetMemory;
|
|
1123
1115
|
}
|
|
1124
1116
|
/**
|
|
@@ -1338,14 +1330,6 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
|
|
|
1338
1330
|
* The elements contained in this container
|
|
1339
1331
|
*/
|
|
1340
1332
|
elements: CanvasBaseItemMemory[];
|
|
1341
|
-
/**
|
|
1342
|
-
* The index of the container in its parent, if it has one
|
|
1343
|
-
*/
|
|
1344
|
-
index?: number;
|
|
1345
|
-
/**
|
|
1346
|
-
* The label of the parent container, if it has one
|
|
1347
|
-
*/
|
|
1348
|
-
parentLabel?: string;
|
|
1349
1333
|
}
|
|
1350
1334
|
|
|
1351
1335
|
/**
|
|
@@ -1479,6 +1463,10 @@ declare class ImageContainer extends Container<ImageSprite, ImageContainerMemory
|
|
|
1479
1463
|
declare class CanvasManagerStatic {
|
|
1480
1464
|
private constructor();
|
|
1481
1465
|
private static _app;
|
|
1466
|
+
/**
|
|
1467
|
+
* The Pixi.js application instance.
|
|
1468
|
+
* @throws {PixiError} when the canvas has not been initialized yet (i.e. before calling `Game.init()`).
|
|
1469
|
+
*/
|
|
1482
1470
|
static get app(): Application<_drincs_pixi_vn_pixi_js.Renderer>;
|
|
1483
1471
|
static get gameLayer(): _drincs_pixi_vn_pixi_js.Container<_drincs_pixi_vn_pixi_js.ContainerChild>;
|
|
1484
1472
|
/**
|
|
@@ -1543,12 +1531,6 @@ declare class CanvasManagerStatic {
|
|
|
1543
1531
|
alias: string;
|
|
1544
1532
|
}[];
|
|
1545
1533
|
};
|
|
1546
|
-
/**
|
|
1547
|
-
* @deprecated
|
|
1548
|
-
*/
|
|
1549
|
-
static _tickersOnPause: {
|
|
1550
|
-
[aliasOrId: string]: PauseTickerType;
|
|
1551
|
-
};
|
|
1552
1534
|
static generateTickerId(...args: any[]): string;
|
|
1553
1535
|
static addTickerTimeoutInfo(aliases: string | string[], ticker: string, timeout: string, canBeDeletedBeforeEnd: boolean): void;
|
|
1554
1536
|
static removeTickerTimeoutInfo(timeout: NodeJS.Timeout | string): void;
|
|
@@ -1965,6 +1947,13 @@ declare function pushIn(alias: string, component?: TComponent, props?: PushInOut
|
|
|
1965
1947
|
*/
|
|
1966
1948
|
declare function pushOut(alias: string, props?: PushInOutProps, priority?: UPDATE_PRIORITY$1): string[] | undefined;
|
|
1967
1949
|
|
|
1950
|
+
/**
|
|
1951
|
+
* Canvas error handler: when a `PixiError` contains `canvasElementInfo`,
|
|
1952
|
+
* draw a simple `ErrorGraphics` placeholder on the canvas so the scene
|
|
1953
|
+
* remains visible and debuggable.
|
|
1954
|
+
*/
|
|
1955
|
+
declare function drawCanvasErrorHandler(): OnErrorHandler;
|
|
1956
|
+
|
|
1968
1957
|
/**
|
|
1969
1958
|
* Add a list of images in the container, after that, the images are added to the canvas.
|
|
1970
1959
|
* Is the same that {@link showImageContainer}, but the image is not shown.
|
|
@@ -2001,6 +1990,7 @@ declare function showImageContainer(alias: string, imageUrls: string[], options?
|
|
|
2001
1990
|
* @param imageUrl is the url of the image. If you don't provide the url, then the alias is used as the url.
|
|
2002
1991
|
* @param options The options of the image.
|
|
2003
1992
|
* @returns the container of the image.
|
|
1993
|
+
* @throws {PixiError} when `imageUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2004
1994
|
* @example
|
|
2005
1995
|
* ```typescript
|
|
2006
1996
|
* let bunny1 = addImage("bunny1", "https://pixijs.com/assets/bunny1.png")
|
|
@@ -2017,6 +2007,7 @@ declare function addImage(alias: string, imageUrl?: string, options?: ImageSprit
|
|
|
2017
2007
|
* @param imageUrl The url of the image.
|
|
2018
2008
|
* @param options The options of the image.
|
|
2019
2009
|
* @returns A promise that is resolved when the image is loaded.
|
|
2010
|
+
* @throws {PixiError} when `imageUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2020
2011
|
* @example
|
|
2021
2012
|
* ```typescript
|
|
2022
2013
|
* let bunny1 = showImage("bunny1", "https://pixijs.com/assets/bunny1.png")
|
|
@@ -2042,9 +2033,10 @@ declare function showText(alias: string, text: string, options?: Omit<TextOption
|
|
|
2042
2033
|
/**
|
|
2043
2034
|
* Get a texture from a url.
|
|
2044
2035
|
* @param textureAlias is the url of the file.
|
|
2045
|
-
* @returns the texture of the image or video, or
|
|
2036
|
+
* @returns the texture of the image or video, or `undefined` when `textureAlias` is the `"EMPTY"` sentinel value.
|
|
2037
|
+
* @throws {PixiError} when the alias is missing, the asset is not found in the cache/network, or the loaded resource is not a `Texture`.
|
|
2046
2038
|
*/
|
|
2047
|
-
declare function getTexture(textureAlias?: string): Promise<Texture$1 |
|
|
2039
|
+
declare function getTexture(textureAlias?: string): Promise<Texture$1 | undefined>;
|
|
2048
2040
|
|
|
2049
2041
|
/**
|
|
2050
2042
|
* Add a video in the canvas.
|
|
@@ -2054,6 +2046,7 @@ declare function getTexture(textureAlias?: string): Promise<Texture$1 | void>;
|
|
|
2054
2046
|
* @param videoUrl is the url of the video. If you don't provide the url, then the alias is used as the url.
|
|
2055
2047
|
* @param options The options of the video.
|
|
2056
2048
|
* @returns the container of the video.
|
|
2049
|
+
* @throws {PixiError} when `videoUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2057
2050
|
* @example
|
|
2058
2051
|
* ```typescript
|
|
2059
2052
|
* let video1 = addVideo("video1", "https://pixijs.com/assets/video1.mp4")
|
|
@@ -2070,6 +2063,7 @@ declare function addVideo(alias: string, videoUrl?: string, options?: VideoSprit
|
|
|
2070
2063
|
* @param videoUrl The url of the video.
|
|
2071
2064
|
* @param options The options of the video.
|
|
2072
2065
|
* @returns A promise that is resolved when the video is loaded.
|
|
2066
|
+
* @throws {PixiError} when `videoUrl` is not provided and `alias` is not registered in the asset cache.
|
|
2073
2067
|
* @example
|
|
2074
2068
|
* ```typescript
|
|
2075
2069
|
* let video1 = showVideo("video1", "https://pixijs.com/assets/video1.mp4")
|
|
@@ -2108,4 +2102,4 @@ declare const UPDATE_PRIORITY: typeof _drincs_pixi_vn_pixi_js.UPDATE_PRIORITY;
|
|
|
2108
2102
|
|
|
2109
2103
|
declare const canvas: CanvasManagerInterface;
|
|
2110
2104
|
|
|
2111
|
-
export { type AdditionalPositionsExtension, type AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetMemory, Assets, type CanvasBaseInterface, CanvasBaseItem, type CanvasBaseItemMemory, type CanvasGameState, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, Color, type CommonTickerProps, Container, type ContainerChild, type ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, type ListenerExtension, type ListenerExtensionMemory, type MoveInOutProps, type OnEventsHandlers, type PauseType, type PushInOutProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, RegisteredTickers, type RepeatType, type ShakeEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, Text, type TextMemory, type TextOptions, TextStyle, Texture, type Ticker, type TickerArgs, TickerBase, type TickerHistory, type TickerInfo, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, type TickersSequence, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type ZoomInOutProps, addImage, addImageCointainer, addListenerHandler, addVideo, analizePositionsExtensionProps, canvas, canvasComponentDecorator, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, tickerDecorator, zoomIn, zoomOut };
|
|
2105
|
+
export { type AdditionalPositionsExtension, type AdditionalPositionsExtensionProps, type AnchorExtension, type AnchorExtensionProps, type AssetMemory, Assets, type CanvasBaseInterface, CanvasBaseItem, type CanvasBaseItemMemory, type CanvasGameState, type CanvasManagerInterface, CanvasManagerStatic, CanvasPropertyUtility, Color, type CommonTickerProps, Container, type ContainerChild, type ContainerMemory, type ContainerOptions, ImageContainer, type ImageContainerMemory, type ImageContainerOptions, ImageSprite, type ImageSpriteMemory, type ImageSpriteOptions, type Layer, type ListenerExtension, type ListenerExtensionMemory, type MoveInOutProps, type OnEventsHandlers, type PauseType, type PushInOutProps, Rectangle, RegisteredCanvasComponents, RegisteredEvents, RegisteredTickers, type RepeatType, type ShakeEffectProps, type ShowWithDissolveTransitionProps, type ShowWithFadeTransitionProps, Sprite, type SpriteBaseMemory, type SpriteMemory, type SpriteOptions, Text, type TextMemory, type TextOptions, TextStyle, Texture, type Ticker, type TickerArgs, TickerBase, type TickerHistory, type TickerInfo, type TickerProgrationExponential, type TickerProgrationLinear, type TickerProgrationType, type TickerTimeoutHistory, type TickersSequence, UPDATE_PRIORITY, VideoSprite, type VideoSpriteMemory, type VideoSpriteOptions, type ZoomInOutProps, addImage, addImageCointainer, addListenerHandler, addVideo, analizePositionsExtensionProps, canvas, canvasComponentDecorator, drawCanvasErrorHandler, eventDecorator, getTexture, moveIn, moveOut, pushIn, pushOut, removeWithDissolve, removeWithFade, setMemoryContainer, shakeEffect, showImage, showImageContainer, showText, showVideo, showWithDissolve, showWithFade, tickerDecorator, zoomIn, zoomOut };
|