@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
|
@@ -1607,14 +1607,14 @@ var init_uid = __esm({
|
|
|
1607
1607
|
});
|
|
1608
1608
|
|
|
1609
1609
|
// node_modules/pixi.js/lib/utils/logging/deprecation.mjs
|
|
1610
|
-
function deprecation(
|
|
1610
|
+
function deprecation(version2, message, ignoreDepth = 3) {
|
|
1611
1611
|
if (warnings[message]) {
|
|
1612
1612
|
return;
|
|
1613
1613
|
}
|
|
1614
1614
|
let stack = new Error().stack;
|
|
1615
1615
|
if (typeof stack === "undefined") {
|
|
1616
1616
|
console.warn("PixiJS Deprecation Warning: ", `${message}
|
|
1617
|
-
Deprecated since v${
|
|
1617
|
+
Deprecated since v${version2}`);
|
|
1618
1618
|
} else {
|
|
1619
1619
|
stack = stack.split("\n").splice(ignoreDepth).join("\n");
|
|
1620
1620
|
if (console.groupCollapsed) {
|
|
@@ -1623,13 +1623,13 @@ Deprecated since v${version}`);
|
|
|
1623
1623
|
"color:#614108;background:#fffbe6",
|
|
1624
1624
|
"font-weight:normal;color:#614108;background:#fffbe6",
|
|
1625
1625
|
`${message}
|
|
1626
|
-
Deprecated since v${
|
|
1626
|
+
Deprecated since v${version2}`
|
|
1627
1627
|
);
|
|
1628
1628
|
console.warn(stack);
|
|
1629
1629
|
console.groupEnd();
|
|
1630
1630
|
} else {
|
|
1631
1631
|
console.warn("PixiJS Deprecation Warning: ", `${message}
|
|
1632
|
-
Deprecated since v${
|
|
1632
|
+
Deprecated since v${version2}`);
|
|
1633
1633
|
console.warn(stack);
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
@@ -42998,7 +42998,7 @@ var require_dom = __commonJS({
|
|
|
42998
42998
|
* @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core
|
|
42999
42999
|
* @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard
|
|
43000
43000
|
*/
|
|
43001
|
-
hasFeature: function(feature,
|
|
43001
|
+
hasFeature: function(feature, version2) {
|
|
43002
43002
|
return true;
|
|
43003
43003
|
},
|
|
43004
43004
|
/**
|
|
@@ -43119,8 +43119,8 @@ var require_dom = __commonJS({
|
|
|
43119
43119
|
}
|
|
43120
43120
|
},
|
|
43121
43121
|
// Introduced in DOM Level 2:
|
|
43122
|
-
isSupported: function(feature,
|
|
43123
|
-
return this.ownerDocument.implementation.hasFeature(feature,
|
|
43122
|
+
isSupported: function(feature, version2) {
|
|
43123
|
+
return this.ownerDocument.implementation.hasFeature(feature, version2);
|
|
43124
43124
|
},
|
|
43125
43125
|
// Introduced in DOM Level 2:
|
|
43126
43126
|
hasAttributes: function() {
|
|
@@ -54704,6 +54704,9 @@ __export(CustomTickerCanvasElementTestLabel_exports, {
|
|
|
54704
54704
|
module.exports = __toCommonJS(CustomTickerCanvasElementTestLabel_exports);
|
|
54705
54705
|
init_lib();
|
|
54706
54706
|
|
|
54707
|
+
// src/index.ts
|
|
54708
|
+
init_lib();
|
|
54709
|
+
|
|
54707
54710
|
// src/classes/canvas/CanvasAVideo.ts
|
|
54708
54711
|
init_lib();
|
|
54709
54712
|
|
|
@@ -54767,6 +54770,18 @@ init_lib();
|
|
|
54767
54770
|
|
|
54768
54771
|
// src/decorators/event-decorator.ts
|
|
54769
54772
|
var registeredEvents = {};
|
|
54773
|
+
function eventDecorator(name) {
|
|
54774
|
+
return function(target) {
|
|
54775
|
+
if (!name) {
|
|
54776
|
+
name = target.name;
|
|
54777
|
+
}
|
|
54778
|
+
if (registeredEvents[name]) {
|
|
54779
|
+
console.info(`[Pixi\u2019VN] Event ${name} already exists, it will be overwritten`);
|
|
54780
|
+
}
|
|
54781
|
+
target.prototype.id = name;
|
|
54782
|
+
registeredEvents[name] = target;
|
|
54783
|
+
};
|
|
54784
|
+
}
|
|
54770
54785
|
function getEventTypeById(eventId) {
|
|
54771
54786
|
try {
|
|
54772
54787
|
let eventType = registeredEvents[eventId];
|
|
@@ -57394,8 +57409,17 @@ extensions.add(soundAsset);
|
|
|
57394
57409
|
// node_modules/@pixi/sound/lib/index.mjs
|
|
57395
57410
|
var sound = setInstance(new SoundLibrary());
|
|
57396
57411
|
|
|
57412
|
+
// package.json
|
|
57413
|
+
var version = "0.8.9";
|
|
57414
|
+
|
|
57397
57415
|
// src/constants.ts
|
|
57398
57416
|
var Repeat = "repeat";
|
|
57417
|
+
function Pause(duration) {
|
|
57418
|
+
return {
|
|
57419
|
+
type: "pause",
|
|
57420
|
+
duration
|
|
57421
|
+
};
|
|
57422
|
+
}
|
|
57399
57423
|
var filters = {
|
|
57400
57424
|
DistortionFilter: filters_exports.DistortionFilter,
|
|
57401
57425
|
EqualizerFilter: filters_exports.EqualizerFilter,
|
|
@@ -57405,6 +57429,109 @@ var filters = {
|
|
|
57405
57429
|
StreamFilter: filters_exports.StreamFilter,
|
|
57406
57430
|
TelephoneFilter: filters_exports.TelephoneFilter
|
|
57407
57431
|
};
|
|
57432
|
+
var videoFormats = [
|
|
57433
|
+
"webm",
|
|
57434
|
+
"mp4",
|
|
57435
|
+
"ogv",
|
|
57436
|
+
"mov",
|
|
57437
|
+
"avi",
|
|
57438
|
+
"wmv",
|
|
57439
|
+
"flv",
|
|
57440
|
+
"mkv",
|
|
57441
|
+
"3gp",
|
|
57442
|
+
"mpg",
|
|
57443
|
+
"mpeg",
|
|
57444
|
+
"m4v",
|
|
57445
|
+
"f4v",
|
|
57446
|
+
"m2v",
|
|
57447
|
+
"asf",
|
|
57448
|
+
"vob",
|
|
57449
|
+
"ts",
|
|
57450
|
+
"m2ts",
|
|
57451
|
+
"mts",
|
|
57452
|
+
"divx",
|
|
57453
|
+
"xvid",
|
|
57454
|
+
"rm",
|
|
57455
|
+
"rmvb",
|
|
57456
|
+
"dat",
|
|
57457
|
+
"swf",
|
|
57458
|
+
"mpv",
|
|
57459
|
+
"mxf",
|
|
57460
|
+
"vcd",
|
|
57461
|
+
"svcd",
|
|
57462
|
+
"dvd",
|
|
57463
|
+
"dv",
|
|
57464
|
+
"3g2",
|
|
57465
|
+
"m2p",
|
|
57466
|
+
"m2ts",
|
|
57467
|
+
"m2v",
|
|
57468
|
+
"m4v",
|
|
57469
|
+
"mpe",
|
|
57470
|
+
"mpg",
|
|
57471
|
+
"mpv2",
|
|
57472
|
+
"ogm",
|
|
57473
|
+
"qt",
|
|
57474
|
+
"rm",
|
|
57475
|
+
"ts",
|
|
57476
|
+
"vob",
|
|
57477
|
+
"wmv",
|
|
57478
|
+
"xvid",
|
|
57479
|
+
"flv",
|
|
57480
|
+
"mkv",
|
|
57481
|
+
"mov",
|
|
57482
|
+
"mp4",
|
|
57483
|
+
"webm",
|
|
57484
|
+
"avi",
|
|
57485
|
+
"ogv",
|
|
57486
|
+
"m4v",
|
|
57487
|
+
"f4v",
|
|
57488
|
+
"m2v",
|
|
57489
|
+
"asf",
|
|
57490
|
+
"vob",
|
|
57491
|
+
"ts",
|
|
57492
|
+
"m2ts",
|
|
57493
|
+
"mts",
|
|
57494
|
+
"divx",
|
|
57495
|
+
"xvid",
|
|
57496
|
+
"rm",
|
|
57497
|
+
"rmvb",
|
|
57498
|
+
"dat",
|
|
57499
|
+
"swf",
|
|
57500
|
+
"mpv",
|
|
57501
|
+
"mxf",
|
|
57502
|
+
"vcd",
|
|
57503
|
+
"svcd",
|
|
57504
|
+
"dvd",
|
|
57505
|
+
"dv",
|
|
57506
|
+
"3g2",
|
|
57507
|
+
"m2p",
|
|
57508
|
+
"m2ts",
|
|
57509
|
+
"m2v",
|
|
57510
|
+
"m4v",
|
|
57511
|
+
"mpe",
|
|
57512
|
+
"mpg",
|
|
57513
|
+
"mpv2",
|
|
57514
|
+
"ogm",
|
|
57515
|
+
"qt",
|
|
57516
|
+
"rm",
|
|
57517
|
+
"ts",
|
|
57518
|
+
"vob",
|
|
57519
|
+
"wmv",
|
|
57520
|
+
"xvid",
|
|
57521
|
+
"flv",
|
|
57522
|
+
"mkv",
|
|
57523
|
+
"mov",
|
|
57524
|
+
"mp4",
|
|
57525
|
+
"webm",
|
|
57526
|
+
"avi",
|
|
57527
|
+
"ogv",
|
|
57528
|
+
"m4v",
|
|
57529
|
+
"f4v",
|
|
57530
|
+
"m2v",
|
|
57531
|
+
"asf",
|
|
57532
|
+
"vob"
|
|
57533
|
+
];
|
|
57534
|
+
var CANVAS_APP_STAGE_ALIAS = "_stage_";
|
|
57408
57535
|
|
|
57409
57536
|
// src/managers/CanvasManager.ts
|
|
57410
57537
|
init_lib();
|
|
@@ -57757,7 +57884,7 @@ function createExportableElement(element) {
|
|
|
57757
57884
|
let elementString = JSON.stringify(element);
|
|
57758
57885
|
return JSON.parse(elementString);
|
|
57759
57886
|
} catch (e2) {
|
|
57760
|
-
console.error("[Pixi\u2019VN] Error creating exportable element", e2);
|
|
57887
|
+
console.error("[Pixi\u2019VN] Error creating exportable element", element, e2);
|
|
57761
57888
|
throw new Error("[Pixi\u2019VN] Error creating exportable element");
|
|
57762
57889
|
}
|
|
57763
57890
|
}
|
|
@@ -58190,6 +58317,10 @@ var CanvasManager = class {
|
|
|
58190
58317
|
* ```
|
|
58191
58318
|
*/
|
|
58192
58319
|
add(alias, canvasElement, options = {}) {
|
|
58320
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
58321
|
+
console.error(`[Pixi\u2019VN] The alias ${CANVAS_APP_STAGE_ALIAS} is reserved`);
|
|
58322
|
+
return;
|
|
58323
|
+
}
|
|
58193
58324
|
let ignoreOldStyle = options?.ignoreOldStyle;
|
|
58194
58325
|
let oldCanvasElement = this.find(alias);
|
|
58195
58326
|
if (oldCanvasElement) {
|
|
@@ -58220,6 +58351,10 @@ var CanvasManager = class {
|
|
|
58220
58351
|
* ```
|
|
58221
58352
|
*/
|
|
58222
58353
|
remove(alias, options = {}) {
|
|
58354
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
58355
|
+
console.error(`[Pixi\u2019VN] The alias ${CANVAS_APP_STAGE_ALIAS} is reserved`);
|
|
58356
|
+
return;
|
|
58357
|
+
}
|
|
58223
58358
|
let ignoreTickers = options.ignoreTickers;
|
|
58224
58359
|
if (typeof alias === "string") {
|
|
58225
58360
|
alias = [alias];
|
|
@@ -58248,6 +58383,9 @@ var CanvasManager = class {
|
|
|
58248
58383
|
* ```
|
|
58249
58384
|
*/
|
|
58250
58385
|
find(alias) {
|
|
58386
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
58387
|
+
return this.app.stage;
|
|
58388
|
+
}
|
|
58251
58389
|
return CanvasManagerStatic._children[alias];
|
|
58252
58390
|
}
|
|
58253
58391
|
/**
|
|
@@ -58274,16 +58412,17 @@ var CanvasManager = class {
|
|
|
58274
58412
|
this.removeAllTickers();
|
|
58275
58413
|
}
|
|
58276
58414
|
/**
|
|
58277
|
-
* Edit the alias of a canvas element.
|
|
58415
|
+
* Edit the alias of a canvas element. The tickers that are connected to the canvas element will be transferred.
|
|
58278
58416
|
* @param oldAlias The old alias of the canvas element.
|
|
58279
58417
|
* @param newAlias The new alias of the canvas element.
|
|
58418
|
+
* @param options The options of the canvas element.
|
|
58280
58419
|
*/
|
|
58281
|
-
editAlias(oldAlias, newAlias) {
|
|
58420
|
+
editAlias(oldAlias, newAlias, options = {}) {
|
|
58282
58421
|
if (CanvasManagerStatic._children[oldAlias]) {
|
|
58283
58422
|
CanvasManagerStatic._children[newAlias] = CanvasManagerStatic._children[oldAlias];
|
|
58284
58423
|
delete CanvasManagerStatic._children[oldAlias];
|
|
58285
58424
|
}
|
|
58286
|
-
this.transferTickers(oldAlias, newAlias, "move");
|
|
58425
|
+
!options.ignoreTickers && this.transferTickers(oldAlias, newAlias, "move");
|
|
58287
58426
|
}
|
|
58288
58427
|
/** Edit Tickers Methods */
|
|
58289
58428
|
/**
|
|
@@ -58358,12 +58497,16 @@ var CanvasManager = class {
|
|
|
58358
58497
|
pushTicker(id3, tickerData, ticker) {
|
|
58359
58498
|
CanvasManagerStatic._currentTickers[id3] = tickerData;
|
|
58360
58499
|
tickerData.fn = (t2) => {
|
|
58361
|
-
if (tickerData.createdByTicketSteps && this.isTickerPaused(tickerData.createdByTicketSteps.canvasElementAlias, tickerData.createdByTicketSteps.id)) {
|
|
58362
|
-
return;
|
|
58363
|
-
}
|
|
58364
58500
|
let data = CanvasManagerStatic._currentTickers[id3];
|
|
58365
58501
|
if (data) {
|
|
58366
|
-
let canvasElementAliases = data.canvasElementAliases
|
|
58502
|
+
let canvasElementAliases = data.canvasElementAliases;
|
|
58503
|
+
if (tickerData.createdByTicketSteps) {
|
|
58504
|
+
if (this.isTickerPaused(tickerData.createdByTicketSteps.canvasElementAlias, tickerData.createdByTicketSteps.id)) {
|
|
58505
|
+
return;
|
|
58506
|
+
}
|
|
58507
|
+
} else {
|
|
58508
|
+
canvasElementAliases = canvasElementAliases.filter((alias) => !this.isTickerPaused(alias, id3));
|
|
58509
|
+
}
|
|
58367
58510
|
ticker?.fn(t2, data.args, canvasElementAliases, id3);
|
|
58368
58511
|
}
|
|
58369
58512
|
};
|
|
@@ -58710,15 +58853,19 @@ var CanvasManager = class {
|
|
|
58710
58853
|
});
|
|
58711
58854
|
CanvasManagerStatic._tickersMustBeCompletedBeforeNextStep.stepAlias.forEach(({ alias, id: id3 }) => {
|
|
58712
58855
|
let ticker = CanvasManagerStatic._currentTickersSteps[alias];
|
|
58713
|
-
if (ticker && ticker[id3]
|
|
58714
|
-
ticker[id3].steps.
|
|
58715
|
-
|
|
58716
|
-
|
|
58717
|
-
|
|
58718
|
-
|
|
58856
|
+
if (ticker && ticker[id3]) {
|
|
58857
|
+
if (ticker[id3].steps.includes(Repeat)) {
|
|
58858
|
+
console.error(`[Pixi\u2019VN] The ticker alias: ${alias} id: ${id3} contains a RepeatType, so it can't be forced to complete`, ticker[id3]);
|
|
58859
|
+
} else {
|
|
58860
|
+
ticker[id3].steps.forEach((step) => {
|
|
58861
|
+
if (typeof step === "object" && "ticker" in step) {
|
|
58862
|
+
let ticker2 = geTickerInstanceById(step.ticker, step.args, step.duration, step.priority);
|
|
58863
|
+
if (ticker2) {
|
|
58864
|
+
ticker2.onEndOfTicker([alias], id3, step.args);
|
|
58865
|
+
}
|
|
58719
58866
|
}
|
|
58720
|
-
}
|
|
58721
|
-
}
|
|
58867
|
+
});
|
|
58868
|
+
}
|
|
58722
58869
|
}
|
|
58723
58870
|
});
|
|
58724
58871
|
CanvasManagerStatic._tickersMustBeCompletedBeforeNextStep = { tikersIds: [], stepAlias: [] };
|
|
@@ -58759,6 +58906,7 @@ var CanvasManager = class {
|
|
|
58759
58906
|
tickers: createExportableElement(CanvasManagerStatic.currentTickersWithoutCreatedBySteps),
|
|
58760
58907
|
tickersSteps: createExportableElement(CanvasManagerStatic._currentTickersSteps),
|
|
58761
58908
|
elements: createExportableElement(currentElements),
|
|
58909
|
+
stage: createExportableElement(getMemoryContainer(this.app.stage)),
|
|
58762
58910
|
elementAliasesOrder: createExportableElement(CanvasManagerStatic.childrenAliasesOrder),
|
|
58763
58911
|
tickersOnPause: createExportableElement(CanvasManagerStatic._tickersOnPause)
|
|
58764
58912
|
};
|
|
@@ -58792,6 +58940,11 @@ var CanvasManager = class {
|
|
|
58792
58940
|
console.error("[Pixi\u2019VN] The data does not have the properties elementAliasesOrder and elements");
|
|
58793
58941
|
return;
|
|
58794
58942
|
}
|
|
58943
|
+
if (data.hasOwnProperty("stage") && data.hasOwnProperty("stage")) {
|
|
58944
|
+
setMemoryContainer(this.app.stage, data["stage"]);
|
|
58945
|
+
} else {
|
|
58946
|
+
console.error("[Pixi\u2019VN] The data does not have the properties stage");
|
|
58947
|
+
}
|
|
58795
58948
|
if (data.hasOwnProperty("tickers")) {
|
|
58796
58949
|
let tickers = data["tickers"];
|
|
58797
58950
|
Object.entries(tickers).forEach(([oldId, t2]) => {
|
|
@@ -59240,8 +59393,8 @@ function getExponentialProgression(number, progression, valueConvert) {
|
|
|
59240
59393
|
// src/classes/ticker/MoveTicker.ts
|
|
59241
59394
|
var MoveTicker = class extends TickerBase {
|
|
59242
59395
|
fn(ticker, args, aliases, tickerId) {
|
|
59243
|
-
let xSpeed =
|
|
59244
|
-
let ySpeed =
|
|
59396
|
+
let xSpeed = 10;
|
|
59397
|
+
let ySpeed = 10;
|
|
59245
59398
|
if (args.speed) {
|
|
59246
59399
|
if (typeof args.speed === "number") {
|
|
59247
59400
|
xSpeed = this.speedConvert(args.speed);
|
|
@@ -59305,6 +59458,10 @@ var MoveTicker = class extends TickerBase {
|
|
|
59305
59458
|
let destination = args.destination;
|
|
59306
59459
|
element.x = destination.x;
|
|
59307
59460
|
element.y = destination.y;
|
|
59461
|
+
if (args.isPushInOut && element.children.length > 0) {
|
|
59462
|
+
let elementChild = element.children[0];
|
|
59463
|
+
canvas.add(alias2, elementChild, { ignoreOldStyle: true });
|
|
59464
|
+
}
|
|
59308
59465
|
}
|
|
59309
59466
|
});
|
|
59310
59467
|
super.onEndOfTicker(alias, tickerId, args);
|
|
@@ -59495,6 +59652,534 @@ ZoomTicker = __decorateClass([
|
|
|
59495
59652
|
tickerDecorator()
|
|
59496
59653
|
], ZoomTicker);
|
|
59497
59654
|
|
|
59655
|
+
// src/functions/canvas/canvas-effect.ts
|
|
59656
|
+
async function shakeEffect(alias, props = {}, priority) {
|
|
59657
|
+
let elemet = canvas.find(alias);
|
|
59658
|
+
if (!elemet) {
|
|
59659
|
+
console.error(`[Pixi\u2019VN] The element with the alias ${alias} does not exist. So the shake effect can't be applied.`);
|
|
59660
|
+
return;
|
|
59661
|
+
}
|
|
59662
|
+
let position = { x: elemet.position.x, y: elemet.position.y };
|
|
59663
|
+
let speed = props.speed || 20;
|
|
59664
|
+
let speedProgression = props.speedProgression || void 0;
|
|
59665
|
+
let startOnlyIfHaveTexture = props.startOnlyIfHaveTexture || false;
|
|
59666
|
+
let type = props.type || "horizontal";
|
|
59667
|
+
let maximumShockSize = props.maximumShockSize || 10;
|
|
59668
|
+
let shocksNumber = (props.shocksNumber || 10) - 1;
|
|
59669
|
+
if (shocksNumber < 2) {
|
|
59670
|
+
console.error("[Pixi\u2019VN] The number of shocks must be at least 3.");
|
|
59671
|
+
return;
|
|
59672
|
+
}
|
|
59673
|
+
let upshocksNumber = Math.floor(shocksNumber / 2);
|
|
59674
|
+
let downshocksNumber = Math.ceil(shocksNumber / 2);
|
|
59675
|
+
let moveTickers = [];
|
|
59676
|
+
for (let i3 = 0; i3 < upshocksNumber; i3++) {
|
|
59677
|
+
let destination = { x: position.x, y: position.y };
|
|
59678
|
+
let shockSize = maximumShockSize * (i3 + 1) / upshocksNumber;
|
|
59679
|
+
if (type === "horizontal") {
|
|
59680
|
+
if (i3 % 2 !== 0) {
|
|
59681
|
+
destination.x = position.x + shockSize;
|
|
59682
|
+
} else {
|
|
59683
|
+
destination.x = position.x - shockSize;
|
|
59684
|
+
}
|
|
59685
|
+
} else {
|
|
59686
|
+
if (i3 % 2 !== 0) {
|
|
59687
|
+
destination.y = position.y + shockSize;
|
|
59688
|
+
} else {
|
|
59689
|
+
destination.y = position.y - shockSize;
|
|
59690
|
+
}
|
|
59691
|
+
}
|
|
59692
|
+
moveTickers.push(new MoveTicker({
|
|
59693
|
+
destination,
|
|
59694
|
+
speed,
|
|
59695
|
+
speedProgression,
|
|
59696
|
+
startOnlyIfHaveTexture
|
|
59697
|
+
}, void 0, priority));
|
|
59698
|
+
}
|
|
59699
|
+
let lastItemIsLeft = upshocksNumber % 2 === 0;
|
|
59700
|
+
for (let i3 = downshocksNumber; i3 > 0; i3--) {
|
|
59701
|
+
let destination = { x: position.x, y: position.y };
|
|
59702
|
+
let shockSize = maximumShockSize * (i3 + 1) / (downshocksNumber - 1);
|
|
59703
|
+
if (type === "horizontal") {
|
|
59704
|
+
if (i3 % 2 === 0 && !lastItemIsLeft || i3 % 2 !== 0 && lastItemIsLeft) {
|
|
59705
|
+
destination.x = position.x - shockSize;
|
|
59706
|
+
} else {
|
|
59707
|
+
destination.x = position.x + shockSize;
|
|
59708
|
+
}
|
|
59709
|
+
} else {
|
|
59710
|
+
if (i3 % 2 === 0 && !lastItemIsLeft || i3 % 2 !== 0 && lastItemIsLeft) {
|
|
59711
|
+
destination.y = position.y - shockSize;
|
|
59712
|
+
} else {
|
|
59713
|
+
destination.y = position.y + shockSize;
|
|
59714
|
+
}
|
|
59715
|
+
}
|
|
59716
|
+
moveTickers.push(new MoveTicker({
|
|
59717
|
+
destination,
|
|
59718
|
+
speed,
|
|
59719
|
+
speedProgression,
|
|
59720
|
+
startOnlyIfHaveTexture
|
|
59721
|
+
}, void 0, priority));
|
|
59722
|
+
}
|
|
59723
|
+
moveTickers.push(new MoveTicker({
|
|
59724
|
+
destination: position,
|
|
59725
|
+
speed,
|
|
59726
|
+
speedProgression,
|
|
59727
|
+
startOnlyIfHaveTexture,
|
|
59728
|
+
tickerAliasToResume: alias
|
|
59729
|
+
}, void 0, priority));
|
|
59730
|
+
let id3 = canvas.addTickersSteps(alias, moveTickers);
|
|
59731
|
+
if (id3) {
|
|
59732
|
+
canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3, alias });
|
|
59733
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
59734
|
+
}
|
|
59735
|
+
}
|
|
59736
|
+
|
|
59737
|
+
// src/functions/canvas/image-utility.ts
|
|
59738
|
+
function addImage(alias, imageUrl) {
|
|
59739
|
+
let image = new CanvasImage();
|
|
59740
|
+
image.imageLink = imageUrl;
|
|
59741
|
+
canvas.add(alias, image);
|
|
59742
|
+
return image;
|
|
59743
|
+
}
|
|
59744
|
+
async function loadImage(canvasImages) {
|
|
59745
|
+
if (!Array.isArray(canvasImages)) {
|
|
59746
|
+
return [canvasImages];
|
|
59747
|
+
}
|
|
59748
|
+
let promises = Array(canvasImages.length);
|
|
59749
|
+
for (let i3 = 0; i3 < canvasImages.length; i3++) {
|
|
59750
|
+
promises[i3] = getTexture(canvasImages[i3].imageLink);
|
|
59751
|
+
}
|
|
59752
|
+
return Promise.all(promises).then((textures) => {
|
|
59753
|
+
return textures.map((texture, index) => {
|
|
59754
|
+
if (texture) {
|
|
59755
|
+
canvasImages[index].texture = texture;
|
|
59756
|
+
return canvasImages[index];
|
|
59757
|
+
}
|
|
59758
|
+
canvasImages[index].load();
|
|
59759
|
+
return canvasImages[index];
|
|
59760
|
+
});
|
|
59761
|
+
});
|
|
59762
|
+
}
|
|
59763
|
+
async function showImage(alias, imageUrl) {
|
|
59764
|
+
let image = addImage(alias, imageUrl);
|
|
59765
|
+
await image.load();
|
|
59766
|
+
return image;
|
|
59767
|
+
}
|
|
59768
|
+
|
|
59769
|
+
// src/functions/canvas/video-utility.ts
|
|
59770
|
+
function addVideo(alias, videoUrl) {
|
|
59771
|
+
let video = new CanvasVideo();
|
|
59772
|
+
video.videoLink = videoUrl;
|
|
59773
|
+
canvas.add(alias, video);
|
|
59774
|
+
return video;
|
|
59775
|
+
}
|
|
59776
|
+
|
|
59777
|
+
// src/functions/canvas/canvas-transition.ts
|
|
59778
|
+
async function showWithDissolveTransition(alias, image, props = {}, priority) {
|
|
59779
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
59780
|
+
let oldCanvasAlias = void 0;
|
|
59781
|
+
if (canvas.find(alias)) {
|
|
59782
|
+
oldCanvasAlias = alias + "_temp_disolve";
|
|
59783
|
+
canvas.editAlias(alias, oldCanvasAlias);
|
|
59784
|
+
}
|
|
59785
|
+
let canvasElement;
|
|
59786
|
+
if (typeof image === "string") {
|
|
59787
|
+
if (checkIfVideo(image)) {
|
|
59788
|
+
canvasElement = addVideo(alias, image);
|
|
59789
|
+
} else {
|
|
59790
|
+
canvasElement = addImage(alias, image);
|
|
59791
|
+
}
|
|
59792
|
+
} else {
|
|
59793
|
+
canvasElement = image;
|
|
59794
|
+
canvas.add(alias, canvasElement);
|
|
59795
|
+
}
|
|
59796
|
+
if (canvasElement instanceof CanvasImage && canvasElement.texture?.label == "EMPTY") {
|
|
59797
|
+
await canvasElement.load();
|
|
59798
|
+
}
|
|
59799
|
+
oldCanvasAlias && canvas.copyCanvasElementProperty(oldCanvasAlias, alias);
|
|
59800
|
+
oldCanvasAlias && canvas.transferTickers(oldCanvasAlias, alias, "duplicate");
|
|
59801
|
+
canvasElement.alpha = 0;
|
|
59802
|
+
let effect = new FadeAlphaTicker({
|
|
59803
|
+
...props,
|
|
59804
|
+
type: "show",
|
|
59805
|
+
aliasToRemoveAfter: oldCanvasAlias,
|
|
59806
|
+
startOnlyIfHaveTexture: true
|
|
59807
|
+
}, 10, priority);
|
|
59808
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
59809
|
+
if (id3) {
|
|
59810
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
59811
|
+
return [id3];
|
|
59812
|
+
}
|
|
59813
|
+
}
|
|
59814
|
+
function removeWithDissolveTransition(alias, props = {}, priority) {
|
|
59815
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
59816
|
+
if (typeof alias === "string") {
|
|
59817
|
+
alias = [alias];
|
|
59818
|
+
}
|
|
59819
|
+
let effect = new FadeAlphaTicker({
|
|
59820
|
+
...props,
|
|
59821
|
+
type: "hide",
|
|
59822
|
+
aliasToRemoveAfter: alias,
|
|
59823
|
+
startOnlyIfHaveTexture: true
|
|
59824
|
+
}, 10, priority);
|
|
59825
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
59826
|
+
if (id3) {
|
|
59827
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
59828
|
+
return [id3];
|
|
59829
|
+
}
|
|
59830
|
+
}
|
|
59831
|
+
async function showWithFadeTransition(alias, image, props = {}, priority) {
|
|
59832
|
+
if (!canvas.find(alias)) {
|
|
59833
|
+
return showWithDissolveTransition(alias, image, props, priority);
|
|
59834
|
+
}
|
|
59835
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
59836
|
+
let oldCanvasAlias = alias + "_temp_fade";
|
|
59837
|
+
canvas.editAlias(alias, oldCanvasAlias);
|
|
59838
|
+
let canvasElement;
|
|
59839
|
+
if (typeof image === "string") {
|
|
59840
|
+
if (checkIfVideo(image)) {
|
|
59841
|
+
canvasElement = addVideo(alias, image);
|
|
59842
|
+
} else {
|
|
59843
|
+
canvasElement = addImage(alias, image);
|
|
59844
|
+
}
|
|
59845
|
+
} else {
|
|
59846
|
+
canvasElement = image;
|
|
59847
|
+
canvas.add(alias, canvasElement);
|
|
59848
|
+
}
|
|
59849
|
+
if (canvasElement instanceof CanvasImage && canvasElement.texture?.label == "EMPTY") {
|
|
59850
|
+
await canvasElement.load();
|
|
59851
|
+
}
|
|
59852
|
+
oldCanvasAlias && canvas.copyCanvasElementProperty(oldCanvasAlias, alias);
|
|
59853
|
+
oldCanvasAlias && canvas.transferTickers(oldCanvasAlias, alias, "duplicate");
|
|
59854
|
+
canvasElement.alpha = 0;
|
|
59855
|
+
let id1 = canvas.addTickersSteps(oldCanvasAlias, [
|
|
59856
|
+
new FadeAlphaTicker({
|
|
59857
|
+
...props,
|
|
59858
|
+
type: "hide",
|
|
59859
|
+
startOnlyIfHaveTexture: true
|
|
59860
|
+
}, void 0, priority)
|
|
59861
|
+
]);
|
|
59862
|
+
let id22 = canvas.addTickersSteps(alias, [
|
|
59863
|
+
Pause(props.duration || 1),
|
|
59864
|
+
new FadeAlphaTicker({
|
|
59865
|
+
...props,
|
|
59866
|
+
type: "show",
|
|
59867
|
+
startOnlyIfHaveTexture: true,
|
|
59868
|
+
aliasToRemoveAfter: oldCanvasAlias
|
|
59869
|
+
}, void 0, priority)
|
|
59870
|
+
]);
|
|
59871
|
+
let res = void 0;
|
|
59872
|
+
if (id1) {
|
|
59873
|
+
res = [id1];
|
|
59874
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id1, alias });
|
|
59875
|
+
}
|
|
59876
|
+
if (id22) {
|
|
59877
|
+
res ? res.push(id22) : res = [id22];
|
|
59878
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id22, alias });
|
|
59879
|
+
}
|
|
59880
|
+
return res;
|
|
59881
|
+
}
|
|
59882
|
+
function removeWithFadeTransition(alias, props = {}, priority) {
|
|
59883
|
+
return removeWithDissolveTransition(alias, props, priority);
|
|
59884
|
+
}
|
|
59885
|
+
async function moveIn(alias, image, props = {}, priority) {
|
|
59886
|
+
let direction = props.direction || "right";
|
|
59887
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
59888
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
59889
|
+
tickerAliasToResume.push(alias);
|
|
59890
|
+
let canvasElement;
|
|
59891
|
+
if (typeof image === "string") {
|
|
59892
|
+
if (checkIfVideo(image)) {
|
|
59893
|
+
canvasElement = addVideo(alias, image);
|
|
59894
|
+
} else {
|
|
59895
|
+
canvasElement = addImage(alias, image);
|
|
59896
|
+
}
|
|
59897
|
+
} else {
|
|
59898
|
+
canvasElement = image;
|
|
59899
|
+
canvas.add(alias, canvasElement);
|
|
59900
|
+
}
|
|
59901
|
+
if (canvasElement instanceof CanvasImage && canvasElement.texture?.label == "EMPTY") {
|
|
59902
|
+
await canvasElement.load();
|
|
59903
|
+
}
|
|
59904
|
+
let destination = { x: canvasElement.x, y: canvasElement.y };
|
|
59905
|
+
switch (direction) {
|
|
59906
|
+
case "up":
|
|
59907
|
+
canvasElement.y = canvas.canvasHeight + canvasElement.height;
|
|
59908
|
+
break;
|
|
59909
|
+
case "down":
|
|
59910
|
+
canvasElement.y = -canvasElement.height;
|
|
59911
|
+
break;
|
|
59912
|
+
case "left":
|
|
59913
|
+
canvasElement.x = canvas.canvasWidth + canvasElement.width;
|
|
59914
|
+
break;
|
|
59915
|
+
case "right":
|
|
59916
|
+
canvasElement.x = -canvasElement.width;
|
|
59917
|
+
break;
|
|
59918
|
+
}
|
|
59919
|
+
let effect = new MoveTicker({
|
|
59920
|
+
...props,
|
|
59921
|
+
tickerAliasToResume,
|
|
59922
|
+
destination,
|
|
59923
|
+
startOnlyIfHaveTexture: true
|
|
59924
|
+
}, void 0, priority);
|
|
59925
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
59926
|
+
if (id3) {
|
|
59927
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
59928
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
59929
|
+
return [id3];
|
|
59930
|
+
}
|
|
59931
|
+
}
|
|
59932
|
+
function moveOut(alias, props = {}, priority) {
|
|
59933
|
+
let direction = props.direction || "right";
|
|
59934
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
59935
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
59936
|
+
tickerAliasToResume.push(alias);
|
|
59937
|
+
let canvasElement = canvas.find(alias);
|
|
59938
|
+
if (!canvasElement) {
|
|
59939
|
+
console.warn("[Pixi\u2019VN] The canvas element is not found.");
|
|
59940
|
+
return;
|
|
59941
|
+
}
|
|
59942
|
+
let destination = { x: canvasElement.x, y: canvasElement.y };
|
|
59943
|
+
switch (direction) {
|
|
59944
|
+
case "up":
|
|
59945
|
+
destination.y = -canvasElement.height;
|
|
59946
|
+
break;
|
|
59947
|
+
case "down":
|
|
59948
|
+
destination.y = canvas.canvasHeight + canvasElement.height;
|
|
59949
|
+
break;
|
|
59950
|
+
case "left":
|
|
59951
|
+
destination.x = -canvasElement.width;
|
|
59952
|
+
break;
|
|
59953
|
+
case "right":
|
|
59954
|
+
destination.x = canvas.canvasWidth + canvasElement.width;
|
|
59955
|
+
break;
|
|
59956
|
+
}
|
|
59957
|
+
let effect = new MoveTicker({
|
|
59958
|
+
...props,
|
|
59959
|
+
tickerAliasToResume,
|
|
59960
|
+
destination,
|
|
59961
|
+
startOnlyIfHaveTexture: true,
|
|
59962
|
+
aliasToRemoveAfter: alias
|
|
59963
|
+
}, void 0, priority);
|
|
59964
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
59965
|
+
if (id3) {
|
|
59966
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
59967
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
59968
|
+
return [id3];
|
|
59969
|
+
}
|
|
59970
|
+
}
|
|
59971
|
+
async function zoomIn(alias, image, props = { direction: "right" }, priority) {
|
|
59972
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
59973
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
59974
|
+
tickerAliasToResume.push(alias);
|
|
59975
|
+
let canvasElement;
|
|
59976
|
+
if (typeof image === "string") {
|
|
59977
|
+
if (checkIfVideo(image)) {
|
|
59978
|
+
canvasElement = new CanvasVideo({}, image);
|
|
59979
|
+
} else {
|
|
59980
|
+
canvasElement = new CanvasImage({}, image);
|
|
59981
|
+
}
|
|
59982
|
+
} else {
|
|
59983
|
+
canvasElement = image;
|
|
59984
|
+
}
|
|
59985
|
+
if (canvas.find(alias)) {
|
|
59986
|
+
canvas.copyCanvasElementProperty(alias, canvasElement);
|
|
59987
|
+
}
|
|
59988
|
+
let container = new CanvasContainer();
|
|
59989
|
+
container.addChild(canvasElement);
|
|
59990
|
+
container.height = canvas.canvasHeight;
|
|
59991
|
+
container.width = canvas.canvasWidth;
|
|
59992
|
+
canvas.add(alias, container, { ignoreOldStyle: true });
|
|
59993
|
+
if (canvasElement instanceof CanvasImage && canvasElement.texture?.label == "EMPTY") {
|
|
59994
|
+
await canvasElement.load();
|
|
59995
|
+
}
|
|
59996
|
+
if (props.direction == "up") {
|
|
59997
|
+
container.pivot.y = canvas.canvasHeight;
|
|
59998
|
+
container.pivot.x = canvas.canvasWidth / 2;
|
|
59999
|
+
container.y = canvas.canvasHeight;
|
|
60000
|
+
container.x = canvas.canvasWidth / 2;
|
|
60001
|
+
} else if (props.direction == "down") {
|
|
60002
|
+
container.pivot.y = 0;
|
|
60003
|
+
container.pivot.x = canvas.canvasWidth / 2;
|
|
60004
|
+
container.y = 0;
|
|
60005
|
+
container.x = canvas.canvasWidth / 2;
|
|
60006
|
+
} else if (props.direction == "left") {
|
|
60007
|
+
container.pivot.x = canvas.canvasWidth;
|
|
60008
|
+
container.pivot.y = canvas.canvasHeight / 2;
|
|
60009
|
+
container.x = canvas.canvasWidth;
|
|
60010
|
+
container.y = canvas.canvasHeight / 2;
|
|
60011
|
+
} else if (props.direction == "right") {
|
|
60012
|
+
container.pivot.x = 0;
|
|
60013
|
+
container.pivot.y = canvas.canvasHeight / 2;
|
|
60014
|
+
container.x = 0;
|
|
60015
|
+
container.y = canvas.canvasHeight / 2;
|
|
60016
|
+
}
|
|
60017
|
+
container.scale.set(0);
|
|
60018
|
+
let effect = new ZoomTicker({
|
|
60019
|
+
...props,
|
|
60020
|
+
tickerAliasToResume,
|
|
60021
|
+
startOnlyIfHaveTexture: true,
|
|
60022
|
+
type: "zoom",
|
|
60023
|
+
limit: 1,
|
|
60024
|
+
isZoomInOut: true
|
|
60025
|
+
}, void 0, priority);
|
|
60026
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
60027
|
+
if (id3) {
|
|
60028
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
60029
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
60030
|
+
return [id3];
|
|
60031
|
+
}
|
|
60032
|
+
}
|
|
60033
|
+
function zoomOut(alias, props = { direction: "right" }, priority) {
|
|
60034
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
60035
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
60036
|
+
tickerAliasToResume.push(alias);
|
|
60037
|
+
let canvasElement = canvas.find(alias);
|
|
60038
|
+
if (!canvasElement) {
|
|
60039
|
+
console.warn("[Pixi\u2019VN] The canvas element is not found.");
|
|
60040
|
+
return;
|
|
60041
|
+
}
|
|
60042
|
+
let container = new CanvasContainer();
|
|
60043
|
+
container.addChild(canvasElement);
|
|
60044
|
+
container.height = canvas.canvasHeight;
|
|
60045
|
+
container.width = canvas.canvasWidth;
|
|
60046
|
+
canvas.add(alias, container);
|
|
60047
|
+
if (props.direction == "up") {
|
|
60048
|
+
container.pivot.y = canvas.canvasHeight;
|
|
60049
|
+
container.pivot.x = canvas.canvasWidth / 2;
|
|
60050
|
+
container.y = canvas.canvasHeight;
|
|
60051
|
+
container.x = canvas.canvasWidth / 2;
|
|
60052
|
+
} else if (props.direction == "down") {
|
|
60053
|
+
container.pivot.y = 0;
|
|
60054
|
+
container.pivot.x = canvas.canvasWidth / 2;
|
|
60055
|
+
container.y = 0;
|
|
60056
|
+
container.x = canvas.canvasWidth / 2;
|
|
60057
|
+
} else if (props.direction == "left") {
|
|
60058
|
+
container.pivot.x = canvas.canvasWidth;
|
|
60059
|
+
container.pivot.y = canvas.canvasHeight / 2;
|
|
60060
|
+
container.x = canvas.canvasWidth;
|
|
60061
|
+
container.y = canvas.canvasHeight / 2;
|
|
60062
|
+
} else if (props.direction == "right") {
|
|
60063
|
+
container.pivot.x = 0;
|
|
60064
|
+
container.pivot.y = canvas.canvasHeight / 2;
|
|
60065
|
+
container.x = 0;
|
|
60066
|
+
container.y = canvas.canvasHeight / 2;
|
|
60067
|
+
}
|
|
60068
|
+
container.scale.set(1);
|
|
60069
|
+
let effect = new ZoomTicker({
|
|
60070
|
+
...props,
|
|
60071
|
+
tickerAliasToResume,
|
|
60072
|
+
startOnlyIfHaveTexture: true,
|
|
60073
|
+
type: "unzoom",
|
|
60074
|
+
limit: 0,
|
|
60075
|
+
aliasToRemoveAfter: alias,
|
|
60076
|
+
isZoomInOut: true
|
|
60077
|
+
}, void 0, priority);
|
|
60078
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
60079
|
+
if (id3) {
|
|
60080
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
60081
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
60082
|
+
return [id3];
|
|
60083
|
+
}
|
|
60084
|
+
}
|
|
60085
|
+
async function pushIn(alias, image, props = { direction: "right" }, priority) {
|
|
60086
|
+
let oldCanvasAlias = alias + "_temp_push";
|
|
60087
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
60088
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
60089
|
+
tickerAliasToResume.push(alias);
|
|
60090
|
+
let canvasElement;
|
|
60091
|
+
if (typeof image === "string") {
|
|
60092
|
+
if (checkIfVideo(image)) {
|
|
60093
|
+
canvasElement = new CanvasVideo({}, image);
|
|
60094
|
+
} else {
|
|
60095
|
+
canvasElement = new CanvasImage({}, image);
|
|
60096
|
+
}
|
|
60097
|
+
} else {
|
|
60098
|
+
canvasElement = image;
|
|
60099
|
+
}
|
|
60100
|
+
let oldCanvas = canvas.find(alias);
|
|
60101
|
+
if (oldCanvas) {
|
|
60102
|
+
canvas.copyCanvasElementProperty(oldCanvas, canvasElement);
|
|
60103
|
+
canvas.editAlias(alias, oldCanvasAlias, { ignoreTickers: true });
|
|
60104
|
+
pushOut(oldCanvasAlias, props, priority);
|
|
60105
|
+
}
|
|
60106
|
+
let container = new CanvasContainer();
|
|
60107
|
+
container.height = canvas.canvasHeight;
|
|
60108
|
+
container.width = canvas.canvasWidth;
|
|
60109
|
+
container.addChild(canvasElement);
|
|
60110
|
+
canvas.add(alias, container, { ignoreOldStyle: true });
|
|
60111
|
+
if (canvasElement instanceof CanvasImage && canvasElement.texture?.label == "EMPTY") {
|
|
60112
|
+
await canvasElement.load();
|
|
60113
|
+
}
|
|
60114
|
+
if (props.direction == "up") {
|
|
60115
|
+
container.x = 0;
|
|
60116
|
+
container.y = -canvas.canvasHeight;
|
|
60117
|
+
} else if (props.direction == "down") {
|
|
60118
|
+
container.x = 0;
|
|
60119
|
+
container.y = canvas.canvasHeight;
|
|
60120
|
+
} else if (props.direction == "left") {
|
|
60121
|
+
container.x = canvas.canvasWidth;
|
|
60122
|
+
container.y = 0;
|
|
60123
|
+
} else if (props.direction == "right") {
|
|
60124
|
+
container.x = -canvas.canvasWidth;
|
|
60125
|
+
container.y = 0;
|
|
60126
|
+
}
|
|
60127
|
+
let effect = new MoveTicker({
|
|
60128
|
+
...props,
|
|
60129
|
+
tickerAliasToResume,
|
|
60130
|
+
startOnlyIfHaveTexture: true,
|
|
60131
|
+
isPushInOut: true,
|
|
60132
|
+
destination: { x: 0, y: 0 }
|
|
60133
|
+
}, void 0, priority);
|
|
60134
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
60135
|
+
if (id3) {
|
|
60136
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
60137
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
60138
|
+
return [id3];
|
|
60139
|
+
}
|
|
60140
|
+
}
|
|
60141
|
+
function pushOut(alias, props = { direction: "right" }, priority) {
|
|
60142
|
+
let mustBeCompletedBeforeNextStep = props.mustBeCompletedBeforeNextStep ?? true;
|
|
60143
|
+
let tickerAliasToResume = typeof props.tickerAliasToResume === "string" ? [props.tickerAliasToResume] : props.tickerAliasToResume || [];
|
|
60144
|
+
tickerAliasToResume.push(alias);
|
|
60145
|
+
let canvasElement = canvas.find(alias);
|
|
60146
|
+
if (!canvasElement) {
|
|
60147
|
+
console.warn("[Pixi\u2019VN] The canvas element is not found.");
|
|
60148
|
+
return;
|
|
60149
|
+
}
|
|
60150
|
+
let container = new CanvasContainer();
|
|
60151
|
+
container.pivot.x = 0;
|
|
60152
|
+
container.pivot.y = 0;
|
|
60153
|
+
container.x = 0;
|
|
60154
|
+
container.y = 0;
|
|
60155
|
+
container.addChild(canvasElement);
|
|
60156
|
+
canvas.add(alias, container, { ignoreOldStyle: true });
|
|
60157
|
+
let destination = { x: 0, y: 0 };
|
|
60158
|
+
if (props.direction == "up") {
|
|
60159
|
+
destination.y = canvas.canvasHeight;
|
|
60160
|
+
} else if (props.direction == "down") {
|
|
60161
|
+
destination.y = -canvas.canvasHeight;
|
|
60162
|
+
} else if (props.direction == "left") {
|
|
60163
|
+
destination.x = -canvas.canvasWidth;
|
|
60164
|
+
} else if (props.direction == "right") {
|
|
60165
|
+
destination.x = canvas.canvasWidth;
|
|
60166
|
+
}
|
|
60167
|
+
let effect = new MoveTicker({
|
|
60168
|
+
...props,
|
|
60169
|
+
tickerAliasToResume,
|
|
60170
|
+
startOnlyIfHaveTexture: true,
|
|
60171
|
+
destination,
|
|
60172
|
+
aliasToRemoveAfter: alias,
|
|
60173
|
+
isPushInOut: true
|
|
60174
|
+
}, void 0, priority);
|
|
60175
|
+
let id3 = canvas.addTicker(alias, effect);
|
|
60176
|
+
if (id3) {
|
|
60177
|
+
canvas.putOnPauseTicker(alias, id3);
|
|
60178
|
+
mustBeCompletedBeforeNextStep && canvas.addTickerMustBeCompletedBeforeNextStep({ id: id3 });
|
|
60179
|
+
return [id3];
|
|
60180
|
+
}
|
|
60181
|
+
}
|
|
60182
|
+
|
|
59498
60183
|
// src/functions/flags-utility.ts
|
|
59499
60184
|
function setFlag(name, value) {
|
|
59500
60185
|
let flags = storage.getVariable(storage.keysSystem.FLAGS_CATEGORY_KEY) || [];
|
|
@@ -59737,6 +60422,7 @@ var NarrationManagerStatic = class _NarrationManagerStatic {
|
|
|
59737
60422
|
canvas: {
|
|
59738
60423
|
elementAliasesOrder: [],
|
|
59739
60424
|
elements: {},
|
|
60425
|
+
stage: {},
|
|
59740
60426
|
tickers: {},
|
|
59741
60427
|
tickersSteps: {},
|
|
59742
60428
|
tickersOnPause: {}
|
|
@@ -60316,8 +61002,10 @@ var NarrationManager = class {
|
|
|
60316
61002
|
console.warn("[Pixi\u2019VN] stepSha not found");
|
|
60317
61003
|
}
|
|
60318
61004
|
try {
|
|
61005
|
+
if (NarrationManagerStatic.stepsRunning === 0) {
|
|
61006
|
+
canvas.forceCompletionOfReportedTickers();
|
|
61007
|
+
}
|
|
60319
61008
|
NarrationManagerStatic.stepsRunning++;
|
|
60320
|
-
canvas.forceCompletionOfReportedTickers();
|
|
60321
61009
|
let result = await step(props);
|
|
60322
61010
|
if (this.choiceMenuOptions?.length === 1 && this.choiceMenuOptions[0].autoSelect) {
|
|
60323
61011
|
let choice = this.choiceMenuOptions[0];
|
|
@@ -61335,6 +62023,13 @@ function getTextureMemory(texture) {
|
|
|
61335
62023
|
};
|
|
61336
62024
|
return textureMemory;
|
|
61337
62025
|
}
|
|
62026
|
+
function checkIfVideo(imageUrl) {
|
|
62027
|
+
if (imageUrl.match(new RegExp(`(${videoFormats.join("|")})$`))) {
|
|
62028
|
+
return true;
|
|
62029
|
+
} else {
|
|
62030
|
+
return false;
|
|
62031
|
+
}
|
|
62032
|
+
}
|
|
61338
62033
|
|
|
61339
62034
|
// src/classes/canvas/CanvasSprite.ts
|
|
61340
62035
|
var CANVAS_SPRITE_ID = "Sprite";
|
|
@@ -61615,6 +62310,20 @@ var CanvasVideo = class _CanvasVideo extends CanvasImage {
|
|
|
61615
62310
|
// src/classes/canvas/CanvasBase.ts
|
|
61616
62311
|
init_lib();
|
|
61617
62312
|
|
|
62313
|
+
// src/classes/CanvasEvent.ts
|
|
62314
|
+
var CanvasEvent = class {
|
|
62315
|
+
constructor() {
|
|
62316
|
+
this.id = this.constructor.prototype.id;
|
|
62317
|
+
}
|
|
62318
|
+
fn(_event, _element) {
|
|
62319
|
+
throw new Error("[Pixi\u2019VN] The method CanvasEvent.fn() must be overridden");
|
|
62320
|
+
}
|
|
62321
|
+
/**
|
|
62322
|
+
* Get the id of the event. This variable is used in the system to get the event by id, {@link getEventInstanceById}
|
|
62323
|
+
*/
|
|
62324
|
+
id = "event_id_not_set";
|
|
62325
|
+
};
|
|
62326
|
+
|
|
61618
62327
|
// src/classes/StoredClassModel.ts
|
|
61619
62328
|
var StoredClassModel = class {
|
|
61620
62329
|
/**
|
|
@@ -61656,7 +62365,7 @@ var StoredClassModel = class {
|
|
|
61656
62365
|
if (Object.keys(storageValue[this.id]).length === 0) {
|
|
61657
62366
|
delete storageValue[this.id];
|
|
61658
62367
|
}
|
|
61659
|
-
|
|
62368
|
+
storage.setVariable(this.categoryId, storageValue);
|
|
61660
62369
|
}
|
|
61661
62370
|
/**
|
|
61662
62371
|
* Get a property from the storage.
|
|
@@ -61871,6 +62580,9 @@ var Sound2 = class _Sound2 extends Sound {
|
|
|
61871
62580
|
}
|
|
61872
62581
|
};
|
|
61873
62582
|
|
|
62583
|
+
// src/labels/BaseCanvasElementTestLabel.ts
|
|
62584
|
+
init_lib();
|
|
62585
|
+
|
|
61874
62586
|
// src/labels/TestConstant.ts
|
|
61875
62587
|
var juliette = new CharacterBaseModel("___pixivn_juliette___", {
|
|
61876
62588
|
name: "Juliette",
|
|
@@ -61881,6 +62593,958 @@ var juliette = new CharacterBaseModel("___pixivn_juliette___", {
|
|
|
61881
62593
|
saveCharacter(juliette);
|
|
61882
62594
|
var eggHeadImage = "https://pixijs.com/assets/eggHead.png";
|
|
61883
62595
|
var eggHeadName = `<span style="color:purple">Egg Head</span>`;
|
|
62596
|
+
var flowerTopImage = "https://pixijs.com/assets/flowerTop.png";
|
|
62597
|
+
var flowerTopName = `<span style="color:green">Flower Top</span>`;
|
|
62598
|
+
var helmlokImage = "https://pixijs.com/assets/helmlok.png";
|
|
62599
|
+
var helmlokName = `<span style="color:blue">Helmlok</span>`;
|
|
62600
|
+
var skullyImage = "https://pixijs.com/assets/skully.png";
|
|
62601
|
+
var skullyName = `<span style="color:red">Skully</span>`;
|
|
62602
|
+
var bunnyImage = "https://pixijs.com/assets/bunny.png";
|
|
62603
|
+
var bunnyName = `Bunny`;
|
|
62604
|
+
var videoLink = "https://pixijs.com/assets/video.mp4";
|
|
62605
|
+
var musicalAudio = "https://pixijs.io/sound/examples/resources/musical.mp3";
|
|
62606
|
+
|
|
62607
|
+
// src/labels/BaseCanvasElementTestLabel.ts
|
|
62608
|
+
var BASE_CANVAS_ELEMENT_LABEL = "___pixi_vn_base_canvas_element_label___";
|
|
62609
|
+
var baseCanvasElementTestLabel = newLabel(
|
|
62610
|
+
BASE_CANVAS_ELEMENT_LABEL,
|
|
62611
|
+
[
|
|
62612
|
+
async () => {
|
|
62613
|
+
let number = 25;
|
|
62614
|
+
narration.dialogue = {
|
|
62615
|
+
character: juliette,
|
|
62616
|
+
text: `Here's what's going to happen: I'm going to create ${number} bunnies (CanvasSprites) and put them in a CanvasContainer.`
|
|
62617
|
+
};
|
|
62618
|
+
const container = new CanvasContainer();
|
|
62619
|
+
canvas.add("container", container);
|
|
62620
|
+
const texture = await Assets.load(bunnyImage);
|
|
62621
|
+
for (let i3 = 0; i3 < number; i3++) {
|
|
62622
|
+
const bunny = new CanvasSprite(texture);
|
|
62623
|
+
bunny.x = i3 % 5 * 40;
|
|
62624
|
+
bunny.y = Math.floor(i3 / 5) * 40;
|
|
62625
|
+
container.addChild(bunny);
|
|
62626
|
+
}
|
|
62627
|
+
container.x = canvas.screen.width / 2;
|
|
62628
|
+
container.y = canvas.screen.height / 2;
|
|
62629
|
+
container.pivot.x = container.width / 2;
|
|
62630
|
+
container.pivot.y = container.height / 2;
|
|
62631
|
+
canvas.addTicker("container", new RotateTicker({ speed: 1 }));
|
|
62632
|
+
},
|
|
62633
|
+
async () => {
|
|
62634
|
+
canvas.remove("container");
|
|
62635
|
+
narration.dialogue = {
|
|
62636
|
+
character: juliette,
|
|
62637
|
+
text: `Here's what's going to happen: I'm going to create some CanvasText with different styles and put them on the stage.
|
|
62638
|
+
But it will generate a warn message, because the FillGradient or FillPattern has not yet been supported by the Pixi\u2019VN ( you can see the status of the issue here: [#76](https://github.com/DRincs-Productions/pixi-vn/issues/76)).`
|
|
62639
|
+
};
|
|
62640
|
+
const basicStyle = new TextStyle({
|
|
62641
|
+
fill: "#ffffff"
|
|
62642
|
+
});
|
|
62643
|
+
const basicText = new CanvasText({
|
|
62644
|
+
text: "Basic text in pixi",
|
|
62645
|
+
style: basicStyle
|
|
62646
|
+
});
|
|
62647
|
+
basicText.x = 50;
|
|
62648
|
+
basicText.y = 100;
|
|
62649
|
+
canvas.add("basicText", basicText);
|
|
62650
|
+
const fill = new FillGradient(0, 0, 0, 36 * 1.7 * 7);
|
|
62651
|
+
const colors2 = [16777215, 65433].map((color) => Color.shared.setValue(color).toNumber());
|
|
62652
|
+
colors2.forEach((number, index) => {
|
|
62653
|
+
const ratio = index / colors2.length;
|
|
62654
|
+
fill.addColorStop(ratio, number);
|
|
62655
|
+
});
|
|
62656
|
+
const style = new TextStyle({
|
|
62657
|
+
fontFamily: "Arial",
|
|
62658
|
+
fontSize: 36,
|
|
62659
|
+
fontStyle: "italic",
|
|
62660
|
+
fontWeight: "bold",
|
|
62661
|
+
fill: { fill },
|
|
62662
|
+
stroke: { color: "#4a1850", width: 5, join: "round" },
|
|
62663
|
+
dropShadow: {
|
|
62664
|
+
color: "#ff5f74",
|
|
62665
|
+
blur: 4,
|
|
62666
|
+
angle: Math.PI / 6,
|
|
62667
|
+
distance: 6
|
|
62668
|
+
},
|
|
62669
|
+
wordWrap: true,
|
|
62670
|
+
wordWrapWidth: 440
|
|
62671
|
+
});
|
|
62672
|
+
const richText = new CanvasText({
|
|
62673
|
+
text: "Rich text with a lot of options and across multiple lines",
|
|
62674
|
+
style
|
|
62675
|
+
});
|
|
62676
|
+
richText.x = 50;
|
|
62677
|
+
richText.y = 220;
|
|
62678
|
+
canvas.add("richText", richText);
|
|
62679
|
+
const skewStyle = new TextStyle({
|
|
62680
|
+
fontFamily: "Arial",
|
|
62681
|
+
dropShadow: {
|
|
62682
|
+
alpha: 0.8,
|
|
62683
|
+
angle: 2.1,
|
|
62684
|
+
blur: 4,
|
|
62685
|
+
color: "0x111111",
|
|
62686
|
+
distance: 10
|
|
62687
|
+
},
|
|
62688
|
+
fill: "#ffffff",
|
|
62689
|
+
stroke: { color: "#004620", width: 12, join: "round" },
|
|
62690
|
+
fontSize: 60,
|
|
62691
|
+
fontWeight: "lighter"
|
|
62692
|
+
});
|
|
62693
|
+
const skewText = new CanvasText({
|
|
62694
|
+
text: "SKEW IS COOL",
|
|
62695
|
+
style: skewStyle
|
|
62696
|
+
});
|
|
62697
|
+
skewText.skew.set(0.65, -0.3);
|
|
62698
|
+
skewText.anchor.set(0.5, 0.5);
|
|
62699
|
+
skewText.x = 300;
|
|
62700
|
+
skewText.y = 480;
|
|
62701
|
+
canvas.add("skewText", skewText);
|
|
62702
|
+
}
|
|
62703
|
+
]
|
|
62704
|
+
);
|
|
62705
|
+
|
|
62706
|
+
// src/labels/CanvasEventsTestLabel.ts
|
|
62707
|
+
init_lib();
|
|
62708
|
+
var EventTest1 = class extends CanvasEvent {
|
|
62709
|
+
fn(event, sprite) {
|
|
62710
|
+
if (event === "pointerdown") {
|
|
62711
|
+
sprite.scale.x *= 1.25;
|
|
62712
|
+
sprite.scale.y *= 1.25;
|
|
62713
|
+
}
|
|
62714
|
+
}
|
|
62715
|
+
};
|
|
62716
|
+
EventTest1 = __decorateClass([
|
|
62717
|
+
eventDecorator("___pixi_vn_canvas_events_test_event1___")
|
|
62718
|
+
], EventTest1);
|
|
62719
|
+
var EventTest2 = class extends CanvasEvent {
|
|
62720
|
+
fn(event, sprite) {
|
|
62721
|
+
if (event === "pointerdown") {
|
|
62722
|
+
sprite.isdown = true;
|
|
62723
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button_down.png");
|
|
62724
|
+
sprite.alpha = 1;
|
|
62725
|
+
} else if (event === "pointerup" || event === "pointerupoutside") {
|
|
62726
|
+
sprite.isdown = false;
|
|
62727
|
+
if (sprite.isOver) {
|
|
62728
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button_over.png");
|
|
62729
|
+
} else {
|
|
62730
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button.png");
|
|
62731
|
+
}
|
|
62732
|
+
} else if (event === "pointerover") {
|
|
62733
|
+
sprite.isOver = true;
|
|
62734
|
+
if (sprite.isdown) {
|
|
62735
|
+
return;
|
|
62736
|
+
}
|
|
62737
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button_over.png");
|
|
62738
|
+
} else if (event === "pointerout") {
|
|
62739
|
+
sprite.isOver = false;
|
|
62740
|
+
if (sprite.isdown) {
|
|
62741
|
+
return;
|
|
62742
|
+
}
|
|
62743
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button.png");
|
|
62744
|
+
}
|
|
62745
|
+
}
|
|
62746
|
+
};
|
|
62747
|
+
EventTest2 = __decorateClass([
|
|
62748
|
+
eventDecorator("___pixi_vn_canvas_events_test_event2___")
|
|
62749
|
+
], EventTest2);
|
|
62750
|
+
var CANVAS_EVENTS_TEST_LABEL = "___pixi_vn_canvas_events_test___";
|
|
62751
|
+
var canvasEventsTestLabel = newLabel(
|
|
62752
|
+
CANVAS_EVENTS_TEST_LABEL,
|
|
62753
|
+
[
|
|
62754
|
+
() => narration.dialogue = {
|
|
62755
|
+
character: juliette,
|
|
62756
|
+
text: "This is the test of clickable elements in a canvas."
|
|
62757
|
+
},
|
|
62758
|
+
async () => {
|
|
62759
|
+
narration.dialogue = {
|
|
62760
|
+
character: juliette,
|
|
62761
|
+
text: `This is my friend, ${bunnyName}. It's small now, but if you try to click on it it will get bigger and bigger. (This example is from the official [PixiJS website](https://pixijs.com/8.x/examples/events/click).)`
|
|
62762
|
+
};
|
|
62763
|
+
const texture = await Assets.load(bunnyImage);
|
|
62764
|
+
const sprite = CanvasSprite.from(texture);
|
|
62765
|
+
sprite.scale.set(3);
|
|
62766
|
+
sprite.anchor.set(0.5);
|
|
62767
|
+
sprite.x = canvas.screen.width / 2;
|
|
62768
|
+
sprite.y = canvas.screen.height / 2;
|
|
62769
|
+
sprite.eventMode = "static";
|
|
62770
|
+
sprite.cursor = "pointer";
|
|
62771
|
+
sprite.onEvent("pointerdown", EventTest1);
|
|
62772
|
+
canvas.add("bunny", sprite);
|
|
62773
|
+
},
|
|
62774
|
+
async () => {
|
|
62775
|
+
canvas.clear();
|
|
62776
|
+
narration.dialogue = {
|
|
62777
|
+
character: juliette,
|
|
62778
|
+
text: `This is the test of buttons in a canvas. (This example is from the official [PixiJS website](https://pixijs.com/8.x/examples/events/interactivity).)`
|
|
62779
|
+
};
|
|
62780
|
+
const backgroundT = await Assets.load("https://pixijs.com/assets/bg_button.jpg");
|
|
62781
|
+
const background = new CanvasSprite(backgroundT);
|
|
62782
|
+
background.width = canvas.screen.width;
|
|
62783
|
+
background.height = canvas.screen.height;
|
|
62784
|
+
canvas.add("bg", background);
|
|
62785
|
+
const textureButton = await Assets.load("https://pixijs.com/assets/button.png");
|
|
62786
|
+
const buttons = [];
|
|
62787
|
+
const buttonPositions = [175, 75, 655, 75, 410, 325, 150, 465, 685, 445];
|
|
62788
|
+
for (let i3 = 0; i3 < 5; i3++) {
|
|
62789
|
+
const button = new CanvasSprite(textureButton);
|
|
62790
|
+
button.anchor.set(0.5);
|
|
62791
|
+
button.x = buttonPositions[i3 * 2];
|
|
62792
|
+
button.y = buttonPositions[i3 * 2 + 1];
|
|
62793
|
+
button.eventMode = "static";
|
|
62794
|
+
button.cursor = "pointer";
|
|
62795
|
+
button.onEvent("pointerdown", EventTest2).onEvent("pointerup", EventTest2).onEvent("pointerupoutside", EventTest2).onEvent("pointerover", EventTest2).onEvent("pointerout", EventTest2);
|
|
62796
|
+
canvas.add("button" + i3, button);
|
|
62797
|
+
buttons.push(button);
|
|
62798
|
+
}
|
|
62799
|
+
buttons[0].scale.set(1.2);
|
|
62800
|
+
buttons[2].rotation = Math.PI / 10;
|
|
62801
|
+
buttons[3].scale.set(0.8);
|
|
62802
|
+
buttons[4].scale.set(0.8, 1.2);
|
|
62803
|
+
buttons[4].rotation = Math.PI;
|
|
62804
|
+
}
|
|
62805
|
+
],
|
|
62806
|
+
{
|
|
62807
|
+
onLoadStep: async () => {
|
|
62808
|
+
await Assets.load([
|
|
62809
|
+
"https://pixijs.com/assets/bg_button.jpg",
|
|
62810
|
+
"https://pixijs.com/assets/button.png",
|
|
62811
|
+
"https://pixijs.com/assets/button_down.png",
|
|
62812
|
+
"https://pixijs.com/assets/button_over.png"
|
|
62813
|
+
]);
|
|
62814
|
+
}
|
|
62815
|
+
}
|
|
62816
|
+
);
|
|
62817
|
+
|
|
62818
|
+
// src/labels/ImagesAnimationsTestLabel.ts
|
|
62819
|
+
var IMAGE_ANIMAIONS_TEST_LABEL = "___pixi_vn_images_animations_test___";
|
|
62820
|
+
var imagesAnimationsTest = newLabel(IMAGE_ANIMAIONS_TEST_LABEL, [
|
|
62821
|
+
async () => {
|
|
62822
|
+
canvas.removeAll();
|
|
62823
|
+
narration.dialogue = { character: juliette, text: `These are my 4 puppets: ${eggHeadName}, ${flowerTopName}, ${helmlokName} and ${skullyName}. They can appear, disappear and animate at my will.` };
|
|
62824
|
+
let eggHead = addImage("eggHead", eggHeadImage);
|
|
62825
|
+
await eggHead.load();
|
|
62826
|
+
eggHead.x = 100;
|
|
62827
|
+
eggHead.y = 100;
|
|
62828
|
+
let flowerTop = addImage("flowerTop", flowerTopImage);
|
|
62829
|
+
flowerTop.x = 300;
|
|
62830
|
+
flowerTop.y = 100;
|
|
62831
|
+
flowerTop.load();
|
|
62832
|
+
let helmlok = addImage("helmlok", helmlokImage);
|
|
62833
|
+
helmlok.x = 100;
|
|
62834
|
+
helmlok.y = 300;
|
|
62835
|
+
let skully = addImage("skully", skullyImage);
|
|
62836
|
+
skully.x = 300;
|
|
62837
|
+
skully.y = 300;
|
|
62838
|
+
await loadImage([helmlok, skully]);
|
|
62839
|
+
},
|
|
62840
|
+
async () => {
|
|
62841
|
+
narration.dialogue = { character: juliette, text: "Here's what they can do." };
|
|
62842
|
+
narration.choiceMenuOptions = [
|
|
62843
|
+
new ChoiceMenuOption("Dissolve effect", imagesDissolveTest, {}),
|
|
62844
|
+
new ChoiceMenuOption("Fade effect", imagesFadeTest, {}),
|
|
62845
|
+
new ChoiceMenuOption("Rotate", imagesRotateTest, {}),
|
|
62846
|
+
new ChoiceMenuOption("Move", imagesMoveTest, {}),
|
|
62847
|
+
new ChoiceMenuOption("Zoom", imagesZoomTest, {}),
|
|
62848
|
+
new ChoiceMenuOption("Move in/out", imagesMoveInOutTest, {}),
|
|
62849
|
+
new ChoiceMenuOption("Zoom in/out", imagesZoomInOutTest, {}),
|
|
62850
|
+
new ChoiceMenuOption("Push in/out", imagesPushInOutTest, {}),
|
|
62851
|
+
new ChoiceMenuOption("Shake", shakeStageTest, {}),
|
|
62852
|
+
new ChoiceMenuOption("Add same alias", imagesAddSameAliasTestLabel, {}),
|
|
62853
|
+
new ChoiceMenuOptionClose("Cancel", { closeCurrentLabel: true })
|
|
62854
|
+
];
|
|
62855
|
+
},
|
|
62856
|
+
(props) => narration.jumpLabel(IMAGE_ANIMAIONS_TEST_LABEL, props)
|
|
62857
|
+
]);
|
|
62858
|
+
var imagesDissolveTest = newLabel("___pixi_vn_images_dissolve_test___", [
|
|
62859
|
+
() => {
|
|
62860
|
+
narration.dialogue = {
|
|
62861
|
+
character: juliette,
|
|
62862
|
+
text: `Here's what's going to happen:
|
|
62863
|
+
- ${eggHeadName} will disappear with a dissolve effect. If you go next, ${eggHeadName} reappears with a dissolve effect without stopping the dissolve effect
|
|
62864
|
+
- ${eggHeadName} will appear instead of ${flowerTopName}.
|
|
62865
|
+
- ${helmlokName} will disappear with a fade effect and reappear with a fade effect, and repeat.
|
|
62866
|
+
- ${skullyName} will disappear with a fade effect, wait for 0.5 seconds, and reappear with a fade effect.`
|
|
62867
|
+
};
|
|
62868
|
+
removeWithDissolveTransition(["eggHead"], { duration: 2 });
|
|
62869
|
+
let eggHead = new CanvasImage({ x: 300, y: 100 }, eggHeadImage);
|
|
62870
|
+
showWithDissolveTransition("flowerTop", eggHead, { duration: 1 });
|
|
62871
|
+
canvas.addTickersSteps(
|
|
62872
|
+
"helmlok",
|
|
62873
|
+
[
|
|
62874
|
+
new FadeAlphaTicker({
|
|
62875
|
+
duration: 1,
|
|
62876
|
+
type: "hide"
|
|
62877
|
+
}, 1),
|
|
62878
|
+
new FadeAlphaTicker({
|
|
62879
|
+
duration: 1,
|
|
62880
|
+
type: "show"
|
|
62881
|
+
}, 1),
|
|
62882
|
+
Repeat
|
|
62883
|
+
]
|
|
62884
|
+
);
|
|
62885
|
+
canvas.addTickersSteps(
|
|
62886
|
+
"skully",
|
|
62887
|
+
[
|
|
62888
|
+
new FadeAlphaTicker({
|
|
62889
|
+
duration: 0.5,
|
|
62890
|
+
type: "hide",
|
|
62891
|
+
limit: 0.3
|
|
62892
|
+
}, 1),
|
|
62893
|
+
Pause(0.5),
|
|
62894
|
+
new FadeAlphaTicker({
|
|
62895
|
+
duration: 1,
|
|
62896
|
+
type: "show"
|
|
62897
|
+
}, 1)
|
|
62898
|
+
]
|
|
62899
|
+
);
|
|
62900
|
+
},
|
|
62901
|
+
async () => {
|
|
62902
|
+
showWithDissolveTransition("eggHead", eggHeadImage, { duration: 0.5 });
|
|
62903
|
+
}
|
|
62904
|
+
]);
|
|
62905
|
+
var imagesFadeTest = newLabel("___pixi_vn_images_fade_test___", [
|
|
62906
|
+
() => {
|
|
62907
|
+
narration.dialogue = {
|
|
62908
|
+
character: juliette,
|
|
62909
|
+
text: `Here's what's going to happen:
|
|
62910
|
+
- ${eggHeadName} will disappear with a dissolve effect. If you go next, ${eggHeadName} reappears with a dissolve effect with stopping the dissolve effect
|
|
62911
|
+
- ${eggHeadName} will appear instead of ${flowerTopName}.
|
|
62912
|
+
- ${helmlokName} will disappear with a fade effect and reappear with a fade effect, and repeat.
|
|
62913
|
+
- ${skullyName} will disappear with a fade effect, wait for 0.5 seconds, and reappear with a fade effect.`
|
|
62914
|
+
};
|
|
62915
|
+
removeWithFadeTransition(["eggHead"], { duration: 2 });
|
|
62916
|
+
let eggHead = new CanvasImage({ x: 300, y: 100 }, eggHeadImage);
|
|
62917
|
+
showWithFadeTransition("flowerTop", eggHead, { duration: 1 });
|
|
62918
|
+
canvas.addTickersSteps(
|
|
62919
|
+
"helmlok",
|
|
62920
|
+
[
|
|
62921
|
+
new FadeAlphaTicker({
|
|
62922
|
+
duration: 1,
|
|
62923
|
+
type: "hide"
|
|
62924
|
+
}),
|
|
62925
|
+
new FadeAlphaTicker({
|
|
62926
|
+
duration: 1,
|
|
62927
|
+
type: "show"
|
|
62928
|
+
}),
|
|
62929
|
+
Repeat
|
|
62930
|
+
]
|
|
62931
|
+
);
|
|
62932
|
+
canvas.addTickersSteps(
|
|
62933
|
+
"skully",
|
|
62934
|
+
[
|
|
62935
|
+
new FadeAlphaTicker({
|
|
62936
|
+
duration: 0.5,
|
|
62937
|
+
type: "hide",
|
|
62938
|
+
limit: 0.3
|
|
62939
|
+
}),
|
|
62940
|
+
Pause(0.5),
|
|
62941
|
+
new FadeAlphaTicker({
|
|
62942
|
+
duration: 1,
|
|
62943
|
+
type: "show"
|
|
62944
|
+
})
|
|
62945
|
+
]
|
|
62946
|
+
);
|
|
62947
|
+
},
|
|
62948
|
+
async () => {
|
|
62949
|
+
let eggHeadOld = canvas.find("eggHead");
|
|
62950
|
+
if (eggHeadOld)
|
|
62951
|
+
eggHeadOld.alpha = 0;
|
|
62952
|
+
showWithFadeTransition("eggHead", eggHeadImage, { duration: 0.5 });
|
|
62953
|
+
}
|
|
62954
|
+
]);
|
|
62955
|
+
var imagesRotateTest = newLabel("___pixi_vn_images_rotate_test___", [
|
|
62956
|
+
() => {
|
|
62957
|
+
narration.dialogue = {
|
|
62958
|
+
character: juliette,
|
|
62959
|
+
text: `Here's what's going to happen:
|
|
62960
|
+
- ${eggHeadName} will rotate with a anchor set to 0.
|
|
62961
|
+
- ${flowerTopName} will rotate with a anchor set to 0.5 and a exponential speed progression.
|
|
62962
|
+
- ${helmlokName} will rotate with a anchor set to 0.5, rotate clockwise for 2 seconds, rotate counterclockwise with a exponential (-0.05) speed progression, and when it reaches 0, it will repeat.
|
|
62963
|
+
- ${skullyName} will rotate with a anchor set to 1, rotate 3 seconds clockwise, wait for 0.5 seconds, and rotate 7 seconds counterclockwise.`
|
|
62964
|
+
};
|
|
62965
|
+
let eggHead = canvas.find("eggHead");
|
|
62966
|
+
if (eggHead)
|
|
62967
|
+
eggHead.anchor.set(0);
|
|
62968
|
+
let flowerTop = canvas.find("flowerTop");
|
|
62969
|
+
if (flowerTop)
|
|
62970
|
+
flowerTop.anchor.set(0.5);
|
|
62971
|
+
let helmlok = canvas.find("helmlok");
|
|
62972
|
+
if (helmlok)
|
|
62973
|
+
helmlok.anchor.set(0.5);
|
|
62974
|
+
let skully = canvas.find("skully");
|
|
62975
|
+
if (skully)
|
|
62976
|
+
skully.anchor.set(1);
|
|
62977
|
+
canvas.addTicker("eggHead", new RotateTicker({
|
|
62978
|
+
speed: 6,
|
|
62979
|
+
clockwise: true
|
|
62980
|
+
}));
|
|
62981
|
+
canvas.addTicker("flowerTop", new RotateTicker({
|
|
62982
|
+
speed: 6,
|
|
62983
|
+
clockwise: false,
|
|
62984
|
+
speedProgression: { type: "exponential", percentage: 0.01, limit: 300 }
|
|
62985
|
+
}));
|
|
62986
|
+
canvas.addTickersSteps("helmlok", [
|
|
62987
|
+
new RotateTicker({
|
|
62988
|
+
speed: 6,
|
|
62989
|
+
clockwise: true
|
|
62990
|
+
}, 2),
|
|
62991
|
+
new RotateTicker({
|
|
62992
|
+
speed: 100,
|
|
62993
|
+
clockwise: false,
|
|
62994
|
+
speedProgression: { type: "exponential", percentage: -0.05 }
|
|
62995
|
+
}),
|
|
62996
|
+
Repeat
|
|
62997
|
+
]);
|
|
62998
|
+
canvas.addTickersSteps("skully", [
|
|
62999
|
+
new RotateTicker({
|
|
63000
|
+
speed: 6,
|
|
63001
|
+
clockwise: true
|
|
63002
|
+
}, 3),
|
|
63003
|
+
Pause(0.5),
|
|
63004
|
+
new RotateTicker({
|
|
63005
|
+
speed: 6,
|
|
63006
|
+
clockwise: false
|
|
63007
|
+
}, 7)
|
|
63008
|
+
]);
|
|
63009
|
+
}
|
|
63010
|
+
]);
|
|
63011
|
+
var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
|
|
63012
|
+
() => {
|
|
63013
|
+
narration.dialogue = {
|
|
63014
|
+
character: juliette,
|
|
63015
|
+
text: `Here's what's going to happen:
|
|
63016
|
+
- ${eggHeadName} will move to { x: 500, y: 100 } with a speed of 24.
|
|
63017
|
+
- ${flowerTopName} will move to { x: 500, y: 300 } with a speed of 18.
|
|
63018
|
+
- ${helmlokName} will move to { x: 100, y: 500 } with a speed of 150 and a linear speed progression of -2 ( limit 10 ), and then move to { x: 1700, y: 500 } with a speed of 10 and a linear speed progression of 2 ( limit 150 ), and repeat.
|
|
63019
|
+
- ${skullyName} will move to { x: 500, y: 500 } with a speed of 40, wait for 0.5 seconds, and move to { x: 100, y: 100 } with a speed of 40.`
|
|
63020
|
+
};
|
|
63021
|
+
canvas.addTicker("eggHead", new MoveTicker({
|
|
63022
|
+
destination: { x: 500, y: 100 },
|
|
63023
|
+
speed: 24
|
|
63024
|
+
}));
|
|
63025
|
+
canvas.addTicker("flowerTop", new MoveTicker({
|
|
63026
|
+
destination: { x: 500, y: 300 },
|
|
63027
|
+
speed: 18
|
|
63028
|
+
}));
|
|
63029
|
+
canvas.addTickersSteps("helmlok", [
|
|
63030
|
+
new MoveTicker({
|
|
63031
|
+
destination: { x: 100, y: 500 },
|
|
63032
|
+
speed: 150,
|
|
63033
|
+
speedProgression: { type: "linear", amt: -2, limit: 10 }
|
|
63034
|
+
}),
|
|
63035
|
+
new MoveTicker({
|
|
63036
|
+
destination: { x: 1700, y: 500 },
|
|
63037
|
+
speed: 10,
|
|
63038
|
+
speedProgression: { type: "linear", amt: 2, limit: 150 }
|
|
63039
|
+
}),
|
|
63040
|
+
Repeat
|
|
63041
|
+
]);
|
|
63042
|
+
canvas.addTickersSteps("skully", [
|
|
63043
|
+
new MoveTicker({
|
|
63044
|
+
destination: { x: 500, y: 500 },
|
|
63045
|
+
speed: 40
|
|
63046
|
+
}),
|
|
63047
|
+
Pause(0.5),
|
|
63048
|
+
new MoveTicker({
|
|
63049
|
+
destination: { x: 100, y: 100 },
|
|
63050
|
+
speed: 40
|
|
63051
|
+
})
|
|
63052
|
+
]);
|
|
63053
|
+
}
|
|
63054
|
+
]);
|
|
63055
|
+
var imagesZoomTest = newLabel("___pixi_vn_images_zoom_test___", [
|
|
63056
|
+
() => {
|
|
63057
|
+
narration.dialogue = {
|
|
63058
|
+
character: juliette,
|
|
63059
|
+
text: `Here's what's going to happen:
|
|
63060
|
+
- ${eggHeadName} will zoom out with a speed of 3 and a limit of -0.5.
|
|
63061
|
+
- ${flowerTopName} will zoom in with a speed of 3 and a limit of 2.
|
|
63062
|
+
- ${helmlokName} will unzoom with a speed of 3 and a limit of -1, and zoom in with a speed of 3 and a limit of 1, and repeat.
|
|
63063
|
+
- ${skullyName} will zoom in with a speed of 0.1 and a limit of 5, wait for 0.5 seconds, and zoom out with a speed of 3 and a limit of 1.`
|
|
63064
|
+
};
|
|
63065
|
+
let eggHead = canvas.find("eggHead");
|
|
63066
|
+
if (eggHead)
|
|
63067
|
+
eggHead.scale.set(2);
|
|
63068
|
+
let helmlok = canvas.find("helmlok");
|
|
63069
|
+
if (helmlok)
|
|
63070
|
+
helmlok.anchor.set(0.5);
|
|
63071
|
+
canvas.addTicker("eggHead", new ZoomTicker({
|
|
63072
|
+
speed: 3,
|
|
63073
|
+
limit: -0.5,
|
|
63074
|
+
type: "unzoom"
|
|
63075
|
+
}));
|
|
63076
|
+
canvas.addTicker("flowerTop", new ZoomTicker({
|
|
63077
|
+
speed: 3,
|
|
63078
|
+
limit: 2
|
|
63079
|
+
}));
|
|
63080
|
+
canvas.addTickersSteps("helmlok", [
|
|
63081
|
+
new ZoomTicker({
|
|
63082
|
+
speed: 3,
|
|
63083
|
+
limit: -1,
|
|
63084
|
+
type: "unzoom"
|
|
63085
|
+
}),
|
|
63086
|
+
new ZoomTicker({
|
|
63087
|
+
speed: 3,
|
|
63088
|
+
limit: 1
|
|
63089
|
+
}),
|
|
63090
|
+
Repeat
|
|
63091
|
+
]);
|
|
63092
|
+
canvas.addTickersSteps("skully", [
|
|
63093
|
+
new ZoomTicker({
|
|
63094
|
+
speed: 0.1,
|
|
63095
|
+
limit: 5,
|
|
63096
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63097
|
+
}),
|
|
63098
|
+
Pause(0.5),
|
|
63099
|
+
new ZoomTicker({
|
|
63100
|
+
"type": "unzoom",
|
|
63101
|
+
speed: 3,
|
|
63102
|
+
limit: 1
|
|
63103
|
+
})
|
|
63104
|
+
]);
|
|
63105
|
+
}
|
|
63106
|
+
]);
|
|
63107
|
+
var imagesMoveInOutTest = newLabel("___pixi_vn_images_move_in_out_test___", [
|
|
63108
|
+
async () => {
|
|
63109
|
+
narration.dialogue = {
|
|
63110
|
+
character: juliette,
|
|
63111
|
+
text: `Here's what's going to happen:
|
|
63112
|
+
- ${eggHeadName} will move in from the top with a speed of 80. If you go next, ${eggHeadName} will move out from the bottom with a speed of 80.
|
|
63113
|
+
- ${flowerTopName} will move in from the right with a speed of 80 and a speed progression of 0.02. If you go next, ${flowerTopName} will move out from the left with a speed of 80 and a speed progression of 0.02.
|
|
63114
|
+
- ${helmlokName} will move in from the left with a speed of 80. If you go next, ${helmlokName} will move out from the right with a speed of 80.
|
|
63115
|
+
- ${skullyName} will move in from the bottom with a speed of 80 and a speed progression of 0.02. If you go next, ${skullyName} will move out from the top with a speed of 80 and a speed progression of 0.02.`
|
|
63116
|
+
};
|
|
63117
|
+
let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
|
|
63118
|
+
let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
|
|
63119
|
+
let helmlok = new CanvasImage({ x: 100, y: 300 }, helmlokImage);
|
|
63120
|
+
let skully = new CanvasImage({ x: 300, y: 300 }, skullyImage);
|
|
63121
|
+
moveIn("eggHead", eggHead, { speed: 80, direction: "down" });
|
|
63122
|
+
moveIn("flowerTop", flowerTop, {
|
|
63123
|
+
speed: 80,
|
|
63124
|
+
direction: "left",
|
|
63125
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63126
|
+
});
|
|
63127
|
+
moveIn("helmlok", helmlok, { speed: 80, direction: "right" });
|
|
63128
|
+
moveIn("skully", skully, {
|
|
63129
|
+
speed: 80,
|
|
63130
|
+
direction: "up",
|
|
63131
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63132
|
+
});
|
|
63133
|
+
},
|
|
63134
|
+
() => {
|
|
63135
|
+
moveOut("eggHead", { speed: 80, direction: "down" });
|
|
63136
|
+
moveOut("flowerTop", { speed: 80, direction: "left" });
|
|
63137
|
+
moveOut("helmlok", { speed: 80, direction: "right" });
|
|
63138
|
+
moveOut("skully", { speed: 80, direction: "up" });
|
|
63139
|
+
}
|
|
63140
|
+
]);
|
|
63141
|
+
var imagesZoomInOutTest = newLabel("___pixi_vn_images_zoom_in_out_test___", [
|
|
63142
|
+
async () => {
|
|
63143
|
+
narration.dialogue = {
|
|
63144
|
+
character: juliette,
|
|
63145
|
+
text: `Here's what's going to happen:
|
|
63146
|
+
- ${eggHeadName} will zoom in with a speed of 3. If you go next, ${eggHeadName} will zoom out with a speed of 3.
|
|
63147
|
+
- ${flowerTopName} will zoom in with a speed of 3 and a speed progression of 0.02. If you go next, ${flowerTopName} will zoom out with a speed of 3.
|
|
63148
|
+
- ${helmlokName} will zoom in with a speed of 3. If you go next, ${helmlokName} will zoom out with a speed of 1.
|
|
63149
|
+
- ${skullyName} will zoom in with a speed of 3 and a speed progression of 0.02. If you go next, ${skullyName} will zoom out with a speed of 3 and a speed progression of 0.02.`
|
|
63150
|
+
};
|
|
63151
|
+
canvas.removeAll();
|
|
63152
|
+
let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
|
|
63153
|
+
let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
|
|
63154
|
+
let helmlok = new CanvasImage({ x: 100, y: 300 }, helmlokImage);
|
|
63155
|
+
let skully = new CanvasImage({ x: 300, y: 300 }, skullyImage);
|
|
63156
|
+
zoomIn("eggHead", eggHead, { speed: 3, direction: "down" });
|
|
63157
|
+
zoomIn("flowerTop", flowerTop, {
|
|
63158
|
+
speed: 3,
|
|
63159
|
+
direction: "left",
|
|
63160
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63161
|
+
});
|
|
63162
|
+
zoomIn("helmlok", helmlok, { speed: 3, direction: "right" });
|
|
63163
|
+
zoomIn("skully", skully, {
|
|
63164
|
+
speed: 3,
|
|
63165
|
+
direction: "up",
|
|
63166
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63167
|
+
});
|
|
63168
|
+
},
|
|
63169
|
+
async () => {
|
|
63170
|
+
zoomOut("eggHead", {
|
|
63171
|
+
speed: 3,
|
|
63172
|
+
direction: "down",
|
|
63173
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63174
|
+
});
|
|
63175
|
+
zoomOut("flowerTop", { speed: 3, direction: "left" });
|
|
63176
|
+
zoomOut("helmlok", { speed: 1, direction: "right" });
|
|
63177
|
+
zoomOut("skully", {
|
|
63178
|
+
speed: 3,
|
|
63179
|
+
direction: "up",
|
|
63180
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63181
|
+
});
|
|
63182
|
+
}
|
|
63183
|
+
]);
|
|
63184
|
+
var imagesPushInOutTest = newLabel("___pixi_vn_images_push_in_out_test___", [
|
|
63185
|
+
async () => {
|
|
63186
|
+
narration.dialogue = {
|
|
63187
|
+
character: juliette,
|
|
63188
|
+
text: `Here's what's going to happen:`
|
|
63189
|
+
};
|
|
63190
|
+
let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
|
|
63191
|
+
let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
|
|
63192
|
+
let helmlok = new CanvasImage({ x: 100, y: 300 }, helmlokImage);
|
|
63193
|
+
let skully = new CanvasImage({ x: 300, y: 300 }, skullyImage);
|
|
63194
|
+
pushIn("eggHead", eggHead, { speed: 20, direction: "down" });
|
|
63195
|
+
pushIn("flowerTop", flowerTop, {
|
|
63196
|
+
speed: 3,
|
|
63197
|
+
direction: "left",
|
|
63198
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63199
|
+
});
|
|
63200
|
+
pushIn("helmlok", helmlok, { speed: 30, direction: "right" });
|
|
63201
|
+
pushIn("skully", skully, {
|
|
63202
|
+
speed: 3,
|
|
63203
|
+
direction: "up",
|
|
63204
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63205
|
+
});
|
|
63206
|
+
},
|
|
63207
|
+
async () => {
|
|
63208
|
+
pushOut("eggHead", {
|
|
63209
|
+
speed: 3,
|
|
63210
|
+
direction: "down",
|
|
63211
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63212
|
+
});
|
|
63213
|
+
pushOut("flowerTop", { speed: 30, direction: "left" });
|
|
63214
|
+
pushOut("helmlok", { speed: 10, direction: "right" });
|
|
63215
|
+
pushOut("skully", {
|
|
63216
|
+
speed: 3,
|
|
63217
|
+
direction: "up",
|
|
63218
|
+
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
63219
|
+
});
|
|
63220
|
+
}
|
|
63221
|
+
]);
|
|
63222
|
+
var imagesAddSameAliasTestLabel = newLabel("___pixi_vn_images_add_same_tag_test___", [
|
|
63223
|
+
() => {
|
|
63224
|
+
narration.dialogue = {
|
|
63225
|
+
character: juliette,
|
|
63226
|
+
text: `Now they will be added at each step with the same alias. Here's what's going to happen, All styles and tickers will be transferred to the new image.`
|
|
63227
|
+
};
|
|
63228
|
+
canvas.remove("flowerTop");
|
|
63229
|
+
canvas.remove("helmlok");
|
|
63230
|
+
canvas.remove("skully");
|
|
63231
|
+
let skully = canvas.find("eggHead");
|
|
63232
|
+
if (skully) {
|
|
63233
|
+
skully.anchor.set(0.5);
|
|
63234
|
+
skully.alpha = 0.5;
|
|
63235
|
+
}
|
|
63236
|
+
canvas.addTicker("eggHead", new RotateTicker({
|
|
63237
|
+
speed: 6
|
|
63238
|
+
}));
|
|
63239
|
+
canvas.addTickersSteps("eggHead", [
|
|
63240
|
+
new MoveTicker({
|
|
63241
|
+
destination: { x: 100, y: 100 },
|
|
63242
|
+
speed: 200
|
|
63243
|
+
}),
|
|
63244
|
+
new MoveTicker({
|
|
63245
|
+
destination: { x: 100, y: 500 },
|
|
63246
|
+
speed: 200
|
|
63247
|
+
}),
|
|
63248
|
+
new MoveTicker({
|
|
63249
|
+
destination: { x: 1700, y: 500 },
|
|
63250
|
+
speed: 200
|
|
63251
|
+
}),
|
|
63252
|
+
new MoveTicker({
|
|
63253
|
+
destination: { x: 1700, y: 100 },
|
|
63254
|
+
speed: 200
|
|
63255
|
+
}),
|
|
63256
|
+
Repeat
|
|
63257
|
+
]);
|
|
63258
|
+
},
|
|
63259
|
+
async () => await showImage("eggHead", flowerTopImage),
|
|
63260
|
+
async () => await showWithDissolveTransition("eggHead", helmlokImage),
|
|
63261
|
+
async () => await showWithFadeTransition("eggHead", skullyImage),
|
|
63262
|
+
async () => await moveIn("eggHead", eggHeadImage, { speed: 100 }),
|
|
63263
|
+
async () => await zoomIn("eggHead", eggHeadImage),
|
|
63264
|
+
async () => await pushIn("eggHead", eggHeadImage)
|
|
63265
|
+
]);
|
|
63266
|
+
var shakeStageTest = newLabel("___pixi_vn_images_shake_stage_test___", [
|
|
63267
|
+
() => {
|
|
63268
|
+
narration.dialogue = {
|
|
63269
|
+
character: juliette,
|
|
63270
|
+
text: `Ok this is a test for the shake effect. The ${eggHeadName} will shake.`
|
|
63271
|
+
};
|
|
63272
|
+
shakeEffect("eggHead");
|
|
63273
|
+
},
|
|
63274
|
+
() => {
|
|
63275
|
+
narration.dialogue = {
|
|
63276
|
+
character: juliette,
|
|
63277
|
+
text: `Now the whole stage will shake.`
|
|
63278
|
+
};
|
|
63279
|
+
shakeEffect(CANVAS_APP_STAGE_ALIAS);
|
|
63280
|
+
}
|
|
63281
|
+
]);
|
|
63282
|
+
|
|
63283
|
+
// src/labels/InputTestLabel.ts
|
|
63284
|
+
var INPUT_TEST_LABEL = "___pixi_vn_input_test___";
|
|
63285
|
+
var inputTestLabel = newLabel(
|
|
63286
|
+
INPUT_TEST_LABEL,
|
|
63287
|
+
[
|
|
63288
|
+
() => {
|
|
63289
|
+
narration.dialogue = {
|
|
63290
|
+
character: juliette,
|
|
63291
|
+
text: "What is your name?"
|
|
63292
|
+
};
|
|
63293
|
+
narration.requestInput({ type: "string" });
|
|
63294
|
+
},
|
|
63295
|
+
() => {
|
|
63296
|
+
narration.dialogue = {
|
|
63297
|
+
character: juliette,
|
|
63298
|
+
text: `Nice to meet you, ${narration.inputValue}!`
|
|
63299
|
+
};
|
|
63300
|
+
}
|
|
63301
|
+
]
|
|
63302
|
+
);
|
|
63303
|
+
|
|
63304
|
+
// src/labels/MarkdownTest.ts
|
|
63305
|
+
var MARKDOWN_TEST_LABEL = "___pixi_vn_markdown_test___";
|
|
63306
|
+
var markdownTest = newLabel(MARKDOWN_TEST_LABEL, [
|
|
63307
|
+
async () => {
|
|
63308
|
+
narration.dialogue = {
|
|
63309
|
+
character: juliette,
|
|
63310
|
+
text: `
|
|
63311
|
+
# Markdown Test
|
|
63312
|
+
|
|
63313
|
+
Hello, this is a test of the markdown parser. Pixi'VN does not manage markdown, but you can implement a markdown parser to display text with markdown syntax.
|
|
63314
|
+
|
|
63315
|
+
For example in React, you can use the library [react-markdown](https://www.npmjs.com/package/react-markdown).
|
|
63316
|
+
|
|
63317
|
+
## Colored Text
|
|
63318
|
+
|
|
63319
|
+
<span style="color:blue">some *blue* text</span>.
|
|
63320
|
+
|
|
63321
|
+
<span style="color:red">some *red* text</span>.
|
|
63322
|
+
|
|
63323
|
+
<span style="color:green">some *green* text</span>.
|
|
63324
|
+
|
|
63325
|
+
## Bold Text
|
|
63326
|
+
|
|
63327
|
+
**This is bold text.**
|
|
63328
|
+
|
|
63329
|
+
## Italic Text
|
|
63330
|
+
|
|
63331
|
+
*This is italic text.*
|
|
63332
|
+
|
|
63333
|
+
## Delete Text
|
|
63334
|
+
|
|
63335
|
+
~~This is deleted text.~~
|
|
63336
|
+
|
|
63337
|
+
## Link Test
|
|
63338
|
+
|
|
63339
|
+
[Link to Google](https://www.google.com)
|
|
63340
|
+
|
|
63341
|
+
## H2 Test
|
|
63342
|
+
|
|
63343
|
+
### H3 Test
|
|
63344
|
+
|
|
63345
|
+
#### H4 Test
|
|
63346
|
+
|
|
63347
|
+
## Code Test
|
|
63348
|
+
|
|
63349
|
+
\`Hello World\`
|
|
63350
|
+
|
|
63351
|
+
\`\`\`js
|
|
63352
|
+
console.log("Hello World")
|
|
63353
|
+
\`\`\`
|
|
63354
|
+
|
|
63355
|
+
## List Test
|
|
63356
|
+
|
|
63357
|
+
- Item 1
|
|
63358
|
+
* Item 2
|
|
63359
|
+
- [x] Item 3
|
|
63360
|
+
|
|
63361
|
+
## Table Test
|
|
63362
|
+
|
|
63363
|
+
| Header 1 | Header 2 |
|
|
63364
|
+
| -------- | -------- |
|
|
63365
|
+
| Cell 1 | Cell 2 |
|
|
63366
|
+
|
|
63367
|
+
## Separator Test
|
|
63368
|
+
|
|
63369
|
+
***
|
|
63370
|
+
Footer
|
|
63371
|
+
|
|
63372
|
+
`
|
|
63373
|
+
};
|
|
63374
|
+
}
|
|
63375
|
+
]);
|
|
63376
|
+
|
|
63377
|
+
// src/labels/SoundTestLabel.ts
|
|
63378
|
+
var SOUND_TEST_LABEL = "___pixi_vn_sound_test___";
|
|
63379
|
+
var soundTestLabel = newLabel(
|
|
63380
|
+
SOUND_TEST_LABEL,
|
|
63381
|
+
[
|
|
63382
|
+
() => {
|
|
63383
|
+
narration.dialogue = {
|
|
63384
|
+
character: juliette,
|
|
63385
|
+
text: "This is a sound test label. You should be hearing a loop1Audio sound."
|
|
63386
|
+
};
|
|
63387
|
+
sound2.add("audio", musicalAudio);
|
|
63388
|
+
sound2.play("audio");
|
|
63389
|
+
},
|
|
63390
|
+
() => {
|
|
63391
|
+
narration.dialogue = {
|
|
63392
|
+
character: juliette,
|
|
63393
|
+
text: "Now the sound should be stopped."
|
|
63394
|
+
};
|
|
63395
|
+
sound2.stop("audio");
|
|
63396
|
+
},
|
|
63397
|
+
() => {
|
|
63398
|
+
narration.dialogue = {
|
|
63399
|
+
character: juliette,
|
|
63400
|
+
text: "Now the sound should be playing again, with loop"
|
|
63401
|
+
};
|
|
63402
|
+
let s2 = sound2.find("audio");
|
|
63403
|
+
s2.loop = true;
|
|
63404
|
+
s2.play();
|
|
63405
|
+
},
|
|
63406
|
+
() => {
|
|
63407
|
+
narration.dialogue = {
|
|
63408
|
+
character: juliette,
|
|
63409
|
+
text: "Now the sound should be stopped."
|
|
63410
|
+
};
|
|
63411
|
+
sound2.stop("audio");
|
|
63412
|
+
},
|
|
63413
|
+
() => {
|
|
63414
|
+
narration.dialogue = {
|
|
63415
|
+
character: juliette,
|
|
63416
|
+
text: "Now the sound should be playing again, with loop and ReverbFilter"
|
|
63417
|
+
};
|
|
63418
|
+
let s2 = sound2.add("audio", {
|
|
63419
|
+
loop: true,
|
|
63420
|
+
url: musicalAudio
|
|
63421
|
+
});
|
|
63422
|
+
s2.filters = [new filters.ReverbFilter()];
|
|
63423
|
+
sound2.play("audio");
|
|
63424
|
+
},
|
|
63425
|
+
async (props) => {
|
|
63426
|
+
sound2.stop("audio");
|
|
63427
|
+
await narration.goNext(props);
|
|
63428
|
+
}
|
|
63429
|
+
]
|
|
63430
|
+
);
|
|
63431
|
+
|
|
63432
|
+
// src/labels/StepLabelTest.ts
|
|
63433
|
+
var STEP_LABEL_TEST_LABEL = "___pixi_vn_step_label_test___";
|
|
63434
|
+
var stepLabelTestLAbel = newLabel(STEP_LABEL_TEST_LABEL, [
|
|
63435
|
+
async () => {
|
|
63436
|
+
narration.dialogue = { character: juliette, text: `Pixi'VN manages the succession of "screens" with steps. Each step is a function that can be asynchronous.` };
|
|
63437
|
+
},
|
|
63438
|
+
async () => {
|
|
63439
|
+
narration.dialogue = { character: juliette, text: "The labels are containers of steps, they are used to organize the steps in a more readable way. For start a steps sequence, you must call or jump to a label." };
|
|
63440
|
+
},
|
|
63441
|
+
async () => {
|
|
63442
|
+
narration.dialogue = { character: juliette, text: "It is also possible to ask the player to make a choice." };
|
|
63443
|
+
},
|
|
63444
|
+
async () => {
|
|
63445
|
+
narration.dialogue = { character: juliette, text: "Browsing through available tests is one way to test the steps/labels system." };
|
|
63446
|
+
}
|
|
63447
|
+
]);
|
|
63448
|
+
|
|
63449
|
+
// src/labels/VideoTestLabel.ts
|
|
63450
|
+
var VIDEO_TEST_LABEL = "___pixi_vn_video_test___";
|
|
63451
|
+
var videoTest = newLabel(VIDEO_TEST_LABEL, [
|
|
63452
|
+
async () => {
|
|
63453
|
+
narration.dialogue = {
|
|
63454
|
+
character: juliette,
|
|
63455
|
+
text: `This is the test of video elements in a canvas. I have added a video element to the canvas with dissolve transition.`
|
|
63456
|
+
};
|
|
63457
|
+
showWithDissolveTransition("video", videoLink, { duration: 1 });
|
|
63458
|
+
},
|
|
63459
|
+
async () => {
|
|
63460
|
+
narration.dialogue = {
|
|
63461
|
+
character: juliette,
|
|
63462
|
+
text: `The video is now paused.`
|
|
63463
|
+
};
|
|
63464
|
+
let video = canvas.find("video");
|
|
63465
|
+
if (video) {
|
|
63466
|
+
video.pause();
|
|
63467
|
+
}
|
|
63468
|
+
},
|
|
63469
|
+
async () => {
|
|
63470
|
+
narration.dialogue = {
|
|
63471
|
+
character: juliette,
|
|
63472
|
+
text: `The video is now playing.`
|
|
63473
|
+
};
|
|
63474
|
+
let video = canvas.find("video");
|
|
63475
|
+
if (video) {
|
|
63476
|
+
video.play();
|
|
63477
|
+
video.loop = true;
|
|
63478
|
+
}
|
|
63479
|
+
},
|
|
63480
|
+
async () => {
|
|
63481
|
+
narration.dialogue = {
|
|
63482
|
+
character: juliette,
|
|
63483
|
+
text: `The video is now restarted.`
|
|
63484
|
+
};
|
|
63485
|
+
let video = canvas.find("video");
|
|
63486
|
+
if (video) {
|
|
63487
|
+
video.restart();
|
|
63488
|
+
}
|
|
63489
|
+
}
|
|
63490
|
+
]);
|
|
63491
|
+
|
|
63492
|
+
// src/labels/StartLabel.ts
|
|
63493
|
+
var pixivnTestStartLabel = newLabel(
|
|
63494
|
+
"___pixi_vn_example_start_label___",
|
|
63495
|
+
[
|
|
63496
|
+
() => {
|
|
63497
|
+
let currentTimeName = "";
|
|
63498
|
+
const hour = (/* @__PURE__ */ new Date()).getHours();
|
|
63499
|
+
if (hour >= 5 && hour < 12) {
|
|
63500
|
+
currentTimeName = "morning\u{1F505}";
|
|
63501
|
+
} else if (hour >= 12 && hour < 18) {
|
|
63502
|
+
currentTimeName = "afternoon\u{1F506}";
|
|
63503
|
+
} else if (hour >= 18 && hour < 22) {
|
|
63504
|
+
currentTimeName = "evening\u26C5";
|
|
63505
|
+
} else {
|
|
63506
|
+
currentTimeName = "night\u{1F319}";
|
|
63507
|
+
}
|
|
63508
|
+
narration.dialogue = { character: juliette, text: `Good ${currentTimeName}! I'm ${juliette.name}, your virtual assistant. I'm here to help you with your tests.` };
|
|
63509
|
+
},
|
|
63510
|
+
() => narration.dialogue = { character: juliette, text: `You are running the Pixi\u2019VN v${version} test. This test will guide you through the different features of the library.` },
|
|
63511
|
+
(props) => narration.jumpLabel(pixivnTestStartLabel2, props)
|
|
63512
|
+
]
|
|
63513
|
+
);
|
|
63514
|
+
var openLink = newLabel(
|
|
63515
|
+
"___pixi_vn_open_link___",
|
|
63516
|
+
[
|
|
63517
|
+
async (props) => {
|
|
63518
|
+
window.open(props.link);
|
|
63519
|
+
await narration.goNext(props);
|
|
63520
|
+
}
|
|
63521
|
+
]
|
|
63522
|
+
);
|
|
63523
|
+
var RESTART_TEST_LABEL = "___pixi_vn_restart_test_label___";
|
|
63524
|
+
var pixivnTestStartLabel2 = newLabel(
|
|
63525
|
+
RESTART_TEST_LABEL,
|
|
63526
|
+
[
|
|
63527
|
+
() => {
|
|
63528
|
+
canvas.clear();
|
|
63529
|
+
narration.dialogue = { character: juliette, text: "Which test would you like to start with?" };
|
|
63530
|
+
narration.choiceMenuOptions = [
|
|
63531
|
+
new ChoiceMenuOption("Open Pixi\u2019VN Wiki", openLink, { link: "https://pixi-vn.web.app/" }),
|
|
63532
|
+
new ChoiceMenuOption("Open Pixi\u2019VN Discord", openLink, { link: "https://discord.gg/E95FZWakzp" }),
|
|
63533
|
+
new ChoiceMenuOption("Open Pixi\u2019VN Github Issues", openLink, { link: "https://github.com/DRincs-Productions/pixi-vn/issues" }),
|
|
63534
|
+
new ChoiceMenuOption("Images, Transitions and Animations Test", imagesAnimationsTest, {}),
|
|
63535
|
+
new ChoiceMenuOption("Video Test", videoTest, {}),
|
|
63536
|
+
new ChoiceMenuOption("Canvas Events Test", canvasEventsTestLabel, {}),
|
|
63537
|
+
new ChoiceMenuOption("Sound Test", soundTestLabel, {}),
|
|
63538
|
+
new ChoiceMenuOption("Base Canvas Element Test", baseCanvasElementTestLabel, {}),
|
|
63539
|
+
new ChoiceMenuOption("Custom Ticker Canvas Element Test", customTickerCanvasElementTestLabel, {}),
|
|
63540
|
+
new ChoiceMenuOption("Steps and Labels Test", stepLabelTestLAbel, {}),
|
|
63541
|
+
new ChoiceMenuOption("Markdown Test", markdownTest, {}),
|
|
63542
|
+
new ChoiceMenuOption("Input Test", inputTestLabel, {})
|
|
63543
|
+
];
|
|
63544
|
+
},
|
|
63545
|
+
(props) => narration.jumpLabel(RESTART_TEST_LABEL, props)
|
|
63546
|
+
]
|
|
63547
|
+
);
|
|
61884
63548
|
|
|
61885
63549
|
// src/labels/CustomTickerCanvasElementTestLabel.ts
|
|
61886
63550
|
var AlienTintingTest = class extends CanvasSprite {
|
|
@@ -61902,7 +63566,7 @@ var AlienTintingTest = class extends CanvasSprite {
|
|
|
61902
63566
|
turningSpeed = 0;
|
|
61903
63567
|
speed = 0;
|
|
61904
63568
|
static from(source7, skipCache) {
|
|
61905
|
-
let sprite =
|
|
63569
|
+
let sprite = CanvasSprite.from(source7, skipCache);
|
|
61906
63570
|
let mySprite = new AlienTintingTest();
|
|
61907
63571
|
mySprite.texture = sprite.texture;
|
|
61908
63572
|
return mySprite;
|