@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
package/dist/managers/index.cjs
CHANGED
|
@@ -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() {
|
|
@@ -57416,6 +57416,7 @@ var filters = {
|
|
|
57416
57416
|
StreamFilter: filters_exports.StreamFilter,
|
|
57417
57417
|
TelephoneFilter: filters_exports.TelephoneFilter
|
|
57418
57418
|
};
|
|
57419
|
+
var CANVAS_APP_STAGE_ALIAS = "_stage_";
|
|
57419
57420
|
|
|
57420
57421
|
// src/functions/canvas/canvas-utility.ts
|
|
57421
57422
|
function getTextureMemory(texture) {
|
|
@@ -58434,7 +58435,7 @@ function createExportableElement(element) {
|
|
|
58434
58435
|
let elementString = JSON.stringify(element);
|
|
58435
58436
|
return JSON.parse(elementString);
|
|
58436
58437
|
} catch (e2) {
|
|
58437
|
-
console.error("[Pixi\u2019VN] Error creating exportable element", e2);
|
|
58438
|
+
console.error("[Pixi\u2019VN] Error creating exportable element", element, e2);
|
|
58438
58439
|
throw new Error("[Pixi\u2019VN] Error creating exportable element");
|
|
58439
58440
|
}
|
|
58440
58441
|
}
|
|
@@ -58867,6 +58868,10 @@ var CanvasManager = class {
|
|
|
58867
58868
|
* ```
|
|
58868
58869
|
*/
|
|
58869
58870
|
add(alias, canvasElement, options = {}) {
|
|
58871
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
58872
|
+
console.error(`[Pixi\u2019VN] The alias ${CANVAS_APP_STAGE_ALIAS} is reserved`);
|
|
58873
|
+
return;
|
|
58874
|
+
}
|
|
58870
58875
|
let ignoreOldStyle = options?.ignoreOldStyle;
|
|
58871
58876
|
let oldCanvasElement = this.find(alias);
|
|
58872
58877
|
if (oldCanvasElement) {
|
|
@@ -58897,6 +58902,10 @@ var CanvasManager = class {
|
|
|
58897
58902
|
* ```
|
|
58898
58903
|
*/
|
|
58899
58904
|
remove(alias, options = {}) {
|
|
58905
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
58906
|
+
console.error(`[Pixi\u2019VN] The alias ${CANVAS_APP_STAGE_ALIAS} is reserved`);
|
|
58907
|
+
return;
|
|
58908
|
+
}
|
|
58900
58909
|
let ignoreTickers = options.ignoreTickers;
|
|
58901
58910
|
if (typeof alias === "string") {
|
|
58902
58911
|
alias = [alias];
|
|
@@ -58925,6 +58934,9 @@ var CanvasManager = class {
|
|
|
58925
58934
|
* ```
|
|
58926
58935
|
*/
|
|
58927
58936
|
find(alias) {
|
|
58937
|
+
if (alias === CANVAS_APP_STAGE_ALIAS) {
|
|
58938
|
+
return this.app.stage;
|
|
58939
|
+
}
|
|
58928
58940
|
return CanvasManagerStatic._children[alias];
|
|
58929
58941
|
}
|
|
58930
58942
|
/**
|
|
@@ -58951,16 +58963,17 @@ var CanvasManager = class {
|
|
|
58951
58963
|
this.removeAllTickers();
|
|
58952
58964
|
}
|
|
58953
58965
|
/**
|
|
58954
|
-
* Edit the alias of a canvas element.
|
|
58966
|
+
* Edit the alias of a canvas element. The tickers that are connected to the canvas element will be transferred.
|
|
58955
58967
|
* @param oldAlias The old alias of the canvas element.
|
|
58956
58968
|
* @param newAlias The new alias of the canvas element.
|
|
58969
|
+
* @param options The options of the canvas element.
|
|
58957
58970
|
*/
|
|
58958
|
-
editAlias(oldAlias, newAlias) {
|
|
58971
|
+
editAlias(oldAlias, newAlias, options = {}) {
|
|
58959
58972
|
if (CanvasManagerStatic._children[oldAlias]) {
|
|
58960
58973
|
CanvasManagerStatic._children[newAlias] = CanvasManagerStatic._children[oldAlias];
|
|
58961
58974
|
delete CanvasManagerStatic._children[oldAlias];
|
|
58962
58975
|
}
|
|
58963
|
-
this.transferTickers(oldAlias, newAlias, "move");
|
|
58976
|
+
!options.ignoreTickers && this.transferTickers(oldAlias, newAlias, "move");
|
|
58964
58977
|
}
|
|
58965
58978
|
/** Edit Tickers Methods */
|
|
58966
58979
|
/**
|
|
@@ -59035,12 +59048,16 @@ var CanvasManager = class {
|
|
|
59035
59048
|
pushTicker(id3, tickerData, ticker) {
|
|
59036
59049
|
CanvasManagerStatic._currentTickers[id3] = tickerData;
|
|
59037
59050
|
tickerData.fn = (t2) => {
|
|
59038
|
-
if (tickerData.createdByTicketSteps && this.isTickerPaused(tickerData.createdByTicketSteps.canvasElementAlias, tickerData.createdByTicketSteps.id)) {
|
|
59039
|
-
return;
|
|
59040
|
-
}
|
|
59041
59051
|
let data = CanvasManagerStatic._currentTickers[id3];
|
|
59042
59052
|
if (data) {
|
|
59043
|
-
let canvasElementAliases = data.canvasElementAliases
|
|
59053
|
+
let canvasElementAliases = data.canvasElementAliases;
|
|
59054
|
+
if (tickerData.createdByTicketSteps) {
|
|
59055
|
+
if (this.isTickerPaused(tickerData.createdByTicketSteps.canvasElementAlias, tickerData.createdByTicketSteps.id)) {
|
|
59056
|
+
return;
|
|
59057
|
+
}
|
|
59058
|
+
} else {
|
|
59059
|
+
canvasElementAliases = canvasElementAliases.filter((alias) => !this.isTickerPaused(alias, id3));
|
|
59060
|
+
}
|
|
59044
59061
|
ticker?.fn(t2, data.args, canvasElementAliases, id3);
|
|
59045
59062
|
}
|
|
59046
59063
|
};
|
|
@@ -59387,15 +59404,19 @@ var CanvasManager = class {
|
|
|
59387
59404
|
});
|
|
59388
59405
|
CanvasManagerStatic._tickersMustBeCompletedBeforeNextStep.stepAlias.forEach(({ alias, id: id3 }) => {
|
|
59389
59406
|
let ticker = CanvasManagerStatic._currentTickersSteps[alias];
|
|
59390
|
-
if (ticker && ticker[id3]
|
|
59391
|
-
ticker[id3].steps.
|
|
59392
|
-
|
|
59393
|
-
|
|
59394
|
-
|
|
59395
|
-
|
|
59407
|
+
if (ticker && ticker[id3]) {
|
|
59408
|
+
if (ticker[id3].steps.includes(Repeat)) {
|
|
59409
|
+
console.error(`[Pixi\u2019VN] The ticker alias: ${alias} id: ${id3} contains a RepeatType, so it can't be forced to complete`, ticker[id3]);
|
|
59410
|
+
} else {
|
|
59411
|
+
ticker[id3].steps.forEach((step) => {
|
|
59412
|
+
if (typeof step === "object" && "ticker" in step) {
|
|
59413
|
+
let ticker2 = geTickerInstanceById(step.ticker, step.args, step.duration, step.priority);
|
|
59414
|
+
if (ticker2) {
|
|
59415
|
+
ticker2.onEndOfTicker([alias], id3, step.args);
|
|
59416
|
+
}
|
|
59396
59417
|
}
|
|
59397
|
-
}
|
|
59398
|
-
}
|
|
59418
|
+
});
|
|
59419
|
+
}
|
|
59399
59420
|
}
|
|
59400
59421
|
});
|
|
59401
59422
|
CanvasManagerStatic._tickersMustBeCompletedBeforeNextStep = { tikersIds: [], stepAlias: [] };
|
|
@@ -59436,6 +59457,7 @@ var CanvasManager = class {
|
|
|
59436
59457
|
tickers: createExportableElement(CanvasManagerStatic.currentTickersWithoutCreatedBySteps),
|
|
59437
59458
|
tickersSteps: createExportableElement(CanvasManagerStatic._currentTickersSteps),
|
|
59438
59459
|
elements: createExportableElement(currentElements),
|
|
59460
|
+
stage: createExportableElement(getMemoryContainer(this.app.stage)),
|
|
59439
59461
|
elementAliasesOrder: createExportableElement(CanvasManagerStatic.childrenAliasesOrder),
|
|
59440
59462
|
tickersOnPause: createExportableElement(CanvasManagerStatic._tickersOnPause)
|
|
59441
59463
|
};
|
|
@@ -59469,6 +59491,11 @@ var CanvasManager = class {
|
|
|
59469
59491
|
console.error("[Pixi\u2019VN] The data does not have the properties elementAliasesOrder and elements");
|
|
59470
59492
|
return;
|
|
59471
59493
|
}
|
|
59494
|
+
if (data.hasOwnProperty("stage") && data.hasOwnProperty("stage")) {
|
|
59495
|
+
setMemoryContainer(this.app.stage, data["stage"]);
|
|
59496
|
+
} else {
|
|
59497
|
+
console.error("[Pixi\u2019VN] The data does not have the properties stage");
|
|
59498
|
+
}
|
|
59472
59499
|
if (data.hasOwnProperty("tickers")) {
|
|
59473
59500
|
let tickers = data["tickers"];
|
|
59474
59501
|
Object.entries(tickers).forEach(([oldId, t2]) => {
|
|
@@ -59630,8 +59657,8 @@ function getExponentialProgression(number, progression, valueConvert) {
|
|
|
59630
59657
|
// src/classes/ticker/MoveTicker.ts
|
|
59631
59658
|
var MoveTicker = class extends TickerBase {
|
|
59632
59659
|
fn(ticker, args, aliases, tickerId) {
|
|
59633
|
-
let xSpeed =
|
|
59634
|
-
let ySpeed =
|
|
59660
|
+
let xSpeed = 10;
|
|
59661
|
+
let ySpeed = 10;
|
|
59635
59662
|
if (args.speed) {
|
|
59636
59663
|
if (typeof args.speed === "number") {
|
|
59637
59664
|
xSpeed = this.speedConvert(args.speed);
|
|
@@ -59695,6 +59722,10 @@ var MoveTicker = class extends TickerBase {
|
|
|
59695
59722
|
let destination = args.destination;
|
|
59696
59723
|
element.x = destination.x;
|
|
59697
59724
|
element.y = destination.y;
|
|
59725
|
+
if (args.isPushInOut && element.children.length > 0) {
|
|
59726
|
+
let elementChild = element.children[0];
|
|
59727
|
+
canvas.add(alias2, elementChild, { ignoreOldStyle: true });
|
|
59728
|
+
}
|
|
59698
59729
|
}
|
|
59699
59730
|
});
|
|
59700
59731
|
super.onEndOfTicker(alias, tickerId, args);
|
|
@@ -60127,6 +60158,7 @@ var NarrationManagerStatic = class _NarrationManagerStatic {
|
|
|
60127
60158
|
canvas: {
|
|
60128
60159
|
elementAliasesOrder: [],
|
|
60129
60160
|
elements: {},
|
|
60161
|
+
stage: {},
|
|
60130
60162
|
tickers: {},
|
|
60131
60163
|
tickersSteps: {},
|
|
60132
60164
|
tickersOnPause: {}
|
|
@@ -60706,8 +60738,10 @@ var NarrationManager = class {
|
|
|
60706
60738
|
console.warn("[Pixi\u2019VN] stepSha not found");
|
|
60707
60739
|
}
|
|
60708
60740
|
try {
|
|
60741
|
+
if (NarrationManagerStatic.stepsRunning === 0) {
|
|
60742
|
+
canvas.forceCompletionOfReportedTickers();
|
|
60743
|
+
}
|
|
60709
60744
|
NarrationManagerStatic.stepsRunning++;
|
|
60710
|
-
canvas.forceCompletionOfReportedTickers();
|
|
60711
60745
|
let result = await step(props);
|
|
60712
60746
|
if (this.choiceMenuOptions?.length === 1 && this.choiceMenuOptions[0].autoSelect) {
|
|
60713
60747
|
let choice = this.choiceMenuOptions[0];
|
|
@@ -8,19 +8,23 @@ export { default as SoundManagerStatic } from './SoundManagerStatic.cjs';
|
|
|
8
8
|
export { default as StorageManagerStatic } from './StorageManagerStatic.cjs';
|
|
9
9
|
import 'pixi.js';
|
|
10
10
|
import '../classes/canvas/CanvasBase.cjs';
|
|
11
|
-
import '../interface/canvas/
|
|
12
|
-
import '../
|
|
13
|
-
import '../types/
|
|
11
|
+
import '../interface/canvas/canvas-memory.cjs';
|
|
12
|
+
import '../interface/canvas/TextureMemory.cjs';
|
|
13
|
+
import '../types/EventIdType.cjs';
|
|
14
|
+
import '../classes/ticker/TickerBase.cjs';
|
|
14
15
|
import '../types/TickerIdType.cjs';
|
|
15
|
-
import '../
|
|
16
|
-
import '../
|
|
16
|
+
import '../interface/TickerArgs.cjs';
|
|
17
|
+
import '../interface/Ticker.cjs';
|
|
17
18
|
import '../interface/export/ExportedCanvas.cjs';
|
|
18
19
|
import '../types/PauseTickerType.cjs';
|
|
19
|
-
import '../interface/ITickersSteps.cjs';
|
|
20
20
|
import '../interface/TickerHistory.cjs';
|
|
21
|
+
import '../interface/TickersSteps.cjs';
|
|
22
|
+
import '../types/PauseType.cjs';
|
|
23
|
+
import '../types/RepeatType.cjs';
|
|
21
24
|
import '../types/ChoiceMenuOptionsType.cjs';
|
|
22
25
|
import '../classes/ChoiceMenuOption.cjs';
|
|
23
26
|
import '../types/LabelIdType.cjs';
|
|
27
|
+
import '../types/StorageElementType.cjs';
|
|
24
28
|
import '../classes/Label.cjs';
|
|
25
29
|
import '../classes/LabelAbstract.cjs';
|
|
26
30
|
import '../types/StepLabelType.cjs';
|
|
@@ -31,13 +35,13 @@ import '../types/LabelRunModeType.cjs';
|
|
|
31
35
|
import '../types/InputInfo.cjs';
|
|
32
36
|
import '../interface/CharacterInterface.cjs';
|
|
33
37
|
import '../interface/export/ExportedStep.cjs';
|
|
34
|
-
import '../interface/
|
|
38
|
+
import '../interface/HistoryStep.cjs';
|
|
35
39
|
import 'deep-diff';
|
|
36
40
|
import '../interface/export/ExportedSounds.cjs';
|
|
37
41
|
import '../interface/SoundOptions.cjs';
|
|
38
42
|
import '@pixi/sound';
|
|
39
43
|
import '../types/SoundFilterMemory.cjs';
|
|
40
|
-
import '../interface/
|
|
44
|
+
import '../interface/OpenedLabel.cjs';
|
|
41
45
|
import '../interface/export/ExportedStorage.cjs';
|
|
42
46
|
import '../classes/Dialogue.cjs';
|
|
43
47
|
import '../interface/NarrativeHistory.cjs';
|
package/dist/managers/index.d.ts
CHANGED
|
@@ -8,19 +8,23 @@ export { default as SoundManagerStatic } from './SoundManagerStatic.js';
|
|
|
8
8
|
export { default as StorageManagerStatic } from './StorageManagerStatic.js';
|
|
9
9
|
import 'pixi.js';
|
|
10
10
|
import '../classes/canvas/CanvasBase.js';
|
|
11
|
-
import '../interface/canvas/
|
|
12
|
-
import '../
|
|
13
|
-
import '../types/
|
|
11
|
+
import '../interface/canvas/canvas-memory.js';
|
|
12
|
+
import '../interface/canvas/TextureMemory.js';
|
|
13
|
+
import '../types/EventIdType.js';
|
|
14
|
+
import '../classes/ticker/TickerBase.js';
|
|
14
15
|
import '../types/TickerIdType.js';
|
|
15
|
-
import '../
|
|
16
|
-
import '../
|
|
16
|
+
import '../interface/TickerArgs.js';
|
|
17
|
+
import '../interface/Ticker.js';
|
|
17
18
|
import '../interface/export/ExportedCanvas.js';
|
|
18
19
|
import '../types/PauseTickerType.js';
|
|
19
|
-
import '../interface/ITickersSteps.js';
|
|
20
20
|
import '../interface/TickerHistory.js';
|
|
21
|
+
import '../interface/TickersSteps.js';
|
|
22
|
+
import '../types/PauseType.js';
|
|
23
|
+
import '../types/RepeatType.js';
|
|
21
24
|
import '../types/ChoiceMenuOptionsType.js';
|
|
22
25
|
import '../classes/ChoiceMenuOption.js';
|
|
23
26
|
import '../types/LabelIdType.js';
|
|
27
|
+
import '../types/StorageElementType.js';
|
|
24
28
|
import '../classes/Label.js';
|
|
25
29
|
import '../classes/LabelAbstract.js';
|
|
26
30
|
import '../types/StepLabelType.js';
|
|
@@ -31,13 +35,13 @@ import '../types/LabelRunModeType.js';
|
|
|
31
35
|
import '../types/InputInfo.js';
|
|
32
36
|
import '../interface/CharacterInterface.js';
|
|
33
37
|
import '../interface/export/ExportedStep.js';
|
|
34
|
-
import '../interface/
|
|
38
|
+
import '../interface/HistoryStep.js';
|
|
35
39
|
import 'deep-diff';
|
|
36
40
|
import '../interface/export/ExportedSounds.js';
|
|
37
41
|
import '../interface/SoundOptions.js';
|
|
38
42
|
import '@pixi/sound';
|
|
39
43
|
import '../types/SoundFilterMemory.js';
|
|
40
|
-
import '../interface/
|
|
44
|
+
import '../interface/OpenedLabel.js';
|
|
41
45
|
import '../interface/export/ExportedStorage.js';
|
|
42
46
|
import '../classes/Dialogue.js';
|
|
43
47
|
import '../interface/NarrativeHistory.js';
|
package/dist/managers/index.js
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
narration,
|
|
8
8
|
sound,
|
|
9
9
|
storage
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-D3ZQSJKZ.js";
|
|
11
11
|
import "../chunk-OMPJ74CO.js";
|
|
12
12
|
import "../chunk-2BUPSB7O.js";
|
|
13
13
|
import "../chunk-CZKJI26F.js";
|
|
14
14
|
import "../chunk-I6TNJEE3.js";
|
|
15
15
|
import {
|
|
16
16
|
StorageManagerStatic
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-DPUSONJ3.js";
|
|
18
18
|
import {
|
|
19
19
|
CanvasManagerStatic
|
|
20
20
|
} from "../chunk-P44J5BE2.js";
|
|
@@ -26,12 +26,12 @@ import "../chunk-3DOISWD6.js";
|
|
|
26
26
|
import "../chunk-I4UGLC3A.js";
|
|
27
27
|
import "../chunk-ZZLQ3ILH.js";
|
|
28
28
|
import "../chunk-JTQGULTR.js";
|
|
29
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-FHNQBWIZ.js";
|
|
30
30
|
import "../chunk-ZBUW3MBH.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-PIYIZHZL.js";
|
|
32
32
|
import "../chunk-WX267JP2.js";
|
|
33
33
|
import "../chunk-LEMOIFSV.js";
|
|
34
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-A4NKPUL5.js";
|
|
35
35
|
import "../chunk-RATGPKD3.js";
|
|
36
36
|
import "../chunk-2PXN34ON.js";
|
|
37
37
|
import "../chunk-TAJJZPEH.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ChoiceMenuOption, { ChoiceMenuOptionClose } from '../classes/ChoiceMenuOption.cjs';
|
|
2
|
-
import './StorageElementType.cjs';
|
|
3
2
|
import './LabelIdType.cjs';
|
|
3
|
+
import './StorageElementType.cjs';
|
|
4
4
|
import '../classes/Label.cjs';
|
|
5
5
|
import '../classes/LabelAbstract.cjs';
|
|
6
6
|
import './StepLabelType.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ChoiceMenuOption, { ChoiceMenuOptionClose } from '../classes/ChoiceMenuOption.js';
|
|
2
|
-
import './StorageElementType.js';
|
|
3
2
|
import './LabelIdType.js';
|
|
3
|
+
import './StorageElementType.js';
|
|
4
4
|
import '../classes/Label.js';
|
|
5
5
|
import '../classes/LabelAbstract.js';
|
|
6
6
|
import './StepLabelType.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import TickerProgrationType from '../../interface/TickerProgrationType.cjs';
|
|
2
2
|
|
|
3
3
|
type MoveTickerProps = {
|
|
4
4
|
/**
|
|
5
5
|
* The speed of the movement
|
|
6
|
-
* @default
|
|
6
|
+
* @default 10
|
|
7
7
|
*/
|
|
8
8
|
speed?: number | {
|
|
9
9
|
x: number;
|
|
@@ -35,6 +35,12 @@ type MoveTickerProps = {
|
|
|
35
35
|
* @default []
|
|
36
36
|
*/
|
|
37
37
|
tickerAliasToResume?: string[] | string;
|
|
38
|
+
/**
|
|
39
|
+
* Is a special prop used in the push in/out transition.
|
|
40
|
+
* If true, get the first child of the container and add it to canvas on the end of the effect.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
isPushInOut?: boolean;
|
|
38
44
|
};
|
|
39
45
|
|
|
40
46
|
export type { MoveTickerProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import TickerProgrationType from '../../interface/TickerProgrationType.js';
|
|
2
2
|
|
|
3
3
|
type MoveTickerProps = {
|
|
4
4
|
/**
|
|
5
5
|
* The speed of the movement
|
|
6
|
-
* @default
|
|
6
|
+
* @default 10
|
|
7
7
|
*/
|
|
8
8
|
speed?: number | {
|
|
9
9
|
x: number;
|
|
@@ -35,6 +35,12 @@ type MoveTickerProps = {
|
|
|
35
35
|
* @default []
|
|
36
36
|
*/
|
|
37
37
|
tickerAliasToResume?: string[] | string;
|
|
38
|
+
/**
|
|
39
|
+
* Is a special prop used in the push in/out transition.
|
|
40
|
+
* If true, get the first child of the container and add it to canvas on the end of the effect.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
isPushInOut?: boolean;
|
|
38
44
|
};
|
|
39
45
|
|
|
40
46
|
export type { MoveTickerProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drincs/pixi-vn",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pixi'VN is a npm package that provides various features for creating visual novels.",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"pixi.js": "^8.5.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@drincs/pixi-vn": "^0.8.
|
|
32
|
+
"@drincs/pixi-vn": "^0.8.5",
|
|
33
33
|
"@pixi/devtools": "^2.0.1",
|
|
34
34
|
"@types/crypto-js": "^4.2.2",
|
|
35
35
|
"@types/deep-diff": "^1.0.5",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"deep-diff": "^1.0.2",
|
|
38
38
|
"jsdom": "^25.0.1",
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
|
-
"tsup": "^8.3.
|
|
40
|
+
"tsup": "^8.3.5",
|
|
41
41
|
"typescript": "^5.6.3",
|
|
42
|
-
"vitest": "^2.1.
|
|
42
|
+
"vitest": "^2.1.5"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
45
45
|
"game",
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { UPDATE_PRIORITY, Ticker } from 'pixi.js';
|
|
2
|
-
import { StorageElementType } from './types/StorageElementType.js';
|
|
3
|
-
import { TickerIdType } from './types/TickerIdType.js';
|
|
4
|
-
|
|
5
|
-
interface ITicker<TArgs extends TickerArgsType> {
|
|
6
|
-
/**
|
|
7
|
-
* Arguments to pass to the ticker
|
|
8
|
-
*/
|
|
9
|
-
args: TArgs;
|
|
10
|
-
/**
|
|
11
|
-
* Duration in seconds to run the ticker
|
|
12
|
-
*/
|
|
13
|
-
duration?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Priority of the ticker
|
|
16
|
-
*/
|
|
17
|
-
priority?: UPDATE_PRIORITY;
|
|
18
|
-
/**
|
|
19
|
-
* Get the id of the ticker. This variable is used in the system to get the ticker by id, {@link geTickerInstanceById}
|
|
20
|
-
*/
|
|
21
|
-
id: TickerIdType;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type TickerArgsType = {
|
|
25
|
-
[id: string]: StorageElementType;
|
|
26
|
-
} | {
|
|
27
|
-
aliasToRemoveAfter?: string[] | string;
|
|
28
|
-
[id: string]: StorageElementType;
|
|
29
|
-
}[];
|
|
30
|
-
/**
|
|
31
|
-
* A class is used to create a ticker element to add into a Pixi Application.
|
|
32
|
-
* You can use {@link canvas.addTicker()} to add this element into the application.
|
|
33
|
-
* This class should be extended and the fn method should be overridden.
|
|
34
|
-
* You must use the {@link tickerDecorator} to register the ticker in the game.
|
|
35
|
-
* In Ren'Py is a transform.
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* \@tickerDecorator() // this is equivalent to tickerDecorator("RotateTicker")
|
|
39
|
-
* export class RotateTicker extends TickerBase<{ speed?: number }> {
|
|
40
|
-
* override fn(
|
|
41
|
-
* t: Ticker, // the ticker that is calling this method
|
|
42
|
-
* args: { // the arguments that you passed when you added the ticker
|
|
43
|
-
* speed?: number,
|
|
44
|
-
* },
|
|
45
|
-
* aliases: string[], // the aliases of the canvas elements that are connected to this ticker
|
|
46
|
-
* tickerId: string, // the id of the ticker. You can use this to get the ticker from the canvas.currentTickers
|
|
47
|
-
* ): void {
|
|
48
|
-
* let speed = args.speed === undefined ? 0.1 : args.speed
|
|
49
|
-
* aliases.forEach((alias) => {
|
|
50
|
-
* let element = canvas.find(alias)
|
|
51
|
-
* if (element && element instanceof Container) {
|
|
52
|
-
* if (clockwise)
|
|
53
|
-
* element.rotation += speed * t.deltaTime
|
|
54
|
-
* else
|
|
55
|
-
* element.rotation -= speed * t.deltaTime
|
|
56
|
-
* }
|
|
57
|
-
* })
|
|
58
|
-
* }
|
|
59
|
-
* }
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
declare class TickerBase<TArgs extends TickerArgsType> implements ITicker<TArgs> {
|
|
63
|
-
/**
|
|
64
|
-
* @param args The arguments that you want to pass to the ticker.
|
|
65
|
-
* @param duration The duration of the ticker in seconds. If is undefined, the step will end only when the animation is finished (if the animation doesn't have a goal to reach then it won't finish). @default undefined
|
|
66
|
-
* @param priority The priority of the ticker. @default UPDATE_PRIORITY.NORMAL
|
|
67
|
-
*/
|
|
68
|
-
constructor(args: TArgs, duration?: number, priority?: UPDATE_PRIORITY);
|
|
69
|
-
/**
|
|
70
|
-
* Get the id of the ticker. This variable is used in the system to get the ticker by id, {@link geTickerInstanceById}
|
|
71
|
-
*/
|
|
72
|
-
id: TickerIdType;
|
|
73
|
-
args: TArgs;
|
|
74
|
-
duration?: number;
|
|
75
|
-
priority?: UPDATE_PRIORITY;
|
|
76
|
-
/**
|
|
77
|
-
* The method that will be called every frame.
|
|
78
|
-
* This method should be overridden and you can use {@link canvas.add()} to get the canvas element of the canvas, and edit them.
|
|
79
|
-
* @param _ticker The ticker that is calling this method
|
|
80
|
-
* @param _args The arguments that you passed when you added the ticker
|
|
81
|
-
* @param _alias The alias of the canvas elements that are connected to this ticker
|
|
82
|
-
* @param _tickerId The id of the ticker. You can use this to get the ticker from the {@link canvas.currentTickers}
|
|
83
|
-
*/
|
|
84
|
-
fn(_ticker: Ticker, _args: TArgs, _alias: string | string[], _tickerId: string): void;
|
|
85
|
-
/**
|
|
86
|
-
* This method is called when the ticker is added to the canvas.
|
|
87
|
-
* @param alias The alias of the canvas elements that are connected to this ticker
|
|
88
|
-
* @param tickerId The id of the ticker. You can use this to get the ticker from the {@link canvas.currentTickers}
|
|
89
|
-
* @param options The options that you passed when you added the ticker
|
|
90
|
-
*/
|
|
91
|
-
onEndOfTicker(_alias: string | string[], tickerId: string, args: TArgs): void;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export { type ITicker as I, TickerBase as T, type TickerArgsType as a };
|