@drincs/pixi-vn 0.9.1 → 0.9.5
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 +1 -1
- package/dist/ContainerChild-CEuXVx00.d.cts +275 -0
- package/dist/ContainerChild-HBivknFV.d.ts +275 -0
- package/dist/WebGLRenderer-U57ZOBH6.js +9 -0
- package/dist/WebGPURenderer-EYIZ7IXV.js +10 -0
- package/dist/{browserAll-33PYKKE2.js → browserAll-2HD5EH7K.js} +5 -5
- package/dist/{chunk-7JQTY54X.js → chunk-5JREOVCG.js} +1 -1
- package/dist/{chunk-LAV52DFC.js → chunk-5VX2VTDZ.js} +5 -5
- package/dist/{chunk-63AQP2C4.js → chunk-6GJXIPNB.js} +7 -1
- package/dist/{chunk-ATCDPQLA.js → chunk-73ID6GAW.js} +2 -2
- package/dist/{chunk-WX267JP2.js → chunk-B7XQM2BB.js} +9 -1
- package/dist/{chunk-JNSNLO3T.js → chunk-CAWOWL3P.js} +11 -6
- package/dist/{chunk-UPWG5VFX.js → chunk-K7XIRQGF.js} +2 -2
- package/dist/{chunk-LD4BD5ZF.js → chunk-ODIEVSQX.js} +3 -5
- package/dist/{chunk-Y3QDHFJM.js → chunk-PP3SBC3C.js} +1 -1
- package/dist/{chunk-5MBVHEKN.js → chunk-PP5T5HEO.js} +1 -1
- package/dist/{chunk-XAZVI35W.js → chunk-RFNGGK7X.js} +4958 -3467
- package/dist/{chunk-UCC2DJ3E.js → chunk-RI37WOHP.js} +1 -14
- package/dist/{chunk-XVXD2VT7.js → chunk-SAUNZQHZ.js} +1 -1
- package/dist/{chunk-SJ2G3XHZ.js → chunk-WNOARCWH.js} +3 -3
- package/dist/{chunk-VJ4DXCBP.js → chunk-WS3FY4Q6.js} +2 -2
- package/dist/{chunk-KZYJO7H5.js → chunk-Y3WNBACN.js} +2 -2
- package/dist/{chunk-AY2QUMXC.js → chunk-Z3NBKYVU.js} +13 -13
- package/dist/classes/CharacterBaseModel.cjs +2995 -795
- package/dist/classes/CharacterBaseModel.js +20 -17
- package/dist/classes/CharacterStoredClass.cjs +2995 -795
- package/dist/classes/CharacterStoredClass.js +20 -17
- package/dist/classes/ChoiceMenuOption.cjs +3106 -906
- package/dist/classes/ChoiceMenuOption.d.cts +1 -1
- package/dist/classes/ChoiceMenuOption.d.ts +1 -1
- package/dist/classes/ChoiceMenuOption.js +20 -17
- package/dist/classes/CloseLabel.d.cts +1 -1
- package/dist/classes/CloseLabel.d.ts +1 -1
- package/dist/classes/Label.d.cts +1 -1
- package/dist/classes/Label.d.ts +1 -1
- package/dist/classes/Sound.cjs +2995 -795
- package/dist/classes/Sound.js +20 -17
- package/dist/classes/StoredClassModel.cjs +2995 -795
- package/dist/classes/StoredClassModel.js +20 -17
- package/dist/classes/canvas/AdditionalPositions.cjs +26422 -0
- package/dist/classes/canvas/AdditionalPositions.d.cts +86 -0
- package/dist/classes/canvas/AdditionalPositions.d.ts +86 -0
- package/dist/classes/canvas/AdditionalPositions.js +90 -0
- package/dist/classes/canvas/AnchorExtension.cjs +26373 -0
- package/dist/classes/canvas/AnchorExtension.d.cts +28 -0
- package/dist/classes/canvas/AnchorExtension.d.ts +28 -0
- package/dist/classes/canvas/AnchorExtension.js +41 -0
- package/dist/classes/canvas/CanvasBaseItem.cjs +19 -8
- package/dist/classes/canvas/CanvasBaseItem.d.cts +5 -1
- package/dist/classes/canvas/CanvasBaseItem.d.ts +5 -1
- package/dist/classes/canvas/CanvasBaseItem.js +9 -9
- package/dist/classes/canvas/Container.cjs +3125 -925
- package/dist/classes/canvas/Container.d.cts +38 -2
- package/dist/classes/canvas/Container.d.ts +38 -2
- package/dist/classes/canvas/Container.js +20 -17
- package/dist/classes/canvas/ImageContainer.cjs +2898 -693
- package/dist/classes/canvas/ImageContainer.d.cts +41 -11
- package/dist/classes/canvas/ImageContainer.d.ts +41 -11
- package/dist/classes/canvas/ImageContainer.js +24 -19
- package/dist/classes/canvas/ImageSprite.cjs +2863 -658
- package/dist/classes/canvas/ImageSprite.d.cts +5 -49
- package/dist/classes/canvas/ImageSprite.d.ts +5 -49
- package/dist/classes/canvas/ImageSprite.js +24 -19
- package/dist/classes/canvas/Sprite.cjs +5844 -3642
- package/dist/classes/canvas/Sprite.d.cts +6 -91
- package/dist/classes/canvas/Sprite.d.ts +6 -91
- package/dist/classes/canvas/Sprite.js +20 -17
- package/dist/classes/canvas/Text.cjs +3160 -960
- package/dist/classes/canvas/Text.d.cts +6 -3
- package/dist/classes/canvas/Text.d.ts +6 -3
- package/dist/classes/canvas/Text.js +20 -17
- package/dist/classes/canvas/VideoSprite.cjs +2972 -769
- package/dist/classes/canvas/VideoSprite.d.cts +8 -6
- package/dist/classes/canvas/VideoSprite.d.ts +8 -6
- package/dist/classes/canvas/VideoSprite.js +24 -19
- package/dist/classes/index.cjs +3355 -1163
- package/dist/classes/index.d.cts +5 -4
- package/dist/classes/index.d.ts +5 -4
- package/dist/classes/index.js +21 -18
- package/dist/classes/ticker/FadeAlphaTicker.cjs +3055 -857
- package/dist/classes/ticker/FadeAlphaTicker.js +20 -17
- package/dist/classes/ticker/MoveTicker.cjs +3087 -887
- package/dist/classes/ticker/MoveTicker.js +20 -17
- package/dist/classes/ticker/RotateTicker.cjs +3080 -880
- package/dist/classes/ticker/RotateTicker.js +20 -17
- package/dist/classes/ticker/TickerBase.cjs +2990 -790
- package/dist/classes/ticker/TickerBase.js +20 -17
- package/dist/classes/ticker/ZoomTicker.cjs +2829 -629
- package/dist/classes/ticker/ZoomTicker.js +20 -17
- package/dist/classes/ticker/index.cjs +2630 -430
- package/dist/classes/ticker/index.js +20 -17
- package/dist/constants.cjs +14 -9
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +10 -10
- package/dist/decorators/canvas-element-decorator.cjs +3327 -1139
- package/dist/decorators/canvas-element-decorator.d.cts +5 -1
- package/dist/decorators/canvas-element-decorator.d.ts +5 -1
- package/dist/decorators/canvas-element-decorator.js +20 -17
- package/dist/decorators/character-decorator.cjs +9 -1
- package/dist/decorators/character-decorator.js +1 -1
- package/dist/decorators/event-decorator.d.cts +3 -1
- package/dist/decorators/event-decorator.d.ts +3 -1
- package/dist/decorators/index.cjs +3068 -916
- package/dist/decorators/index.d.cts +6 -4
- package/dist/decorators/index.d.ts +6 -4
- package/dist/decorators/index.js +20 -17
- package/dist/decorators/label-decorator.cjs +3345 -1153
- package/dist/decorators/label-decorator.js +20 -17
- package/dist/functions/canvas/canvas-effect.cjs +2551 -431
- package/dist/functions/canvas/canvas-effect.js +20 -17
- package/dist/functions/canvas/canvas-memory-utility.cjs +3325 -1125
- package/dist/functions/canvas/canvas-memory-utility.d.cts +6 -2
- package/dist/functions/canvas/canvas-memory-utility.d.ts +6 -2
- package/dist/functions/canvas/canvas-memory-utility.js +20 -17
- package/dist/functions/canvas/canvas-transition.cjs +2800 -1155
- package/dist/functions/canvas/canvas-transition.d.cts +5 -1
- package/dist/functions/canvas/canvas-transition.d.ts +5 -1
- package/dist/functions/canvas/canvas-transition.js +20 -17
- package/dist/functions/canvas/canvas-utility.cjs +2914 -823
- package/dist/functions/canvas/canvas-utility.js +20 -17
- package/dist/functions/canvas/image-container-utility.cjs +64548 -0
- package/dist/functions/canvas/image-container-utility.d.cts +38 -0
- package/dist/functions/canvas/image-container-utility.d.ts +38 -0
- package/dist/functions/canvas/image-container-utility.js +44 -0
- package/dist/functions/canvas/image-utility.cjs +3321 -1158
- package/dist/functions/canvas/image-utility.d.cts +5 -7
- package/dist/functions/canvas/image-utility.d.ts +5 -7
- package/dist/functions/canvas/image-utility.js +20 -17
- package/dist/functions/canvas/video-utility.cjs +2950 -765
- package/dist/functions/canvas/video-utility.d.cts +5 -7
- package/dist/functions/canvas/video-utility.d.ts +5 -7
- package/dist/functions/canvas/video-utility.js +20 -17
- package/dist/functions/dialogue-utility.cjs +2995 -795
- package/dist/functions/dialogue-utility.d.cts +1 -1
- package/dist/functions/dialogue-utility.d.ts +1 -1
- package/dist/functions/dialogue-utility.js +20 -17
- package/dist/functions/flags-utility.cjs +2975 -775
- package/dist/functions/flags-utility.js +20 -17
- package/dist/functions/game-utility.cjs +2995 -795
- package/dist/functions/game-utility.js +20 -17
- package/dist/functions/index.cjs +2542 -997
- package/dist/functions/index.d.cts +9 -6
- package/dist/functions/index.d.ts +9 -6
- package/dist/functions/index.js +24 -17
- package/dist/functions/saves-utility.cjs +2986 -789
- package/dist/functions/saves-utility.d.cts +6 -2
- package/dist/functions/saves-utility.d.ts +6 -2
- package/dist/functions/saves-utility.js +20 -17
- package/dist/functions/sound-utility.cjs +13 -8
- package/dist/functions/sound-utility.js +10 -10
- package/dist/functions/texture-utility.cjs +3294 -1094
- package/dist/functions/texture-utility.d.cts +8 -3
- package/dist/functions/texture-utility.d.ts +8 -3
- package/dist/functions/texture-utility.js +22 -19
- package/dist/index.cjs +3490 -3079
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +31 -37
- package/dist/interface/HistoryStep.d.cts +7 -3
- package/dist/interface/HistoryStep.d.ts +7 -3
- package/dist/interface/SaveData.d.cts +6 -2
- package/dist/interface/SaveData.d.ts +6 -2
- package/dist/interface/canvas/canvas-memory.d.cts +5 -1
- package/dist/interface/canvas/canvas-memory.d.ts +5 -1
- package/dist/interface/canvas/canvas-options.cjs +18 -0
- package/dist/interface/canvas/canvas-options.d.cts +8 -0
- package/dist/interface/canvas/canvas-options.d.ts +8 -0
- package/dist/interface/canvas/canvas-options.js +0 -0
- package/dist/interface/export/ExportedCanvas.d.cts +5 -1
- package/dist/interface/export/ExportedCanvas.d.ts +5 -1
- package/dist/interface/export/ExportedStep.d.cts +6 -2
- package/dist/interface/export/ExportedStep.d.ts +6 -2
- package/dist/interface/index.d.cts +6 -2
- package/dist/interface/index.d.ts +6 -2
- package/dist/labels/BaseCanvasElementTestLabel.cjs +3169 -1238
- package/dist/labels/BaseCanvasElementTestLabel.d.cts +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.d.ts +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.js +20 -19
- package/dist/labels/CanvasEventsTestLabel.cjs +3121 -1229
- package/dist/labels/CanvasEventsTestLabel.d.cts +4 -3
- package/dist/labels/CanvasEventsTestLabel.d.ts +4 -3
- package/dist/labels/CanvasEventsTestLabel.js +20 -19
- package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +3195 -2934
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.cts +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +20 -29
- package/dist/labels/ImagesAnimationsTestLabel.cjs +3767 -2886
- package/dist/labels/ImagesAnimationsTestLabel.d.cts +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.d.ts +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.js +20 -19
- package/dist/labels/InputTestLabel.cjs +3062 -1051
- package/dist/labels/InputTestLabel.d.cts +1 -1
- package/dist/labels/InputTestLabel.d.ts +1 -1
- package/dist/labels/InputTestLabel.js +20 -19
- package/dist/labels/MarkdownTest.cjs +3010 -1051
- package/dist/labels/MarkdownTest.d.cts +1 -1
- package/dist/labels/MarkdownTest.d.ts +1 -1
- package/dist/labels/MarkdownTest.js +20 -19
- package/dist/labels/SoundTestLabel.cjs +3028 -1052
- package/dist/labels/SoundTestLabel.d.cts +1 -1
- package/dist/labels/SoundTestLabel.d.ts +1 -1
- package/dist/labels/SoundTestLabel.js +20 -19
- package/dist/labels/StartLabel.cjs +3175 -2918
- package/dist/labels/StartLabel.d.cts +1 -1
- package/dist/labels/StartLabel.d.ts +1 -1
- package/dist/labels/StartLabel.js +20 -29
- package/dist/labels/StepLabelTest.cjs +3066 -1051
- package/dist/labels/StepLabelTest.d.cts +1 -1
- package/dist/labels/StepLabelTest.d.ts +1 -1
- package/dist/labels/StepLabelTest.js +20 -19
- package/dist/labels/TestConstant.cjs +19 -62490
- package/dist/labels/TestConstant.d.cts +1 -1
- package/dist/labels/TestConstant.d.ts +1 -1
- package/dist/labels/TestConstant.js +1 -34
- package/dist/labels/VideoTestLabel.cjs +3568 -1755
- package/dist/labels/VideoTestLabel.d.cts +1 -1
- package/dist/labels/VideoTestLabel.d.ts +1 -1
- package/dist/labels/VideoTestLabel.js +20 -19
- package/dist/labels/index.cjs +3095 -2836
- package/dist/labels/index.d.cts +1 -1
- package/dist/labels/index.d.ts +1 -1
- package/dist/labels/index.js +22 -31
- package/dist/{lib-3RYI6KLU.js → lib-6FCVILMQ.js} +8 -8
- package/dist/managers/CanvasManager.cjs +3190 -994
- package/dist/managers/CanvasManager.d.cts +14 -5
- package/dist/managers/CanvasManager.d.ts +14 -5
- package/dist/managers/CanvasManager.js +20 -17
- package/dist/managers/CanvasManagerStatic.cjs +27 -24
- package/dist/managers/CanvasManagerStatic.d.cts +5 -1
- package/dist/managers/CanvasManagerStatic.d.ts +5 -1
- package/dist/managers/CanvasManagerStatic.js +9 -9
- package/dist/managers/NarrationManager.cjs +3201 -1001
- package/dist/managers/NarrationManager.d.cts +9 -5
- package/dist/managers/NarrationManager.d.ts +9 -5
- package/dist/managers/NarrationManager.js +20 -17
- package/dist/managers/NarrationManagerStatic.cjs +2995 -795
- package/dist/managers/NarrationManagerStatic.d.cts +6 -2
- package/dist/managers/NarrationManagerStatic.d.ts +6 -2
- package/dist/managers/NarrationManagerStatic.js +20 -17
- package/dist/managers/SoundManager.cjs +2995 -795
- package/dist/managers/SoundManager.js +20 -17
- package/dist/managers/StorageManager.cjs +2995 -795
- package/dist/managers/StorageManager.d.cts +1 -1
- package/dist/managers/StorageManager.d.ts +1 -1
- package/dist/managers/StorageManager.js +20 -17
- package/dist/managers/index.cjs +2995 -795
- package/dist/managers/index.d.cts +9 -5
- package/dist/managers/index.d.ts +9 -5
- package/dist/managers/index.js +20 -17
- package/dist/types/ChoiceMenuOptionsType.d.cts +1 -1
- package/dist/types/ChoiceMenuOptionsType.d.ts +1 -1
- package/dist/types/ContainerChild.cjs +18 -0
- package/dist/types/ContainerChild.d.cts +8 -0
- package/dist/types/ContainerChild.d.ts +8 -0
- package/dist/types/ContainerChild.js +0 -0
- package/dist/types/index.d.cts +7 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/webworkerAll-GSRT3S6X.js +5 -0
- package/package.json +3 -3
- package/dist/WebGLRenderer-5BKGXQES.js +0 -9
- package/dist/WebGPURenderer-4KX5DMCU.js +0 -10
- package/dist/canvas-memory-CR4pUil8.d.ts +0 -124
- package/dist/canvas-memory-OfInZ26f.d.cts +0 -124
- package/dist/chunk-7LB7BGV4.js +0 -71
- package/dist/chunk-AWRTCKJA.js +0 -529
- package/dist/chunk-D2MA4Z4A.js +0 -143
- package/dist/chunk-KE3MQQ4Z.js +0 -208
- package/dist/chunk-PS43HOF5.js +0 -84
- package/dist/chunk-QYFOYMQ4.js +0 -57
- package/dist/chunk-V6WHKOER.js +0 -28
- package/dist/chunk-YGRLIZKA.js +0 -126
- package/dist/chunk-ZLZ2VQQW.js +0 -32
- package/dist/webworkerAll-3P3Z2PJC.js +0 -5
package/README.md
CHANGED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { ContainerOptions, PointData, SpriteOptions, TextOptions, Container, Sprite as Sprite$1, Texture, ContainerEvents, ContainerChild as ContainerChild$1, EventEmitter, TextureSourceLike, TextureSource, ObservablePoint } from 'pixi.js';
|
|
2
|
+
import TextureMemory from './interface/canvas/TextureMemory.cjs';
|
|
3
|
+
import AdditionalPositionsExtension, { AdditionalPositionsExtensionProps } from './classes/canvas/AdditionalPositions.cjs';
|
|
4
|
+
import { AnchorExtensionProps } from './classes/canvas/AnchorExtension.cjs';
|
|
5
|
+
import CanvasEventNamesType from './types/CanvasEventNamesType.cjs';
|
|
6
|
+
import CanvasEvent from './classes/CanvasEvent.cjs';
|
|
7
|
+
import { EventIdType } from './types/EventIdType.cjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Interface for the canvas base memory
|
|
11
|
+
*/
|
|
12
|
+
interface CanvasBaseItemMemory {
|
|
13
|
+
pixivnId: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface for the canvas container memory
|
|
17
|
+
*/
|
|
18
|
+
interface ContainerMemory<C extends ContainerChild = ContainerChild> extends ContainerOptions<C>, CanvasBaseItemMemory {
|
|
19
|
+
elements: CanvasBaseItemMemory[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Interface for the canvas container memory
|
|
23
|
+
*/
|
|
24
|
+
interface ImageContainerMemory extends ContainerMemory<ImageSprite> {
|
|
25
|
+
elements: ImageSpriteMemory[];
|
|
26
|
+
anchor?: PointData;
|
|
27
|
+
align?: Partial<PointData>;
|
|
28
|
+
percentagePosition?: Partial<PointData>;
|
|
29
|
+
loadIsStarted: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface SpriteBaseMemory extends SpriteOptions, CanvasBaseItemMemory {
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
textureImage?: TextureMemory;
|
|
36
|
+
textureData: TextureMemory;
|
|
37
|
+
onEvents: {
|
|
38
|
+
[name: CanvasEventNamesType]: EventIdType;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Interface for the canvas sprite memory
|
|
43
|
+
*/
|
|
44
|
+
interface SpriteMemory extends SpriteBaseMemory {
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Interface for the canvas text memory
|
|
48
|
+
*/
|
|
49
|
+
interface TextMemory extends TextOptions, CanvasBaseItemMemory {
|
|
50
|
+
onEvents: {
|
|
51
|
+
[name: CanvasEventNamesType]: EventIdType;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The memory of the image. It uses for save the state of the image.
|
|
56
|
+
*/
|
|
57
|
+
interface ImageSpriteMemory extends SpriteBaseMemory {
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated use SpriteBaseMemory.textureAlias
|
|
60
|
+
*/
|
|
61
|
+
imageLink?: string;
|
|
62
|
+
align?: Partial<PointData>;
|
|
63
|
+
percentagePosition?: Partial<PointData>;
|
|
64
|
+
loadIsStarted: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The memory of the video. It uses for save the state of the video.
|
|
68
|
+
*/
|
|
69
|
+
interface VideoSpriteMemory extends ImageSpriteMemory {
|
|
70
|
+
loop: boolean;
|
|
71
|
+
paused: boolean;
|
|
72
|
+
currentTime: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface ImageContainerOptions<C extends ContainerChild = ContainerChild> extends ContainerOptions<C>, AnchorExtensionProps, AdditionalPositionsExtensionProps {
|
|
76
|
+
}
|
|
77
|
+
interface ImageSpriteOptions extends SpriteOptions, AdditionalPositionsExtensionProps {
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* This class is used to create a canvas element to add into a Pixi Application.
|
|
82
|
+
* You can use {@link canvas.add()} to add this element into the application.
|
|
83
|
+
* This class should be implemented and the memory method should be overridden.
|
|
84
|
+
* You must use the {@link canvasElementDecorator} to register the canvas in the game.
|
|
85
|
+
* In Ren'Py is a displayable.
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* \@canvasElementDecorator() // this is equivalent to canvasElementDecorator("CanvasExample")
|
|
89
|
+
* export class CanvasExample extends Container implements CanvasBaseItem<ICanvasExampleMemory> {
|
|
90
|
+
* get memory(): ICanvasExampleMemory {
|
|
91
|
+
* return {
|
|
92
|
+
* pixivnId: "CanvasExample",
|
|
93
|
+
* // ... other properties
|
|
94
|
+
* }
|
|
95
|
+
* }
|
|
96
|
+
* set memory(value: ICanvasExampleMemory) {
|
|
97
|
+
* // ... set other properties
|
|
98
|
+
* }
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
declare class CanvasBaseItem<T2 extends CanvasBaseItemMemory> extends Container {
|
|
103
|
+
/**
|
|
104
|
+
* This method return the memory of the canvas element.
|
|
105
|
+
*/
|
|
106
|
+
get memory(): T2;
|
|
107
|
+
/**
|
|
108
|
+
* This method set the memory of the canvas element.
|
|
109
|
+
*/
|
|
110
|
+
set memory(_value: T2);
|
|
111
|
+
/**
|
|
112
|
+
* This method set the memory of the canvas element. Is equivalent to the {@link CanvasBaseItem.memory} method, but this method is async.
|
|
113
|
+
*/
|
|
114
|
+
setMemory(_value: T2): Promise<void> | void;
|
|
115
|
+
/**
|
|
116
|
+
* Get the id of the canvas element. This variable is used in the system to get the canvas element by id, {@link getCanvasElementInstanceById}
|
|
117
|
+
*/
|
|
118
|
+
pixivnId: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 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,
|
|
123
|
+
* but it has the ability to be saved and loaded by the Pixi’VN library.
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
|
|
127
|
+
* const sprite = Sprite.from(texture);
|
|
128
|
+
*
|
|
129
|
+
* sprite.anchor.set(0.5);
|
|
130
|
+
* sprite.x = canvas.screen.width / 2;
|
|
131
|
+
* sprite.y = canvas.screen.height / 2;
|
|
132
|
+
*
|
|
133
|
+
* sprite.eventMode = 'static';
|
|
134
|
+
* sprite.cursor = 'pointer';
|
|
135
|
+
* sprite.onEvent('pointerdown', EventTest);
|
|
136
|
+
*
|
|
137
|
+
* canvas.add("bunny", sprite);
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare class Sprite<Memory extends SpriteOptions & CanvasBaseItemMemory = SpriteMemory> extends Sprite$1 implements CanvasBaseItem<Memory | SpriteMemory> {
|
|
141
|
+
constructor(options?: SpriteOptions | Texture);
|
|
142
|
+
pixivnId: string;
|
|
143
|
+
private _textureAlias?;
|
|
144
|
+
get textureAlias(): string;
|
|
145
|
+
set textureAlias(value: string);
|
|
146
|
+
get memory(): Memory | SpriteMemory;
|
|
147
|
+
set memory(value: SpriteMemory);
|
|
148
|
+
setMemory(value: Memory | SpriteMemory): Promise<void>;
|
|
149
|
+
private _onEvents;
|
|
150
|
+
get onEvents(): {
|
|
151
|
+
[name: string]: string;
|
|
152
|
+
[name: symbol]: string;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* is same function as on(), but it keeps in memory the children.
|
|
156
|
+
* @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
|
|
157
|
+
* @param eventClass The class that extends CanvasEvent.
|
|
158
|
+
* @returns
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* \@eventDecorator()
|
|
162
|
+
* export class EventTest extends CanvasEvent<Sprite> {
|
|
163
|
+
* override fn(event: CanvasEventNamesType, sprite: Sprite): void {
|
|
164
|
+
* if (event === 'pointerdown') {
|
|
165
|
+
* sprite.scale.x *= 1.25;
|
|
166
|
+
* sprite.scale.y *= 1.25;
|
|
167
|
+
* }
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* ```typescript
|
|
173
|
+
* let sprite = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
174
|
+
* await sprite.load()
|
|
175
|
+
*
|
|
176
|
+
* sprite.eventMode = 'static';
|
|
177
|
+
* sprite.cursor = 'pointer';
|
|
178
|
+
* sprite.onEvent('pointerdown', EventTest);
|
|
179
|
+
*
|
|
180
|
+
* canvas.add("bunny", sprite);
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
onEvent<T extends CanvasEventNamesType, T2 extends typeof CanvasEvent<typeof this>>(event: T, eventClass: T2): this;
|
|
184
|
+
/**
|
|
185
|
+
* on() does not keep in memory the event class, use onEvent() instead
|
|
186
|
+
* @deprecated
|
|
187
|
+
* @private
|
|
188
|
+
* @param event
|
|
189
|
+
* @param fn
|
|
190
|
+
* @param context
|
|
191
|
+
*/
|
|
192
|
+
on<T extends keyof ContainerEvents<ContainerChild$1> | keyof {
|
|
193
|
+
[K: symbol]: any;
|
|
194
|
+
[K: {} & string]: any;
|
|
195
|
+
}>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild$1> & {
|
|
196
|
+
[K: symbol]: any;
|
|
197
|
+
[K: {} & string]: any;
|
|
198
|
+
}>[Extract<T, keyof ContainerEvents<ContainerChild$1> | keyof {
|
|
199
|
+
[K: symbol]: any;
|
|
200
|
+
[K: {} & string]: any;
|
|
201
|
+
}>]) => void, context?: any): this;
|
|
202
|
+
static from(source: Texture | TextureSourceLike, skipCache?: boolean): Sprite<any>;
|
|
203
|
+
}
|
|
204
|
+
declare function getMemorySprite<T extends Sprite<any>>(element: T | Sprite<any>): SpriteMemory;
|
|
205
|
+
declare function setMemorySprite<Memory extends SpriteBaseMemory>(element: Sprite<any>, memory: Memory | {}, options?: {
|
|
206
|
+
half?: () => Promise<void>;
|
|
207
|
+
}): Promise<void>;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* This class is a extension of the {@link Sprite} class, it has the same properties and methods,
|
|
211
|
+
* but it has some features that make texture management easier.
|
|
212
|
+
* You need to use {@link ImageSprite.load()} to show the image in the canvas.
|
|
213
|
+
* This class is used for functions like {@link addImage}, {@link loadImage} and {@link showWithDissolveTransition}.
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* let alien = new ImageSprite({
|
|
217
|
+
* anchor: { x: 0.5, y: 0.5 },
|
|
218
|
+
* x: 100,
|
|
219
|
+
* y: 100,
|
|
220
|
+
* }, 'https://pixijs.com/assets/eggHead.png')
|
|
221
|
+
* await alien.load()
|
|
222
|
+
* canvas.add("alien", alien)
|
|
223
|
+
* ```
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
227
|
+
* alien.anchor.set(0.5);
|
|
228
|
+
* alien.x = 100
|
|
229
|
+
* alien.y = 100
|
|
230
|
+
* await alien.load()
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
declare class ImageSprite<Memory extends ImageSpriteMemory = ImageSpriteMemory> extends Sprite<Memory> implements AdditionalPositionsExtension {
|
|
234
|
+
pixivnId: string;
|
|
235
|
+
constructor(options?: ImageSpriteOptions | Texture | undefined, textureAlias?: string);
|
|
236
|
+
get memory(): ImageSpriteMemory;
|
|
237
|
+
set memory(value: ImageSpriteMemory);
|
|
238
|
+
setMemory(value: ImageSpriteMemory): Promise<void>;
|
|
239
|
+
static from(source: Texture | TextureSourceLike, skipCache?: boolean): ImageSprite<ImageSpriteMemory>;
|
|
240
|
+
private _loadIsStarted;
|
|
241
|
+
get loadIsStarted(): boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Load the image from the link and set the texture of the sprite.
|
|
244
|
+
* @returns A promise that resolves when the image is loaded.
|
|
245
|
+
*/
|
|
246
|
+
load(): Promise<void>;
|
|
247
|
+
set texture(value: Texture<TextureSource<any>>);
|
|
248
|
+
get texture(): Texture<TextureSource<any>>;
|
|
249
|
+
/**
|
|
250
|
+
* Check if the texture is empty.
|
|
251
|
+
* @returns A boolean that is true if the texture is empty.
|
|
252
|
+
*/
|
|
253
|
+
get haveEmptyTexture(): boolean;
|
|
254
|
+
/** AdditionalPositions */
|
|
255
|
+
private _align;
|
|
256
|
+
set align(value: Partial<PointData> | number);
|
|
257
|
+
set xAlign(value: number);
|
|
258
|
+
set yAlign(value: number);
|
|
259
|
+
private _percentagePosition;
|
|
260
|
+
set percentagePosition(value: Partial<PointData> | number);
|
|
261
|
+
set xPercentagePosition(_value: number);
|
|
262
|
+
set yPercentagePosition(_value: number);
|
|
263
|
+
private reloadPosition;
|
|
264
|
+
get position(): ObservablePoint;
|
|
265
|
+
set position(value: ObservablePoint);
|
|
266
|
+
get x(): number;
|
|
267
|
+
set x(value: number);
|
|
268
|
+
get y(): number;
|
|
269
|
+
set y(value: number);
|
|
270
|
+
}
|
|
271
|
+
declare function setMemoryImageSprite(element: ImageSprite, memory: ImageSpriteMemory | {}): Promise<void>;
|
|
272
|
+
|
|
273
|
+
type ContainerChild = Container & CanvasBaseItem<any>;
|
|
274
|
+
|
|
275
|
+
export { CanvasBaseItem as C, ImageSprite as I, Sprite as S, type TextMemory as T, type VideoSpriteMemory as V, type CanvasBaseItemMemory as a, type ContainerMemory as b, type ImageSpriteMemory as c, type SpriteBaseMemory as d, type SpriteMemory as e, type ImageContainerMemory as f, type ImageContainerOptions as g, type ImageSpriteOptions as h, type ContainerChild as i, getMemorySprite as j, setMemoryImageSprite as k, setMemorySprite as s };
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { ContainerOptions, PointData, SpriteOptions, TextOptions, Container, Sprite as Sprite$1, Texture, ContainerEvents, ContainerChild as ContainerChild$1, EventEmitter, TextureSourceLike, TextureSource, ObservablePoint } from 'pixi.js';
|
|
2
|
+
import TextureMemory from './interface/canvas/TextureMemory.js';
|
|
3
|
+
import AdditionalPositionsExtension, { AdditionalPositionsExtensionProps } from './classes/canvas/AdditionalPositions.js';
|
|
4
|
+
import { AnchorExtensionProps } from './classes/canvas/AnchorExtension.js';
|
|
5
|
+
import CanvasEventNamesType from './types/CanvasEventNamesType.js';
|
|
6
|
+
import CanvasEvent from './classes/CanvasEvent.js';
|
|
7
|
+
import { EventIdType } from './types/EventIdType.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Interface for the canvas base memory
|
|
11
|
+
*/
|
|
12
|
+
interface CanvasBaseItemMemory {
|
|
13
|
+
pixivnId: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface for the canvas container memory
|
|
17
|
+
*/
|
|
18
|
+
interface ContainerMemory<C extends ContainerChild = ContainerChild> extends ContainerOptions<C>, CanvasBaseItemMemory {
|
|
19
|
+
elements: CanvasBaseItemMemory[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Interface for the canvas container memory
|
|
23
|
+
*/
|
|
24
|
+
interface ImageContainerMemory extends ContainerMemory<ImageSprite> {
|
|
25
|
+
elements: ImageSpriteMemory[];
|
|
26
|
+
anchor?: PointData;
|
|
27
|
+
align?: Partial<PointData>;
|
|
28
|
+
percentagePosition?: Partial<PointData>;
|
|
29
|
+
loadIsStarted: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface SpriteBaseMemory extends SpriteOptions, CanvasBaseItemMemory {
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
textureImage?: TextureMemory;
|
|
36
|
+
textureData: TextureMemory;
|
|
37
|
+
onEvents: {
|
|
38
|
+
[name: CanvasEventNamesType]: EventIdType;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Interface for the canvas sprite memory
|
|
43
|
+
*/
|
|
44
|
+
interface SpriteMemory extends SpriteBaseMemory {
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Interface for the canvas text memory
|
|
48
|
+
*/
|
|
49
|
+
interface TextMemory extends TextOptions, CanvasBaseItemMemory {
|
|
50
|
+
onEvents: {
|
|
51
|
+
[name: CanvasEventNamesType]: EventIdType;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The memory of the image. It uses for save the state of the image.
|
|
56
|
+
*/
|
|
57
|
+
interface ImageSpriteMemory extends SpriteBaseMemory {
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated use SpriteBaseMemory.textureAlias
|
|
60
|
+
*/
|
|
61
|
+
imageLink?: string;
|
|
62
|
+
align?: Partial<PointData>;
|
|
63
|
+
percentagePosition?: Partial<PointData>;
|
|
64
|
+
loadIsStarted: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The memory of the video. It uses for save the state of the video.
|
|
68
|
+
*/
|
|
69
|
+
interface VideoSpriteMemory extends ImageSpriteMemory {
|
|
70
|
+
loop: boolean;
|
|
71
|
+
paused: boolean;
|
|
72
|
+
currentTime: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface ImageContainerOptions<C extends ContainerChild = ContainerChild> extends ContainerOptions<C>, AnchorExtensionProps, AdditionalPositionsExtensionProps {
|
|
76
|
+
}
|
|
77
|
+
interface ImageSpriteOptions extends SpriteOptions, AdditionalPositionsExtensionProps {
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* This class is used to create a canvas element to add into a Pixi Application.
|
|
82
|
+
* You can use {@link canvas.add()} to add this element into the application.
|
|
83
|
+
* This class should be implemented and the memory method should be overridden.
|
|
84
|
+
* You must use the {@link canvasElementDecorator} to register the canvas in the game.
|
|
85
|
+
* In Ren'Py is a displayable.
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* \@canvasElementDecorator() // this is equivalent to canvasElementDecorator("CanvasExample")
|
|
89
|
+
* export class CanvasExample extends Container implements CanvasBaseItem<ICanvasExampleMemory> {
|
|
90
|
+
* get memory(): ICanvasExampleMemory {
|
|
91
|
+
* return {
|
|
92
|
+
* pixivnId: "CanvasExample",
|
|
93
|
+
* // ... other properties
|
|
94
|
+
* }
|
|
95
|
+
* }
|
|
96
|
+
* set memory(value: ICanvasExampleMemory) {
|
|
97
|
+
* // ... set other properties
|
|
98
|
+
* }
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
declare class CanvasBaseItem<T2 extends CanvasBaseItemMemory> extends Container {
|
|
103
|
+
/**
|
|
104
|
+
* This method return the memory of the canvas element.
|
|
105
|
+
*/
|
|
106
|
+
get memory(): T2;
|
|
107
|
+
/**
|
|
108
|
+
* This method set the memory of the canvas element.
|
|
109
|
+
*/
|
|
110
|
+
set memory(_value: T2);
|
|
111
|
+
/**
|
|
112
|
+
* This method set the memory of the canvas element. Is equivalent to the {@link CanvasBaseItem.memory} method, but this method is async.
|
|
113
|
+
*/
|
|
114
|
+
setMemory(_value: T2): Promise<void> | void;
|
|
115
|
+
/**
|
|
116
|
+
* Get the id of the canvas element. This variable is used in the system to get the canvas element by id, {@link getCanvasElementInstanceById}
|
|
117
|
+
*/
|
|
118
|
+
pixivnId: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 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,
|
|
123
|
+
* but it has the ability to be saved and loaded by the Pixi’VN library.
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
|
|
127
|
+
* const sprite = Sprite.from(texture);
|
|
128
|
+
*
|
|
129
|
+
* sprite.anchor.set(0.5);
|
|
130
|
+
* sprite.x = canvas.screen.width / 2;
|
|
131
|
+
* sprite.y = canvas.screen.height / 2;
|
|
132
|
+
*
|
|
133
|
+
* sprite.eventMode = 'static';
|
|
134
|
+
* sprite.cursor = 'pointer';
|
|
135
|
+
* sprite.onEvent('pointerdown', EventTest);
|
|
136
|
+
*
|
|
137
|
+
* canvas.add("bunny", sprite);
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare class Sprite<Memory extends SpriteOptions & CanvasBaseItemMemory = SpriteMemory> extends Sprite$1 implements CanvasBaseItem<Memory | SpriteMemory> {
|
|
141
|
+
constructor(options?: SpriteOptions | Texture);
|
|
142
|
+
pixivnId: string;
|
|
143
|
+
private _textureAlias?;
|
|
144
|
+
get textureAlias(): string;
|
|
145
|
+
set textureAlias(value: string);
|
|
146
|
+
get memory(): Memory | SpriteMemory;
|
|
147
|
+
set memory(value: SpriteMemory);
|
|
148
|
+
setMemory(value: Memory | SpriteMemory): Promise<void>;
|
|
149
|
+
private _onEvents;
|
|
150
|
+
get onEvents(): {
|
|
151
|
+
[name: string]: string;
|
|
152
|
+
[name: symbol]: string;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* is same function as on(), but it keeps in memory the children.
|
|
156
|
+
* @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
|
|
157
|
+
* @param eventClass The class that extends CanvasEvent.
|
|
158
|
+
* @returns
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* \@eventDecorator()
|
|
162
|
+
* export class EventTest extends CanvasEvent<Sprite> {
|
|
163
|
+
* override fn(event: CanvasEventNamesType, sprite: Sprite): void {
|
|
164
|
+
* if (event === 'pointerdown') {
|
|
165
|
+
* sprite.scale.x *= 1.25;
|
|
166
|
+
* sprite.scale.y *= 1.25;
|
|
167
|
+
* }
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* ```typescript
|
|
173
|
+
* let sprite = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
174
|
+
* await sprite.load()
|
|
175
|
+
*
|
|
176
|
+
* sprite.eventMode = 'static';
|
|
177
|
+
* sprite.cursor = 'pointer';
|
|
178
|
+
* sprite.onEvent('pointerdown', EventTest);
|
|
179
|
+
*
|
|
180
|
+
* canvas.add("bunny", sprite);
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
onEvent<T extends CanvasEventNamesType, T2 extends typeof CanvasEvent<typeof this>>(event: T, eventClass: T2): this;
|
|
184
|
+
/**
|
|
185
|
+
* on() does not keep in memory the event class, use onEvent() instead
|
|
186
|
+
* @deprecated
|
|
187
|
+
* @private
|
|
188
|
+
* @param event
|
|
189
|
+
* @param fn
|
|
190
|
+
* @param context
|
|
191
|
+
*/
|
|
192
|
+
on<T extends keyof ContainerEvents<ContainerChild$1> | keyof {
|
|
193
|
+
[K: symbol]: any;
|
|
194
|
+
[K: {} & string]: any;
|
|
195
|
+
}>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild$1> & {
|
|
196
|
+
[K: symbol]: any;
|
|
197
|
+
[K: {} & string]: any;
|
|
198
|
+
}>[Extract<T, keyof ContainerEvents<ContainerChild$1> | keyof {
|
|
199
|
+
[K: symbol]: any;
|
|
200
|
+
[K: {} & string]: any;
|
|
201
|
+
}>]) => void, context?: any): this;
|
|
202
|
+
static from(source: Texture | TextureSourceLike, skipCache?: boolean): Sprite<any>;
|
|
203
|
+
}
|
|
204
|
+
declare function getMemorySprite<T extends Sprite<any>>(element: T | Sprite<any>): SpriteMemory;
|
|
205
|
+
declare function setMemorySprite<Memory extends SpriteBaseMemory>(element: Sprite<any>, memory: Memory | {}, options?: {
|
|
206
|
+
half?: () => Promise<void>;
|
|
207
|
+
}): Promise<void>;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* This class is a extension of the {@link Sprite} class, it has the same properties and methods,
|
|
211
|
+
* but it has some features that make texture management easier.
|
|
212
|
+
* You need to use {@link ImageSprite.load()} to show the image in the canvas.
|
|
213
|
+
* This class is used for functions like {@link addImage}, {@link loadImage} and {@link showWithDissolveTransition}.
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* let alien = new ImageSprite({
|
|
217
|
+
* anchor: { x: 0.5, y: 0.5 },
|
|
218
|
+
* x: 100,
|
|
219
|
+
* y: 100,
|
|
220
|
+
* }, 'https://pixijs.com/assets/eggHead.png')
|
|
221
|
+
* await alien.load()
|
|
222
|
+
* canvas.add("alien", alien)
|
|
223
|
+
* ```
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
|
|
227
|
+
* alien.anchor.set(0.5);
|
|
228
|
+
* alien.x = 100
|
|
229
|
+
* alien.y = 100
|
|
230
|
+
* await alien.load()
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
declare class ImageSprite<Memory extends ImageSpriteMemory = ImageSpriteMemory> extends Sprite<Memory> implements AdditionalPositionsExtension {
|
|
234
|
+
pixivnId: string;
|
|
235
|
+
constructor(options?: ImageSpriteOptions | Texture | undefined, textureAlias?: string);
|
|
236
|
+
get memory(): ImageSpriteMemory;
|
|
237
|
+
set memory(value: ImageSpriteMemory);
|
|
238
|
+
setMemory(value: ImageSpriteMemory): Promise<void>;
|
|
239
|
+
static from(source: Texture | TextureSourceLike, skipCache?: boolean): ImageSprite<ImageSpriteMemory>;
|
|
240
|
+
private _loadIsStarted;
|
|
241
|
+
get loadIsStarted(): boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Load the image from the link and set the texture of the sprite.
|
|
244
|
+
* @returns A promise that resolves when the image is loaded.
|
|
245
|
+
*/
|
|
246
|
+
load(): Promise<void>;
|
|
247
|
+
set texture(value: Texture<TextureSource<any>>);
|
|
248
|
+
get texture(): Texture<TextureSource<any>>;
|
|
249
|
+
/**
|
|
250
|
+
* Check if the texture is empty.
|
|
251
|
+
* @returns A boolean that is true if the texture is empty.
|
|
252
|
+
*/
|
|
253
|
+
get haveEmptyTexture(): boolean;
|
|
254
|
+
/** AdditionalPositions */
|
|
255
|
+
private _align;
|
|
256
|
+
set align(value: Partial<PointData> | number);
|
|
257
|
+
set xAlign(value: number);
|
|
258
|
+
set yAlign(value: number);
|
|
259
|
+
private _percentagePosition;
|
|
260
|
+
set percentagePosition(value: Partial<PointData> | number);
|
|
261
|
+
set xPercentagePosition(_value: number);
|
|
262
|
+
set yPercentagePosition(_value: number);
|
|
263
|
+
private reloadPosition;
|
|
264
|
+
get position(): ObservablePoint;
|
|
265
|
+
set position(value: ObservablePoint);
|
|
266
|
+
get x(): number;
|
|
267
|
+
set x(value: number);
|
|
268
|
+
get y(): number;
|
|
269
|
+
set y(value: number);
|
|
270
|
+
}
|
|
271
|
+
declare function setMemoryImageSprite(element: ImageSprite, memory: ImageSpriteMemory | {}): Promise<void>;
|
|
272
|
+
|
|
273
|
+
type ContainerChild = Container & CanvasBaseItem<any>;
|
|
274
|
+
|
|
275
|
+
export { CanvasBaseItem as C, ImageSprite as I, Sprite as S, type TextMemory as T, type VideoSpriteMemory as V, type CanvasBaseItemMemory as a, type ContainerMemory as b, type ImageSpriteMemory as c, type SpriteBaseMemory as d, type SpriteMemory as e, type ImageContainerMemory as f, type ImageContainerOptions as g, type ImageSpriteOptions as h, type ContainerChild as i, getMemorySprite as j, setMemoryImageSprite as k, setMemorySprite as s };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-Y3WNBACN.js";
|
|
2
2
|
import {
|
|
3
3
|
AccessibilitySystem,
|
|
4
4
|
EventSystem,
|
|
5
5
|
FederatedContainer,
|
|
6
6
|
accessibilityTarget
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-SAUNZQHZ.js";
|
|
8
|
+
import "./chunk-CAWOWL3P.js";
|
|
9
|
+
import "./chunk-5JREOVCG.js";
|
|
10
10
|
import {
|
|
11
11
|
Container,
|
|
12
12
|
extensions
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PP3SBC3C.js";
|
|
14
14
|
import "./chunk-N342G4HO.js";
|
|
15
15
|
|
|
16
16
|
// node_modules/pixi.js/lib/accessibility/init.mjs
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
uid,
|
|
43
43
|
v8_0_0,
|
|
44
44
|
warn
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PP3SBC3C.js";
|
|
46
46
|
|
|
47
47
|
// node_modules/pixi.js/lib/filters/Filter.mjs
|
|
48
48
|
var _Filter = class _Filter2 extends Shader {
|
|
@@ -146,7 +146,7 @@ function unsafeEvalSupported() {
|
|
|
146
146
|
try {
|
|
147
147
|
const func = new Function("param1", "param2", "param3", "return param1[param2] === param3;");
|
|
148
148
|
unsafeEval = func({ a: "b" }, "a", "b") === true;
|
|
149
|
-
} catch (
|
|
149
|
+
} catch (_e) {
|
|
150
150
|
unsafeEval = false;
|
|
151
151
|
}
|
|
152
152
|
return unsafeEval;
|
|
@@ -174,12 +174,12 @@ var SystemRunner = class {
|
|
|
174
174
|
this.items = [];
|
|
175
175
|
this._name = name;
|
|
176
176
|
}
|
|
177
|
-
/*
|
|
177
|
+
/* jsdoc/check-param-names */
|
|
178
178
|
/**
|
|
179
179
|
* Dispatch/Broadcast Runner to all listeners added to the queue.
|
|
180
180
|
* @param {...any} params - (optional) parameters to pass to each listener
|
|
181
181
|
*/
|
|
182
|
-
/*
|
|
182
|
+
/* jsdoc/check-param-names */
|
|
183
183
|
emit(a0, a1, a2, a3, a4, a5, a6, a7) {
|
|
184
184
|
const { name, items } = this;
|
|
185
185
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
@@ -1152,7 +1152,7 @@ SpritePipe.extension = {
|
|
|
1152
1152
|
|
|
1153
1153
|
// node_modules/pixi.js/lib/utils/const.mjs
|
|
1154
1154
|
var DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;
|
|
1155
|
-
var VERSION = "8.6.
|
|
1155
|
+
var VERSION = "8.6.4";
|
|
1156
1156
|
|
|
1157
1157
|
// node_modules/pixi.js/lib/utils/global/globalHooks.mjs
|
|
1158
1158
|
var ApplicationInitHook = class {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Container
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PP3SBC3C.js";
|
|
4
4
|
|
|
5
5
|
// src/classes/canvas/CanvasBaseItem.ts
|
|
6
6
|
var CanvasBaseItem = class extends Container {
|
|
@@ -16,6 +16,12 @@ var CanvasBaseItem = class extends Container {
|
|
|
16
16
|
set memory(_value) {
|
|
17
17
|
throw new Error("[Pixi\u2019VN] The method CanvasBaseItems.memory must be overridden");
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* This method set the memory of the canvas element. Is equivalent to the {@link CanvasBaseItem.memory} method, but this method is async.
|
|
21
|
+
*/
|
|
22
|
+
setMemory(_value) {
|
|
23
|
+
throw new Error("[Pixi\u2019VN] The method CanvasBaseItems.memory must be overridden");
|
|
24
|
+
}
|
|
19
25
|
/**
|
|
20
26
|
* Get the id of the canvas element. This variable is used in the system to get the canvas element by id, {@link getCanvasElementInstanceById}
|
|
21
27
|
*/
|