@drincs/pixi-vn 0.8.4 → 0.8.9
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 +36 -27
- package/dist/{chunk-T4KKYU4J.js → chunk-4KV6VMUV.js} +92 -6
- package/dist/{chunk-M6X6FHCH.js → chunk-5A543GJ4.js} +2 -2
- package/dist/{chunk-FYCYVQTG.js → chunk-A4NKPUL5.js} +7 -3
- package/dist/{chunk-2FSBBQFF.js → chunk-BHVKSBFZ.js} +2 -2
- package/dist/{chunk-3FJYYZOP.js → chunk-D3ZQSJKZ.js} +292 -33
- package/dist/{chunk-66F5CGHV.js → chunk-DPUSONJ3.js} +1 -1
- package/dist/{chunk-6SZOXEOR.js → chunk-FHNQBWIZ.js} +1 -1
- package/dist/{chunk-MKN3AKFV.js → chunk-FIQXZ3P3.js} +2 -2
- package/dist/{chunk-UWXYEVOE.js → chunk-FM5SFYXO.js} +1 -1
- package/dist/{chunk-WJ5SUJTD.js → chunk-GEWQS6GP.js} +65 -4
- package/dist/{chunk-ENMHDS5Q.js → chunk-GKLIT4GX.js} +2 -2
- package/dist/{chunk-7IWXRHUU.js → chunk-GNFWXAOE.js} +2 -2
- package/dist/{chunk-D3NHF5OS.js → chunk-PIYIZHZL.js} +1 -1
- package/dist/{chunk-DI77NC2O.js → chunk-SZWI2CBA.js} +3 -3
- package/dist/{chunk-CUYGFKNS.js → chunk-TNQKYUOG.js} +2 -2
- package/dist/classes/CharacterBaseModel.cjs +61 -27
- package/dist/classes/CharacterBaseModel.js +5 -5
- package/dist/classes/CharacterStoredClass.cjs +61 -27
- package/dist/classes/CharacterStoredClass.js +5 -5
- package/dist/classes/ChoiceMenuOption.cjs +60 -26
- package/dist/classes/ChoiceMenuOption.d.cts +1 -1
- package/dist/classes/ChoiceMenuOption.d.ts +1 -1
- package/dist/classes/ChoiceMenuOption.js +5 -5
- package/dist/classes/Sound.cjs +60 -26
- package/dist/classes/Sound.js +5 -5
- package/dist/classes/StoredClassModel.cjs +61 -27
- package/dist/classes/StoredClassModel.js +5 -5
- package/dist/classes/canvas/CanvasAVideo.cjs +60 -26
- package/dist/classes/canvas/CanvasAVideo.d.cts +5 -8
- package/dist/classes/canvas/CanvasAVideo.d.ts +5 -8
- package/dist/classes/canvas/CanvasAVideo.js +5 -5
- package/dist/classes/canvas/CanvasBase.d.cts +4 -2
- package/dist/classes/canvas/CanvasBase.d.ts +4 -2
- package/dist/classes/canvas/CanvasContainer.cjs +60 -26
- package/dist/classes/canvas/CanvasContainer.d.cts +7 -6
- package/dist/classes/canvas/CanvasContainer.d.ts +7 -6
- package/dist/classes/canvas/CanvasContainer.js +5 -5
- package/dist/classes/canvas/CanvasImage.cjs +60 -26
- package/dist/classes/canvas/CanvasImage.d.cts +6 -8
- package/dist/classes/canvas/CanvasImage.d.ts +6 -8
- package/dist/classes/canvas/CanvasImage.js +5 -5
- package/dist/classes/canvas/CanvasSprite.cjs +60 -26
- package/dist/classes/canvas/CanvasSprite.d.cts +7 -8
- package/dist/classes/canvas/CanvasSprite.d.ts +7 -8
- package/dist/classes/canvas/CanvasSprite.js +5 -5
- package/dist/classes/canvas/CanvasText.cjs +60 -26
- package/dist/classes/canvas/CanvasText.d.cts +7 -7
- package/dist/classes/canvas/CanvasText.d.ts +7 -7
- package/dist/classes/canvas/CanvasText.js +5 -5
- package/dist/classes/index.cjs +61 -27
- package/dist/classes/index.d.cts +3 -8
- package/dist/classes/index.d.ts +3 -8
- package/dist/classes/index.js +5 -5
- package/dist/classes/ticker/FadeAlphaTicker.cjs +60 -26
- package/dist/classes/ticker/FadeAlphaTicker.d.cts +3 -2
- package/dist/classes/ticker/FadeAlphaTicker.d.ts +3 -2
- package/dist/classes/ticker/FadeAlphaTicker.js +5 -5
- package/dist/classes/ticker/MoveTicker.cjs +60 -26
- package/dist/classes/ticker/MoveTicker.d.cts +3 -2
- package/dist/classes/ticker/MoveTicker.d.ts +3 -2
- package/dist/classes/ticker/MoveTicker.js +5 -5
- package/dist/classes/ticker/RotateTicker.cjs +60 -26
- package/dist/classes/ticker/RotateTicker.d.cts +3 -2
- package/dist/classes/ticker/RotateTicker.d.ts +3 -2
- package/dist/classes/ticker/RotateTicker.js +5 -5
- package/dist/classes/ticker/TickerBase.cjs +60 -26
- package/dist/classes/ticker/TickerBase.d.cts +70 -4
- package/dist/classes/ticker/TickerBase.d.ts +70 -4
- package/dist/classes/ticker/TickerBase.js +5 -5
- package/dist/classes/ticker/ZoomTicker.cjs +60 -26
- package/dist/classes/ticker/ZoomTicker.d.cts +4 -3
- package/dist/classes/ticker/ZoomTicker.d.ts +4 -3
- package/dist/classes/ticker/ZoomTicker.js +5 -5
- package/dist/classes/ticker/index.cjs +60 -26
- package/dist/classes/ticker/index.d.cts +3 -2
- package/dist/classes/ticker/index.d.ts +3 -2
- package/dist/classes/ticker/index.js +5 -5
- package/dist/constants.cjs +11 -6
- package/dist/constants.d.cts +7 -2
- package/dist/constants.d.ts +7 -2
- package/dist/constants.js +5 -3
- package/dist/decorators/canvas-element-decorator.cjs +60 -26
- package/dist/decorators/canvas-element-decorator.d.cts +3 -1
- package/dist/decorators/canvas-element-decorator.d.ts +3 -1
- package/dist/decorators/canvas-element-decorator.js +5 -5
- package/dist/decorators/event-decorator.d.cts +2 -1
- package/dist/decorators/event-decorator.d.ts +2 -1
- package/dist/decorators/index.cjs +60 -26
- package/dist/decorators/index.d.cts +6 -4
- package/dist/decorators/index.d.ts +6 -4
- package/dist/decorators/index.js +5 -5
- package/dist/decorators/label-decorator.cjs +60 -26
- package/dist/decorators/label-decorator.js +5 -5
- package/dist/decorators/ticker-decorator.d.cts +4 -3
- package/dist/decorators/ticker-decorator.d.ts +4 -3
- package/dist/functions/canvas/canvas-effect.cjs +61821 -0
- package/dist/functions/canvas/canvas-effect.d.cts +15 -0
- package/dist/functions/canvas/canvas-effect.d.ts +15 -0
- package/dist/functions/canvas/canvas-effect.js +40 -0
- package/dist/functions/canvas/canvas-memory-utility.cjs +60 -26
- package/dist/functions/canvas/canvas-memory-utility.d.cts +5 -3
- package/dist/functions/canvas/canvas-memory-utility.d.ts +5 -3
- package/dist/functions/canvas/canvas-memory-utility.js +5 -5
- package/dist/functions/canvas/canvas-transition.cjs +586 -408
- package/dist/functions/canvas/canvas-transition.d.cts +43 -20
- package/dist/functions/canvas/canvas-transition.d.ts +43 -20
- package/dist/functions/canvas/canvas-transition.js +9 -5
- package/dist/functions/canvas/canvas-utility.cjs +60 -26
- package/dist/functions/canvas/canvas-utility.d.cts +2 -2
- package/dist/functions/canvas/canvas-utility.d.ts +2 -2
- package/dist/functions/canvas/canvas-utility.js +5 -5
- package/dist/functions/canvas/image-utility.cjs +60 -26
- package/dist/functions/canvas/image-utility.d.cts +2 -4
- package/dist/functions/canvas/image-utility.d.ts +2 -4
- package/dist/functions/canvas/image-utility.js +5 -5
- package/dist/functions/canvas/video-utility.cjs +60 -26
- package/dist/functions/canvas/video-utility.d.cts +3 -6
- package/dist/functions/canvas/video-utility.d.ts +3 -6
- package/dist/functions/canvas/video-utility.js +5 -5
- package/dist/functions/dialogue-utility.cjs +60 -26
- package/dist/functions/dialogue-utility.d.cts +1 -1
- package/dist/functions/dialogue-utility.d.ts +1 -1
- package/dist/functions/dialogue-utility.js +5 -5
- package/dist/functions/diff-utility.cjs +1 -1
- package/dist/functions/diff-utility.js +2 -2
- package/dist/functions/export-utility.cjs +1 -1
- package/dist/functions/export-utility.js +1 -1
- package/dist/functions/flags-utility.cjs +60 -26
- package/dist/functions/flags-utility.js +5 -5
- package/dist/functions/game-utility.cjs +60 -26
- package/dist/functions/game-utility.js +5 -5
- package/dist/functions/index.cjs +449 -183
- package/dist/functions/index.d.cts +17 -18
- package/dist/functions/index.d.ts +17 -18
- package/dist/functions/index.js +11 -5
- package/dist/functions/saves-utility.cjs +64 -28
- package/dist/functions/saves-utility.d.cts +13 -11
- package/dist/functions/saves-utility.d.ts +13 -11
- package/dist/functions/saves-utility.js +5 -5
- package/dist/functions/ticker-utility.d.cts +1 -1
- package/dist/functions/ticker-utility.d.ts +1 -1
- package/dist/index.cjs +363 -40
- package/dist/index.d.cts +16 -17
- package/dist/index.d.ts +16 -17
- package/dist/index.js +24 -18
- package/dist/interface/{IOpenedLabel.cjs → HistoryStep.cjs} +3 -3
- package/dist/interface/{IHistoryStep.d.cts → HistoryStep.d.cts} +12 -10
- package/dist/interface/{IHistoryStep.d.ts → HistoryStep.d.ts} +12 -10
- package/dist/interface/{IHistoryStep.cjs → OpenedLabel.cjs} +3 -3
- package/dist/interface/{IOpenedLabel.d.cts → OpenedLabel.d.cts} +2 -2
- package/dist/interface/{IOpenedLabel.d.ts → OpenedLabel.d.ts} +2 -2
- package/dist/interface/{ISaveData.cjs → SaveData.cjs} +3 -3
- package/dist/interface/{ISaveData.d.cts → SaveData.d.cts} +11 -9
- package/dist/interface/{ISaveData.d.ts → SaveData.d.ts} +11 -9
- package/dist/interface/{ITicker.cjs → Ticker.cjs} +3 -3
- package/dist/interface/Ticker.d.cts +24 -0
- package/dist/interface/Ticker.d.ts +24 -0
- package/dist/interface/TickerArgs.cjs +18 -0
- package/dist/interface/TickerArgs.d.cts +5 -0
- package/dist/interface/TickerArgs.d.ts +5 -0
- package/dist/interface/TickerHistory.d.cts +3 -4
- package/dist/interface/TickerHistory.d.ts +3 -4
- package/dist/interface/TickerProgrationType.d.cts +7 -6
- package/dist/interface/TickerProgrationType.d.ts +7 -6
- package/dist/interface/TickersSteps.cjs +18 -0
- package/dist/interface/{ITickersSteps.d.cts → TickersSteps.d.cts} +5 -7
- package/dist/interface/{ITickersSteps.d.ts → TickersSteps.d.ts} +5 -7
- package/dist/interface/canvas/TextureMemory.cjs +18 -0
- package/dist/interface/canvas/TextureMemory.d.cts +8 -0
- package/dist/interface/canvas/TextureMemory.d.ts +8 -0
- package/dist/interface/canvas/canvas-memory.cjs +18 -0
- package/dist/interface/canvas/canvas-memory.d.cts +51 -0
- package/dist/interface/canvas/canvas-memory.d.ts +51 -0
- package/dist/interface/canvas/effect-props.cjs +18 -0
- package/dist/interface/canvas/effect-props.d.cts +36 -0
- package/dist/interface/canvas/effect-props.d.ts +36 -0
- package/dist/interface/canvas/transition-props.cjs +18 -0
- package/dist/interface/canvas/transition-props.d.cts +38 -0
- package/dist/interface/canvas/transition-props.d.ts +38 -0
- package/dist/interface/export/ExportedCanvas.d.cts +8 -6
- package/dist/interface/export/ExportedCanvas.d.ts +8 -6
- package/dist/interface/export/ExportedStep.d.cts +12 -10
- package/dist/interface/export/ExportedStep.d.ts +12 -10
- package/dist/interface/index.d.cts +13 -16
- package/dist/interface/index.d.ts +13 -16
- package/dist/labels/BaseCanvasElementTestLabel.cjs +61 -27
- package/dist/labels/BaseCanvasElementTestLabel.js +7 -7
- package/dist/labels/CanvasEventsTestLabel.cjs +61 -27
- package/dist/labels/CanvasEventsTestLabel.d.cts +2 -3
- package/dist/labels/CanvasEventsTestLabel.d.ts +2 -3
- package/dist/labels/CanvasEventsTestLabel.js +7 -7
- package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +1692 -28
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.cts +3 -2
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +3 -2
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +17 -7
- package/dist/labels/ImagesAnimationsTestLabel.cjs +349 -36
- package/dist/labels/ImagesAnimationsTestLabel.js +7 -7
- package/dist/labels/InputTestLabel.cjs +61 -27
- package/dist/labels/InputTestLabel.js +7 -7
- package/dist/labels/MarkdownTest.cjs +61 -27
- package/dist/labels/MarkdownTest.js +7 -7
- package/dist/labels/SoundTestLabel.cjs +61 -27
- package/dist/labels/SoundTestLabel.js +7 -7
- package/dist/labels/StartLabel.cjs +359 -39
- package/dist/labels/StartLabel.js +17 -16
- package/dist/labels/StepLabelTest.cjs +61 -27
- package/dist/labels/StepLabelTest.js +7 -7
- package/dist/labels/TestConstant.cjs +61 -27
- package/dist/labels/TestConstant.js +6 -6
- package/dist/labels/VideoTestLabel.cjs +66 -29
- package/dist/labels/VideoTestLabel.js +7 -7
- package/dist/labels/index.cjs +359 -39
- package/dist/labels/index.js +17 -17
- package/dist/managers/CanvasManager.cjs +60 -26
- package/dist/managers/CanvasManager.d.cts +21 -11
- package/dist/managers/CanvasManager.d.ts +21 -11
- package/dist/managers/CanvasManager.js +5 -5
- package/dist/managers/CanvasManagerStatic.d.cts +7 -6
- package/dist/managers/CanvasManagerStatic.d.ts +7 -6
- package/dist/managers/NarrationManager.cjs +60 -26
- package/dist/managers/NarrationManager.d.cts +10 -8
- package/dist/managers/NarrationManager.d.ts +10 -8
- package/dist/managers/NarrationManager.js +5 -5
- package/dist/managers/NarrationManagerStatic.cjs +60 -26
- package/dist/managers/NarrationManagerStatic.d.cts +16 -14
- package/dist/managers/NarrationManagerStatic.d.ts +16 -14
- package/dist/managers/NarrationManagerStatic.js +5 -5
- package/dist/managers/SoundManager.cjs +60 -26
- package/dist/managers/SoundManager.js +5 -5
- package/dist/managers/StorageManager.cjs +60 -26
- package/dist/managers/StorageManager.js +5 -5
- package/dist/managers/StorageManagerStatic.cjs +1 -1
- package/dist/managers/StorageManagerStatic.js +2 -2
- package/dist/managers/index.cjs +60 -26
- package/dist/managers/index.d.cts +12 -8
- package/dist/managers/index.d.ts +12 -8
- package/dist/managers/index.js +5 -5
- package/dist/types/ChoiceMenuOptionsType.d.cts +1 -1
- package/dist/types/ChoiceMenuOptionsType.d.ts +1 -1
- package/dist/types/ticker/MoveTickerProps.d.cts +8 -2
- package/dist/types/ticker/MoveTickerProps.d.ts +8 -2
- package/dist/types/ticker/RotateTickerProps.d.cts +1 -1
- package/dist/types/ticker/RotateTickerProps.d.ts +1 -1
- package/dist/types/ticker/ZoomTickerProps.d.cts +1 -1
- package/dist/types/ticker/ZoomTickerProps.d.ts +1 -1
- package/package.json +4 -4
- package/dist/TickerBase-DbIg7gDS.d.ts +0 -94
- package/dist/TickerBase-eU4Hvvy0.d.cts +0 -94
- package/dist/chunk-II324FA5.js +0 -101
- package/dist/interface/ITicker.d.cts +0 -4
- package/dist/interface/ITicker.d.ts +0 -4
- package/dist/interface/ITickersSteps.cjs +0 -18
- package/dist/interface/canvas/ICanvasBaseMemory.cjs +0 -18
- package/dist/interface/canvas/ICanvasBaseMemory.d.cts +0 -8
- package/dist/interface/canvas/ICanvasBaseMemory.d.ts +0 -8
- package/dist/interface/canvas/ICanvasContainerMemory.cjs +0 -18
- package/dist/interface/canvas/ICanvasContainerMemory.d.cts +0 -11
- package/dist/interface/canvas/ICanvasContainerMemory.d.ts +0 -11
- package/dist/interface/canvas/ICanvasImageMemory.cjs +0 -18
- package/dist/interface/canvas/ICanvasImageMemory.d.cts +0 -14
- package/dist/interface/canvas/ICanvasImageMemory.d.ts +0 -14
- package/dist/interface/canvas/ICanvasSpriteMemory.cjs +0 -18
- package/dist/interface/canvas/ICanvasSpriteMemory.d.cts +0 -18
- package/dist/interface/canvas/ICanvasSpriteMemory.d.ts +0 -18
- package/dist/interface/canvas/ICanvasTextTextMemory.cjs +0 -18
- package/dist/interface/canvas/ICanvasTextTextMemory.d.cts +0 -14
- package/dist/interface/canvas/ICanvasTextTextMemory.d.ts +0 -14
- package/dist/interface/canvas/ICanvasTextTextMemory.js +0 -0
- package/dist/interface/canvas/ICanvasVideoMemory.cjs +0 -18
- package/dist/interface/canvas/ICanvasVideoMemory.d.cts +0 -17
- package/dist/interface/canvas/ICanvasVideoMemory.d.ts +0 -17
- package/dist/interface/canvas/ICanvasVideoMemory.js +0 -0
- package/dist/interface/canvas/ITextureMemory.cjs +0 -18
- package/dist/interface/canvas/ITextureMemory.d.cts +0 -8
- package/dist/interface/canvas/ITextureMemory.d.ts +0 -8
- package/dist/interface/canvas/ITextureMemory.js +0 -0
- package/dist/interface/canvas/ITransitionProps.cjs +0 -18
- package/dist/interface/canvas/ITransitionProps.d.cts +0 -22
- package/dist/interface/canvas/ITransitionProps.d.ts +0 -22
- package/dist/interface/canvas/ITransitionProps.js +0 -0
- /package/dist/{chunk-JQ2KK52M.js → interface/HistoryStep.js} +0 -0
- /package/dist/interface/{IHistoryStep.js → OpenedLabel.js} +0 -0
- /package/dist/interface/{IOpenedLabel.js → SaveData.js} +0 -0
- /package/dist/interface/{ISaveData.js → Ticker.js} +0 -0
- /package/dist/interface/{ITicker.js → TickerArgs.js} +0 -0
- /package/dist/interface/{ITickersSteps.js → TickersSteps.js} +0 -0
- /package/dist/interface/canvas/{ICanvasBaseMemory.js → TextureMemory.js} +0 -0
- /package/dist/interface/canvas/{ICanvasContainerMemory.js → canvas-memory.js} +0 -0
- /package/dist/interface/canvas/{ICanvasImageMemory.js → effect-props.js} +0 -0
- /package/dist/interface/canvas/{ICanvasSpriteMemory.js → transition-props.js} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-I6TNJEE3.js";
|
|
7
7
|
import {
|
|
8
8
|
StorageManagerStatic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DPUSONJ3.js";
|
|
10
10
|
import {
|
|
11
11
|
CanvasManagerStatic
|
|
12
12
|
} from "./chunk-P44J5BE2.js";
|
|
@@ -33,20 +33,21 @@ import {
|
|
|
33
33
|
} from "./chunk-JTQGULTR.js";
|
|
34
34
|
import {
|
|
35
35
|
restoreDeepDiffChanges
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-FHNQBWIZ.js";
|
|
37
37
|
import {
|
|
38
38
|
createExportableElement
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PIYIZHZL.js";
|
|
40
40
|
import {
|
|
41
41
|
getEventInstanceById,
|
|
42
42
|
getEventTypeById
|
|
43
43
|
} from "./chunk-LEMOIFSV.js";
|
|
44
44
|
import {
|
|
45
|
-
|
|
45
|
+
CANVAS_APP_STAGE_ALIAS,
|
|
46
46
|
Pause,
|
|
47
47
|
Repeat,
|
|
48
|
+
version,
|
|
48
49
|
videoFormats
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-A4NKPUL5.js";
|
|
50
51
|
import {
|
|
51
52
|
Sound,
|
|
52
53
|
SoundLibrary,
|
|
@@ -805,6 +806,10 @@ var CanvasManager = class {
|
|
|
805
806
|
* ```
|
|
806
807
|
*/
|
|
807
808
|
add(alias, canvasElement, options = {}) {
|
|
809
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
810
|
+
console.error(`[Pixi\u2019VN] The alias ${CANVAS_APP_STAGE_ALIAS} is reserved`);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
808
813
|
let ignoreOldStyle = options?.ignoreOldStyle;
|
|
809
814
|
let oldCanvasElement = this.find(alias);
|
|
810
815
|
if (oldCanvasElement) {
|
|
@@ -835,6 +840,10 @@ var CanvasManager = class {
|
|
|
835
840
|
* ```
|
|
836
841
|
*/
|
|
837
842
|
remove(alias, options = {}) {
|
|
843
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
844
|
+
console.error(`[Pixi\u2019VN] The alias ${CANVAS_APP_STAGE_ALIAS} is reserved`);
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
838
847
|
let ignoreTickers = options.ignoreTickers;
|
|
839
848
|
if (typeof alias === "string") {
|
|
840
849
|
alias = [alias];
|
|
@@ -863,6 +872,9 @@ var CanvasManager = class {
|
|
|
863
872
|
* ```
|
|
864
873
|
*/
|
|
865
874
|
find(alias) {
|
|
875
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
876
|
+
return this.app.stage;
|
|
877
|
+
}
|
|
866
878
|
return CanvasManagerStatic._children[alias];
|
|
867
879
|
}
|
|
868
880
|
/**
|
|
@@ -889,16 +901,17 @@ var CanvasManager = class {
|
|
|
889
901
|
this.removeAllTickers();
|
|
890
902
|
}
|
|
891
903
|
/**
|
|
892
|
-
* Edit the alias of a canvas element.
|
|
904
|
+
* Edit the alias of a canvas element. The tickers that are connected to the canvas element will be transferred.
|
|
893
905
|
* @param oldAlias The old alias of the canvas element.
|
|
894
906
|
* @param newAlias The new alias of the canvas element.
|
|
907
|
+
* @param options The options of the canvas element.
|
|
895
908
|
*/
|
|
896
|
-
editAlias(oldAlias, newAlias) {
|
|
909
|
+
editAlias(oldAlias, newAlias, options = {}) {
|
|
897
910
|
if (CanvasManagerStatic._children[oldAlias]) {
|
|
898
911
|
CanvasManagerStatic._children[newAlias] = CanvasManagerStatic._children[oldAlias];
|
|
899
912
|
delete CanvasManagerStatic._children[oldAlias];
|
|
900
913
|
}
|
|
901
|
-
this.transferTickers(oldAlias, newAlias, "move");
|
|
914
|
+
!options.ignoreTickers && this.transferTickers(oldAlias, newAlias, "move");
|
|
902
915
|
}
|
|
903
916
|
/** Edit Tickers Methods */
|
|
904
917
|
/**
|
|
@@ -973,12 +986,16 @@ var CanvasManager = class {
|
|
|
973
986
|
pushTicker(id, tickerData, ticker) {
|
|
974
987
|
CanvasManagerStatic._currentTickers[id] = tickerData;
|
|
975
988
|
tickerData.fn = (t) => {
|
|
976
|
-
if (tickerData.createdByTicketSteps && this.isTickerPaused(tickerData.createdByTicketSteps.canvasElementAlias, tickerData.createdByTicketSteps.id)) {
|
|
977
|
-
return;
|
|
978
|
-
}
|
|
979
989
|
let data = CanvasManagerStatic._currentTickers[id];
|
|
980
990
|
if (data) {
|
|
981
|
-
let canvasElementAliases = data.canvasElementAliases
|
|
991
|
+
let canvasElementAliases = data.canvasElementAliases;
|
|
992
|
+
if (tickerData.createdByTicketSteps) {
|
|
993
|
+
if (this.isTickerPaused(tickerData.createdByTicketSteps.canvasElementAlias, tickerData.createdByTicketSteps.id)) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
} else {
|
|
997
|
+
canvasElementAliases = canvasElementAliases.filter((alias) => !this.isTickerPaused(alias, id));
|
|
998
|
+
}
|
|
982
999
|
ticker?.fn(t, data.args, canvasElementAliases, id);
|
|
983
1000
|
}
|
|
984
1001
|
};
|
|
@@ -1325,15 +1342,19 @@ var CanvasManager = class {
|
|
|
1325
1342
|
});
|
|
1326
1343
|
CanvasManagerStatic._tickersMustBeCompletedBeforeNextStep.stepAlias.forEach(({ alias, id }) => {
|
|
1327
1344
|
let ticker = CanvasManagerStatic._currentTickersSteps[alias];
|
|
1328
|
-
if (ticker && ticker[id]
|
|
1329
|
-
ticker[id].steps.
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1345
|
+
if (ticker && ticker[id]) {
|
|
1346
|
+
if (ticker[id].steps.includes(Repeat)) {
|
|
1347
|
+
console.error(`[Pixi\u2019VN] The ticker alias: ${alias} id: ${id} contains a RepeatType, so it can't be forced to complete`, ticker[id]);
|
|
1348
|
+
} else {
|
|
1349
|
+
ticker[id].steps.forEach((step) => {
|
|
1350
|
+
if (typeof step === "object" && "ticker" in step) {
|
|
1351
|
+
let ticker2 = geTickerInstanceById(step.ticker, step.args, step.duration, step.priority);
|
|
1352
|
+
if (ticker2) {
|
|
1353
|
+
ticker2.onEndOfTicker([alias], id, step.args);
|
|
1354
|
+
}
|
|
1334
1355
|
}
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1337
1358
|
}
|
|
1338
1359
|
});
|
|
1339
1360
|
CanvasManagerStatic._tickersMustBeCompletedBeforeNextStep = { tikersIds: [], stepAlias: [] };
|
|
@@ -1374,6 +1395,7 @@ var CanvasManager = class {
|
|
|
1374
1395
|
tickers: createExportableElement(CanvasManagerStatic.currentTickersWithoutCreatedBySteps),
|
|
1375
1396
|
tickersSteps: createExportableElement(CanvasManagerStatic._currentTickersSteps),
|
|
1376
1397
|
elements: createExportableElement(currentElements),
|
|
1398
|
+
stage: createExportableElement(getMemoryContainer(this.app.stage)),
|
|
1377
1399
|
elementAliasesOrder: createExportableElement(CanvasManagerStatic.childrenAliasesOrder),
|
|
1378
1400
|
tickersOnPause: createExportableElement(CanvasManagerStatic._tickersOnPause)
|
|
1379
1401
|
};
|
|
@@ -1407,6 +1429,11 @@ var CanvasManager = class {
|
|
|
1407
1429
|
console.error("[Pixi\u2019VN] The data does not have the properties elementAliasesOrder and elements");
|
|
1408
1430
|
return;
|
|
1409
1431
|
}
|
|
1432
|
+
if (data.hasOwnProperty("stage") && data.hasOwnProperty("stage")) {
|
|
1433
|
+
setMemoryContainer(this.app.stage, data["stage"]);
|
|
1434
|
+
} else {
|
|
1435
|
+
console.error("[Pixi\u2019VN] The data does not have the properties stage");
|
|
1436
|
+
}
|
|
1410
1437
|
if (data.hasOwnProperty("tickers")) {
|
|
1411
1438
|
let tickers = data["tickers"];
|
|
1412
1439
|
Object.entries(tickers).forEach(([oldId, t]) => {
|
|
@@ -1687,8 +1714,8 @@ FadeAlphaTicker = __decorateClass([
|
|
|
1687
1714
|
// src/classes/ticker/MoveTicker.ts
|
|
1688
1715
|
var MoveTicker = class extends TickerBase {
|
|
1689
1716
|
fn(ticker, args, aliases, tickerId) {
|
|
1690
|
-
let xSpeed =
|
|
1691
|
-
let ySpeed =
|
|
1717
|
+
let xSpeed = 10;
|
|
1718
|
+
let ySpeed = 10;
|
|
1692
1719
|
if (args.speed) {
|
|
1693
1720
|
if (typeof args.speed === "number") {
|
|
1694
1721
|
xSpeed = this.speedConvert(args.speed);
|
|
@@ -1752,6 +1779,10 @@ var MoveTicker = class extends TickerBase {
|
|
|
1752
1779
|
let destination = args.destination;
|
|
1753
1780
|
element.x = destination.x;
|
|
1754
1781
|
element.y = destination.y;
|
|
1782
|
+
if (args.isPushInOut && element.children.length > 0) {
|
|
1783
|
+
let elementChild = element.children[0];
|
|
1784
|
+
canvas.add(alias2, elementChild, { ignoreOldStyle: true });
|
|
1785
|
+
}
|
|
1755
1786
|
}
|
|
1756
1787
|
});
|
|
1757
1788
|
super.onEndOfTicker(alias, tickerId, args);
|
|
@@ -1940,6 +1971,88 @@ ZoomTicker = __decorateClass([
|
|
|
1940
1971
|
tickerDecorator()
|
|
1941
1972
|
], ZoomTicker);
|
|
1942
1973
|
|
|
1974
|
+
// src/functions/canvas/canvas-effect.ts
|
|
1975
|
+
async function shakeEffect(alias, props = {}, priority) {
|
|
1976
|
+
let elemet = canvas.find(alias);
|
|
1977
|
+
if (!elemet) {
|
|
1978
|
+
console.error(`[Pixi\u2019VN] The element with the alias ${alias} does not exist. So the shake effect can't be applied.`);
|
|
1979
|
+
return;
|
|
1980
|
+
}
|
|
1981
|
+
let position = { x: elemet.position.x, y: elemet.position.y };
|
|
1982
|
+
let speed = props.speed || 20;
|
|
1983
|
+
let speedProgression = props.speedProgression || void 0;
|
|
1984
|
+
let startOnlyIfHaveTexture = props.startOnlyIfHaveTexture || false;
|
|
1985
|
+
let type = props.type || "horizontal";
|
|
1986
|
+
let maximumShockSize = props.maximumShockSize || 10;
|
|
1987
|
+
let shocksNumber = (props.shocksNumber || 10) - 1;
|
|
1988
|
+
if (shocksNumber < 2) {
|
|
1989
|
+
console.error("[Pixi\u2019VN] The number of shocks must be at least 3.");
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1992
|
+
let upshocksNumber = Math.floor(shocksNumber / 2);
|
|
1993
|
+
let downshocksNumber = Math.ceil(shocksNumber / 2);
|
|
1994
|
+
let moveTickers = [];
|
|
1995
|
+
for (let i = 0; i < upshocksNumber; i++) {
|
|
1996
|
+
let destination = { x: position.x, y: position.y };
|
|
1997
|
+
let shockSize = maximumShockSize * (i + 1) / upshocksNumber;
|
|
1998
|
+
if (type === "horizontal") {
|
|
1999
|
+
if (i % 2 !== 0) {
|
|
2000
|
+
destination.x = position.x + shockSize;
|
|
2001
|
+
} else {
|
|
2002
|
+
destination.x = position.x - shockSize;
|
|
2003
|
+
}
|
|
2004
|
+
} else {
|
|
2005
|
+
if (i % 2 !== 0) {
|
|
2006
|
+
destination.y = position.y + shockSize;
|
|
2007
|
+
} else {
|
|
2008
|
+
destination.y = position.y - shockSize;
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
moveTickers.push(new MoveTicker({
|
|
2012
|
+
destination,
|
|
2013
|
+
speed,
|
|
2014
|
+
speedProgression,
|
|
2015
|
+
startOnlyIfHaveTexture
|
|
2016
|
+
}, void 0, priority));
|
|
2017
|
+
}
|
|
2018
|
+
let lastItemIsLeft = upshocksNumber % 2 === 0;
|
|
2019
|
+
for (let i = downshocksNumber; i > 0; i--) {
|
|
2020
|
+
let destination = { x: position.x, y: position.y };
|
|
2021
|
+
let shockSize = maximumShockSize * (i + 1) / (downshocksNumber - 1);
|
|
2022
|
+
if (type === "horizontal") {
|
|
2023
|
+
if (i % 2 === 0 && !lastItemIsLeft || i % 2 !== 0 && lastItemIsLeft) {
|
|
2024
|
+
destination.x = position.x - shockSize;
|
|
2025
|
+
} else {
|
|
2026
|
+
destination.x = position.x + shockSize;
|
|
2027
|
+
}
|
|
2028
|
+
} else {
|
|
2029
|
+
if (i % 2 === 0 && !lastItemIsLeft || i % 2 !== 0 && lastItemIsLeft) {
|
|
2030
|
+
destination.y = position.y - shockSize;
|
|
2031
|
+
} else {
|
|
2032
|
+
destination.y = position.y + shockSize;
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
moveTickers.push(new MoveTicker({
|
|
2036
|
+
destination,
|
|
2037
|
+
speed,
|
|
2038
|
+
speedProgression,
|
|
2039
|
+
startOnlyIfHaveTexture
|
|
2040
|
+
}, void 0, priority));
|
|
2041
|
+
}
|
|
2042
|
+
moveTickers.push(new MoveTicker({
|
|
2043
|
+
destination: position,
|
|
2044
|
+
speed,
|
|
2045
|
+
speedProgression,
|
|
2046
|
+
startOnlyIfHaveTexture,
|
|
2047
|
+
tickerAliasToResume: alias
|
|
2048
|
+
}, void 0, priority));
|
|
2049
|
+
let id = canvas.addTickersSteps(alias, moveTickers);
|
|
2050
|
+
if (id) {
|
|
2051
|
+
canvas.addTickerMustBeCompletedBeforeNextStep({ id, alias });
|
|
2052
|
+
canvas.putOnPauseTicker(alias, id);
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
|
|
1943
2056
|
// src/functions/canvas/image-utility.ts
|
|
1944
2057
|
function addImage(alias, imageUrl) {
|
|
1945
2058
|
let image = new CanvasImage();
|
|
@@ -2006,6 +2119,7 @@ async function showVideo(alias, videoUrl) {
|
|
|
2006
2119
|
|
|
2007
2120
|
// src/functions/canvas/canvas-transition.ts
|
|
2008
2121
|
async function showWithDissolveTransition(alias, image, props = {}, priority) {
|
|
2122
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2009
2123
|
let oldCanvasAlias = void 0;
|
|
2010
2124
|
if (canvas.find(alias)) {
|
|
2011
2125
|
oldCanvasAlias = alias + "_temp_disolve";
|
|
@@ -2035,10 +2149,13 @@ async function showWithDissolveTransition(alias, image, props = {}, priority) {
|
|
|
2035
2149
|
startOnlyIfHaveTexture: true
|
|
2036
2150
|
}, 10, priority);
|
|
2037
2151
|
let id = canvas.addTicker(alias, effect);
|
|
2038
|
-
|
|
2039
|
-
|
|
2152
|
+
if (id) {
|
|
2153
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2154
|
+
return [id];
|
|
2155
|
+
}
|
|
2040
2156
|
}
|
|
2041
2157
|
function removeWithDissolveTransition(alias, props = {}, priority) {
|
|
2158
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2042
2159
|
if (typeof alias === "string") {
|
|
2043
2160
|
alias = [alias];
|
|
2044
2161
|
}
|
|
@@ -2048,12 +2165,17 @@ function removeWithDissolveTransition(alias, props = {}, priority) {
|
|
|
2048
2165
|
aliasToRemoveAfter: alias,
|
|
2049
2166
|
startOnlyIfHaveTexture: true
|
|
2050
2167
|
}, 10, priority);
|
|
2051
|
-
canvas.addTicker(alias, effect);
|
|
2168
|
+
let id = canvas.addTicker(alias, effect);
|
|
2169
|
+
if (id) {
|
|
2170
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2171
|
+
return [id];
|
|
2172
|
+
}
|
|
2052
2173
|
}
|
|
2053
2174
|
async function showWithFadeTransition(alias, image, props = {}, priority) {
|
|
2054
2175
|
if (!canvas.find(alias)) {
|
|
2055
2176
|
return showWithDissolveTransition(alias, image, props, priority);
|
|
2056
2177
|
}
|
|
2178
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2057
2179
|
let oldCanvasAlias = alias + "_temp_fade";
|
|
2058
2180
|
canvas.editAlias(alias, oldCanvasAlias);
|
|
2059
2181
|
let canvasElement;
|
|
@@ -2089,14 +2211,23 @@ async function showWithFadeTransition(alias, image, props = {}, priority) {
|
|
|
2089
2211
|
aliasToRemoveAfter: oldCanvasAlias
|
|
2090
2212
|
}, void 0, priority)
|
|
2091
2213
|
]);
|
|
2092
|
-
|
|
2093
|
-
|
|
2214
|
+
let res = void 0;
|
|
2215
|
+
if (id1) {
|
|
2216
|
+
res = [id1];
|
|
2217
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id1, alias });
|
|
2218
|
+
}
|
|
2219
|
+
if (id2) {
|
|
2220
|
+
res ? res.push(id2) : res = [id2];
|
|
2221
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id2, alias });
|
|
2222
|
+
}
|
|
2223
|
+
return res;
|
|
2094
2224
|
}
|
|
2095
2225
|
function removeWithFadeTransition(alias, props = {}, priority) {
|
|
2096
2226
|
return removeWithDissolveTransition(alias, props, priority);
|
|
2097
2227
|
}
|
|
2098
2228
|
async function moveIn(alias, image, props = {}, priority) {
|
|
2099
2229
|
let direction = props.direction || "right";
|
|
2230
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2100
2231
|
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
2101
2232
|
tickerAliasToResume.push(alias);
|
|
2102
2233
|
let canvasElement;
|
|
@@ -2137,10 +2268,15 @@ async function moveIn(alias, image, props = {}, priority) {
|
|
|
2137
2268
|
let id = canvas.addTicker(alias, effect);
|
|
2138
2269
|
if (id) {
|
|
2139
2270
|
canvas.putOnPauseTicker(alias, id);
|
|
2271
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2272
|
+
return [id];
|
|
2140
2273
|
}
|
|
2141
2274
|
}
|
|
2142
2275
|
function moveOut(alias, props = {}, priority) {
|
|
2143
2276
|
let direction = props.direction || "right";
|
|
2277
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2278
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
2279
|
+
tickerAliasToResume.push(alias);
|
|
2144
2280
|
let canvasElement = canvas.find(alias);
|
|
2145
2281
|
if (!canvasElement) {
|
|
2146
2282
|
console.warn("[Pixi\u2019VN] The canvas element is not found.");
|
|
@@ -2163,13 +2299,20 @@ function moveOut(alias, props = {}, priority) {
|
|
|
2163
2299
|
}
|
|
2164
2300
|
let effect = new MoveTicker({
|
|
2165
2301
|
...props,
|
|
2302
|
+
tickerAliasToResume,
|
|
2166
2303
|
destination,
|
|
2167
2304
|
startOnlyIfHaveTexture: true,
|
|
2168
2305
|
aliasToRemoveAfter: alias
|
|
2169
2306
|
}, void 0, priority);
|
|
2170
|
-
canvas.addTicker(alias, effect);
|
|
2307
|
+
let id = canvas.addTicker(alias, effect);
|
|
2308
|
+
if (id) {
|
|
2309
|
+
canvas.putOnPauseTicker(alias, id);
|
|
2310
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2311
|
+
return [id];
|
|
2312
|
+
}
|
|
2171
2313
|
}
|
|
2172
2314
|
async function zoomIn(alias, image, props = { direction: "right" }, priority) {
|
|
2315
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2173
2316
|
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
2174
2317
|
tickerAliasToResume.push(alias);
|
|
2175
2318
|
let canvasElement;
|
|
@@ -2182,7 +2325,9 @@ async function zoomIn(alias, image, props = { direction: "right" }, priority) {
|
|
|
2182
2325
|
} else {
|
|
2183
2326
|
canvasElement = image;
|
|
2184
2327
|
}
|
|
2185
|
-
canvas.
|
|
2328
|
+
if (canvas.find(alias)) {
|
|
2329
|
+
canvas.copyCanvasElementProperty(alias, canvasElement);
|
|
2330
|
+
}
|
|
2186
2331
|
let container = new CanvasContainer();
|
|
2187
2332
|
container.addChild(canvasElement);
|
|
2188
2333
|
container.height = canvas.canvasHeight;
|
|
@@ -2224,9 +2369,14 @@ async function zoomIn(alias, image, props = { direction: "right" }, priority) {
|
|
|
2224
2369
|
let id = canvas.addTicker(alias, effect);
|
|
2225
2370
|
if (id) {
|
|
2226
2371
|
canvas.putOnPauseTicker(alias, id);
|
|
2372
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2373
|
+
return [id];
|
|
2227
2374
|
}
|
|
2228
2375
|
}
|
|
2229
2376
|
function zoomOut(alias, props = { direction: "right" }, priority) {
|
|
2377
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2378
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
2379
|
+
tickerAliasToResume.push(alias);
|
|
2230
2380
|
let canvasElement = canvas.find(alias);
|
|
2231
2381
|
if (!canvasElement) {
|
|
2232
2382
|
console.warn("[Pixi\u2019VN] The canvas element is not found.");
|
|
@@ -2261,13 +2411,116 @@ function zoomOut(alias, props = { direction: "right" }, priority) {
|
|
|
2261
2411
|
container.scale.set(1);
|
|
2262
2412
|
let effect = new ZoomTicker({
|
|
2263
2413
|
...props,
|
|
2414
|
+
tickerAliasToResume,
|
|
2264
2415
|
startOnlyIfHaveTexture: true,
|
|
2265
2416
|
type: "unzoom",
|
|
2266
2417
|
limit: 0,
|
|
2267
2418
|
aliasToRemoveAfter: alias,
|
|
2268
2419
|
isZoomInOut: true
|
|
2269
2420
|
}, void 0, priority);
|
|
2270
|
-
canvas.addTicker(alias, effect);
|
|
2421
|
+
let id = canvas.addTicker(alias, effect);
|
|
2422
|
+
if (id) {
|
|
2423
|
+
canvas.putOnPauseTicker(alias, id);
|
|
2424
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2425
|
+
return [id];
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
async function pushIn(alias, image, props = { direction: "right" }, priority) {
|
|
2429
|
+
let oldCanvasAlias = alias + "_temp_push";
|
|
2430
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2431
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
2432
|
+
tickerAliasToResume.push(alias);
|
|
2433
|
+
let canvasElement;
|
|
2434
|
+
if (typeof image === "string") {
|
|
2435
|
+
if (checkIfVideo(image)) {
|
|
2436
|
+
canvasElement = new CanvasVideo({}, image);
|
|
2437
|
+
} else {
|
|
2438
|
+
canvasElement = new CanvasImage({}, image);
|
|
2439
|
+
}
|
|
2440
|
+
} else {
|
|
2441
|
+
canvasElement = image;
|
|
2442
|
+
}
|
|
2443
|
+
let oldCanvas = canvas.find(alias);
|
|
2444
|
+
if (oldCanvas) {
|
|
2445
|
+
canvas.copyCanvasElementProperty(oldCanvas, canvasElement);
|
|
2446
|
+
canvas.editAlias(alias, oldCanvasAlias, { ignoreTickers: true });
|
|
2447
|
+
pushOut(oldCanvasAlias, props, priority);
|
|
2448
|
+
}
|
|
2449
|
+
let container = new CanvasContainer();
|
|
2450
|
+
container.height = canvas.canvasHeight;
|
|
2451
|
+
container.width = canvas.canvasWidth;
|
|
2452
|
+
container.addChild(canvasElement);
|
|
2453
|
+
canvas.add(alias, container, { ignoreOldStyle: true });
|
|
2454
|
+
if (canvasElement instanceof CanvasImage && canvasElement.texture?.label == "EMPTY") {
|
|
2455
|
+
await canvasElement.load();
|
|
2456
|
+
}
|
|
2457
|
+
if (props.direction == "up") {
|
|
2458
|
+
container.x = 0;
|
|
2459
|
+
container.y = -canvas.canvasHeight;
|
|
2460
|
+
} else if (props.direction == "down") {
|
|
2461
|
+
container.x = 0;
|
|
2462
|
+
container.y = canvas.canvasHeight;
|
|
2463
|
+
} else if (props.direction == "left") {
|
|
2464
|
+
container.x = canvas.canvasWidth;
|
|
2465
|
+
container.y = 0;
|
|
2466
|
+
} else if (props.direction == "right") {
|
|
2467
|
+
container.x = -canvas.canvasWidth;
|
|
2468
|
+
container.y = 0;
|
|
2469
|
+
}
|
|
2470
|
+
let effect = new MoveTicker({
|
|
2471
|
+
...props,
|
|
2472
|
+
tickerAliasToResume,
|
|
2473
|
+
startOnlyIfHaveTexture: true,
|
|
2474
|
+
isPushInOut: true,
|
|
2475
|
+
destination: { x: 0, y: 0 }
|
|
2476
|
+
}, void 0, priority);
|
|
2477
|
+
let id = canvas.addTicker(alias, effect);
|
|
2478
|
+
if (id) {
|
|
2479
|
+
canvas.putOnPauseTicker(alias, id);
|
|
2480
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2481
|
+
return [id];
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
function pushOut(alias, props = { direction: "right" }, priority) {
|
|
2485
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
2486
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
2487
|
+
tickerAliasToResume.push(alias);
|
|
2488
|
+
let canvasElement = canvas.find(alias);
|
|
2489
|
+
if (!canvasElement) {
|
|
2490
|
+
console.warn("[Pixi\u2019VN] The canvas element is not found.");
|
|
2491
|
+
return;
|
|
2492
|
+
}
|
|
2493
|
+
let container = new CanvasContainer();
|
|
2494
|
+
container.pivot.x = 0;
|
|
2495
|
+
container.pivot.y = 0;
|
|
2496
|
+
container.x = 0;
|
|
2497
|
+
container.y = 0;
|
|
2498
|
+
container.addChild(canvasElement);
|
|
2499
|
+
canvas.add(alias, container, { ignoreOldStyle: true });
|
|
2500
|
+
let destination = { x: 0, y: 0 };
|
|
2501
|
+
if (props.direction == "up") {
|
|
2502
|
+
destination.y = canvas.canvasHeight;
|
|
2503
|
+
} else if (props.direction == "down") {
|
|
2504
|
+
destination.y = -canvas.canvasHeight;
|
|
2505
|
+
} else if (props.direction == "left") {
|
|
2506
|
+
destination.x = -canvas.canvasWidth;
|
|
2507
|
+
} else if (props.direction == "right") {
|
|
2508
|
+
destination.x = canvas.canvasWidth;
|
|
2509
|
+
}
|
|
2510
|
+
let effect = new MoveTicker({
|
|
2511
|
+
...props,
|
|
2512
|
+
tickerAliasToResume,
|
|
2513
|
+
startOnlyIfHaveTexture: true,
|
|
2514
|
+
destination,
|
|
2515
|
+
aliasToRemoveAfter: alias,
|
|
2516
|
+
isPushInOut: true
|
|
2517
|
+
}, void 0, priority);
|
|
2518
|
+
let id = canvas.addTicker(alias, effect);
|
|
2519
|
+
if (id) {
|
|
2520
|
+
canvas.putOnPauseTicker(alias, id);
|
|
2521
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id });
|
|
2522
|
+
return [id];
|
|
2523
|
+
}
|
|
2271
2524
|
}
|
|
2272
2525
|
|
|
2273
2526
|
// src/functions/dialogue-utility.ts
|
|
@@ -2321,7 +2574,7 @@ function clearAllGameDatas() {
|
|
|
2321
2574
|
// src/functions/saves-utility.ts
|
|
2322
2575
|
function getSaveData() {
|
|
2323
2576
|
return {
|
|
2324
|
-
pixivn_version:
|
|
2577
|
+
pixivn_version: version,
|
|
2325
2578
|
stepData: narration.export(),
|
|
2326
2579
|
storageData: storage.export(),
|
|
2327
2580
|
canvasData: canvas.export(),
|
|
@@ -2519,6 +2772,7 @@ var NarrationManagerStatic = class _NarrationManagerStatic {
|
|
|
2519
2772
|
canvas: {
|
|
2520
2773
|
elementAliasesOrder: [],
|
|
2521
2774
|
elements: {},
|
|
2775
|
+
stage: {},
|
|
2522
2776
|
tickers: {},
|
|
2523
2777
|
tickersSteps: {},
|
|
2524
2778
|
tickersOnPause: {}
|
|
@@ -2985,8 +3239,10 @@ var NarrationManager = class {
|
|
|
2985
3239
|
console.warn("[Pixi\u2019VN] stepSha not found");
|
|
2986
3240
|
}
|
|
2987
3241
|
try {
|
|
3242
|
+
if (NarrationManagerStatic.stepsRunning === 0) {
|
|
3243
|
+
canvas.forceCompletionOfReportedTickers();
|
|
3244
|
+
}
|
|
2988
3245
|
NarrationManagerStatic.stepsRunning++;
|
|
2989
|
-
canvas.forceCompletionOfReportedTickers();
|
|
2990
3246
|
let result = await step(props);
|
|
2991
3247
|
if (this.choiceMenuOptions?.length === 1 && this.choiceMenuOptions[0].autoSelect) {
|
|
2992
3248
|
let choice = this.choiceMenuOptions[0];
|
|
@@ -4245,7 +4501,7 @@ var StoredClassModel = class {
|
|
|
4245
4501
|
if (Object.keys(storageValue[this.id]).length === 0) {
|
|
4246
4502
|
delete storageValue[this.id];
|
|
4247
4503
|
}
|
|
4248
|
-
|
|
4504
|
+
storage.setVariable(this.categoryId, storageValue);
|
|
4249
4505
|
}
|
|
4250
4506
|
/**
|
|
4251
4507
|
* Get a property from the storage.
|
|
@@ -4705,6 +4961,7 @@ export {
|
|
|
4705
4961
|
MoveTicker,
|
|
4706
4962
|
RotateTicker,
|
|
4707
4963
|
ZoomTicker,
|
|
4964
|
+
shakeEffect,
|
|
4708
4965
|
addImage,
|
|
4709
4966
|
loadImage,
|
|
4710
4967
|
showImage,
|
|
@@ -4719,6 +4976,8 @@ export {
|
|
|
4719
4976
|
moveOut,
|
|
4720
4977
|
zoomIn,
|
|
4721
4978
|
zoomOut,
|
|
4979
|
+
pushIn,
|
|
4980
|
+
pushOut,
|
|
4722
4981
|
setDialogue,
|
|
4723
4982
|
getDialogue,
|
|
4724
4983
|
clearDialogue,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
juliette
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FM5SFYXO.js";
|
|
4
4
|
import {
|
|
5
5
|
narration,
|
|
6
6
|
newLabel
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D3ZQSJKZ.js";
|
|
8
8
|
|
|
9
9
|
// src/labels/InputTestLabel.ts
|
|
10
10
|
var INPUT_TEST_LABEL = "___pixi_vn_input_test___";
|