@drincs/pixi-vn 0.9.7 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContainerChild-B5yD0BI8.d.ts → ContainerChild-AjuVp3wW.d.ts} +4 -1
- package/dist/{ContainerChild-WzyxEjAc.d.cts → ContainerChild-BUFxM6Ya.d.cts} +4 -1
- package/dist/WebGLRenderer-EFHDNV22.js +9 -0
- package/dist/WebGPURenderer-LEKL575M.js +10 -0
- package/dist/{browserAll-2HD5EH7K.js → browserAll-S4EPEXZD.js} +5 -5
- package/dist/{chunk-WNOARCWH.js → chunk-3XKVLXKN.js} +2 -2
- package/dist/{chunk-PP5T5HEO.js → chunk-52ZSR3AN.js} +1 -1
- package/dist/{chunk-SAUNZQHZ.js → chunk-D753T42C.js} +1 -1
- package/dist/{chunk-TOG67Z7Q.js → chunk-DQ47ST7G.js} +2 -2
- package/dist/{chunk-73ID6GAW.js → chunk-DWJGQ2A5.js} +2 -2
- package/dist/{chunk-5VX2VTDZ.js → chunk-DXOIIOAQ.js} +81 -27
- package/dist/{chunk-Z3NBKYVU.js → chunk-DZMWRZUL.js} +10 -9
- package/dist/{chunk-NB4Q3GFK.js → chunk-FXH7A6UR.js} +224 -53
- package/dist/{chunk-6GJXIPNB.js → chunk-GEY6RTYO.js} +1 -1
- package/dist/{chunk-CAWOWL3P.js → chunk-IG7HSAEJ.js} +75 -34
- package/dist/{chunk-PP3SBC3C.js → chunk-KAHX5SKO.js} +18 -15
- package/dist/{chunk-ODIEVSQX.js → chunk-OPLBQKS2.js} +3 -3
- package/dist/{chunk-Y3WNBACN.js → chunk-R4J2U4HN.js} +2 -2
- package/dist/{chunk-WS3FY4Q6.js → chunk-X55ALTH7.js} +2 -2
- package/dist/{chunk-5JREOVCG.js → chunk-XGGTEP7V.js} +1 -1
- package/dist/classes/CharacterBaseModel.cjs +397 -248
- package/dist/classes/CharacterBaseModel.js +14 -15
- package/dist/classes/CharacterStoredClass.cjs +397 -248
- package/dist/classes/CharacterStoredClass.js +14 -15
- package/dist/classes/ChoiceMenuOption.cjs +325 -178
- package/dist/classes/ChoiceMenuOption.js +14 -15
- package/dist/classes/Sound.cjs +397 -248
- package/dist/classes/Sound.js +14 -15
- package/dist/classes/StoredClassModel.cjs +397 -248
- package/dist/classes/StoredClassModel.js +14 -15
- package/dist/classes/canvas/AdditionalPositions.cjs +39323 -963
- package/dist/classes/canvas/AdditionalPositions.d.cts +3 -1
- package/dist/classes/canvas/AdditionalPositions.d.ts +3 -1
- package/dist/classes/canvas/AdditionalPositions.js +41 -10
- package/dist/classes/canvas/AnchorExtension.cjs +92 -48
- package/dist/classes/canvas/AnchorExtension.js +8 -8
- package/dist/classes/canvas/CanvasBaseItem.cjs +92 -48
- package/dist/classes/canvas/CanvasBaseItem.d.cts +1 -1
- package/dist/classes/canvas/CanvasBaseItem.d.ts +1 -1
- package/dist/classes/canvas/CanvasBaseItem.js +9 -9
- package/dist/classes/canvas/Container.cjs +389 -242
- package/dist/classes/canvas/Container.d.cts +1 -1
- package/dist/classes/canvas/Container.d.ts +1 -1
- package/dist/classes/canvas/Container.js +14 -15
- package/dist/classes/canvas/ImageContainer.cjs +325 -176
- package/dist/classes/canvas/ImageContainer.d.cts +1 -1
- package/dist/classes/canvas/ImageContainer.d.ts +1 -1
- package/dist/classes/canvas/ImageContainer.js +14 -15
- package/dist/classes/canvas/ImageSprite.cjs +3041 -2892
- package/dist/classes/canvas/ImageSprite.d.cts +1 -1
- package/dist/classes/canvas/ImageSprite.d.ts +1 -1
- package/dist/classes/canvas/ImageSprite.js +14 -15
- package/dist/classes/canvas/Sprite.cjs +397 -252
- package/dist/classes/canvas/Sprite.d.cts +1 -1
- package/dist/classes/canvas/Sprite.d.ts +1 -1
- package/dist/classes/canvas/Sprite.js +14 -15
- package/dist/classes/canvas/Text.cjs +319 -172
- package/dist/classes/canvas/Text.d.cts +1 -1
- package/dist/classes/canvas/Text.d.ts +1 -1
- package/dist/classes/canvas/Text.js +14 -15
- package/dist/classes/canvas/VideoSprite.cjs +3038 -2887
- package/dist/classes/canvas/VideoSprite.d.cts +4 -2
- package/dist/classes/canvas/VideoSprite.d.ts +4 -2
- package/dist/classes/canvas/VideoSprite.js +14 -15
- package/dist/classes/index.cjs +399 -252
- package/dist/classes/index.d.cts +1 -1
- package/dist/classes/index.d.ts +1 -1
- package/dist/classes/index.js +14 -15
- package/dist/classes/ticker/FadeAlphaTicker.cjs +325 -178
- package/dist/classes/ticker/FadeAlphaTicker.js +14 -15
- package/dist/classes/ticker/MoveTicker.cjs +3563 -3418
- package/dist/classes/ticker/MoveTicker.js +14 -15
- package/dist/classes/ticker/RotateTicker.cjs +325 -178
- package/dist/classes/ticker/RotateTicker.js +14 -15
- package/dist/classes/ticker/TickerBase.cjs +397 -248
- package/dist/classes/ticker/TickerBase.js +14 -15
- package/dist/classes/ticker/ZoomTicker.cjs +325 -178
- package/dist/classes/ticker/ZoomTicker.js +14 -15
- package/dist/classes/ticker/index.cjs +397 -252
- package/dist/classes/ticker/index.js +14 -15
- package/dist/constants.cjs +93 -49
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +10 -10
- package/dist/decorators/canvas-element-decorator.cjs +389 -242
- package/dist/decorators/canvas-element-decorator.d.cts +1 -1
- package/dist/decorators/canvas-element-decorator.d.ts +1 -1
- package/dist/decorators/canvas-element-decorator.js +14 -15
- package/dist/decorators/event-decorator.d.cts +1 -1
- package/dist/decorators/event-decorator.d.ts +1 -1
- package/dist/decorators/index.cjs +325 -178
- package/dist/decorators/index.d.cts +1 -1
- package/dist/decorators/index.d.ts +1 -1
- package/dist/decorators/index.js +14 -15
- package/dist/decorators/label-decorator.cjs +397 -250
- package/dist/decorators/label-decorator.js +14 -15
- package/dist/functions/canvas/canvas-effect.cjs +394 -247
- package/dist/functions/canvas/canvas-effect.js +14 -15
- package/dist/functions/canvas/canvas-memory-utility.cjs +389 -242
- package/dist/functions/canvas/canvas-memory-utility.d.cts +1 -1
- package/dist/functions/canvas/canvas-memory-utility.d.ts +1 -1
- package/dist/functions/canvas/canvas-memory-utility.js +14 -15
- package/dist/functions/canvas/canvas-transition.cjs +397 -250
- package/dist/functions/canvas/canvas-transition.d.cts +1 -1
- package/dist/functions/canvas/canvas-transition.d.ts +1 -1
- package/dist/functions/canvas/canvas-transition.js +14 -15
- package/dist/functions/canvas/canvas-utility.cjs +397 -248
- package/dist/functions/canvas/canvas-utility.js +14 -15
- package/dist/functions/canvas/image-container-utility.cjs +397 -250
- package/dist/functions/canvas/image-container-utility.d.cts +1 -1
- package/dist/functions/canvas/image-container-utility.d.ts +1 -1
- package/dist/functions/canvas/image-container-utility.js +14 -15
- package/dist/functions/canvas/image-utility.cjs +397 -250
- package/dist/functions/canvas/image-utility.d.cts +1 -1
- package/dist/functions/canvas/image-utility.d.ts +1 -1
- package/dist/functions/canvas/image-utility.js +14 -15
- package/dist/functions/canvas/video-utility.cjs +4682 -4531
- package/dist/functions/canvas/video-utility.d.cts +1 -1
- package/dist/functions/canvas/video-utility.d.ts +1 -1
- package/dist/functions/canvas/video-utility.js +14 -15
- package/dist/functions/dialogue-utility.cjs +397 -248
- package/dist/functions/dialogue-utility.js +14 -15
- package/dist/functions/flags-utility.cjs +397 -248
- package/dist/functions/flags-utility.js +14 -15
- package/dist/functions/game-utility.cjs +397 -248
- package/dist/functions/game-utility.js +14 -15
- package/dist/functions/index.cjs +397 -252
- package/dist/functions/index.d.cts +1 -1
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.js +14 -15
- package/dist/functions/saves-utility.cjs +397 -248
- package/dist/functions/saves-utility.d.cts +1 -1
- package/dist/functions/saves-utility.d.ts +1 -1
- package/dist/functions/saves-utility.js +14 -15
- package/dist/functions/sound-utility.cjs +92 -48
- package/dist/functions/sound-utility.js +10 -10
- package/dist/functions/texture-utility.cjs +319 -172
- package/dist/functions/texture-utility.d.cts +1 -1
- package/dist/functions/texture-utility.d.ts +1 -1
- package/dist/functions/texture-utility.js +14 -15
- package/dist/index.cjs +268 -121
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -15
- package/dist/interface/HistoryStep.d.cts +1 -1
- package/dist/interface/HistoryStep.d.ts +1 -1
- package/dist/interface/SaveData.d.cts +1 -1
- package/dist/interface/SaveData.d.ts +1 -1
- package/dist/interface/canvas/canvas-memory.d.cts +1 -1
- package/dist/interface/canvas/canvas-memory.d.ts +1 -1
- package/dist/interface/canvas/canvas-options.d.cts +1 -1
- package/dist/interface/canvas/canvas-options.d.ts +1 -1
- package/dist/interface/export/ExportedCanvas.d.cts +1 -1
- package/dist/interface/export/ExportedCanvas.d.ts +1 -1
- package/dist/interface/export/ExportedStep.d.cts +1 -1
- package/dist/interface/export/ExportedStep.d.ts +1 -1
- package/dist/interface/index.d.cts +1 -1
- package/dist/interface/index.d.ts +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.cjs +397 -250
- package/dist/labels/BaseCanvasElementTestLabel.js +14 -15
- package/dist/labels/CanvasEventsTestLabel.cjs +397 -250
- package/dist/labels/CanvasEventsTestLabel.d.cts +1 -1
- package/dist/labels/CanvasEventsTestLabel.d.ts +1 -1
- package/dist/labels/CanvasEventsTestLabel.js +14 -15
- package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +268 -121
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +14 -15
- package/dist/labels/ImagesAnimationsTestLabel.cjs +397 -250
- package/dist/labels/ImagesAnimationsTestLabel.js +14 -15
- package/dist/labels/InputTestLabel.cjs +325 -178
- package/dist/labels/InputTestLabel.js +14 -15
- package/dist/labels/MarkdownTest.cjs +325 -178
- package/dist/labels/MarkdownTest.js +14 -15
- package/dist/labels/SoundTestLabel.cjs +325 -178
- package/dist/labels/SoundTestLabel.js +14 -15
- package/dist/labels/StartLabel.cjs +397 -250
- package/dist/labels/StartLabel.js +14 -15
- package/dist/labels/StepLabelTest.cjs +325 -178
- package/dist/labels/StepLabelTest.js +14 -15
- package/dist/labels/VideoTestLabel.cjs +325 -178
- package/dist/labels/VideoTestLabel.js +14 -15
- package/dist/labels/index.cjs +397 -250
- package/dist/labels/index.js +14 -15
- package/dist/{lib-6FCVILMQ.js → lib-5KZOZFFM.js} +8 -8
- package/dist/managers/CanvasManager.cjs +397 -248
- package/dist/managers/CanvasManager.d.cts +1 -1
- package/dist/managers/CanvasManager.d.ts +1 -1
- package/dist/managers/CanvasManager.js +14 -15
- package/dist/managers/CanvasManagerStatic.cjs +176 -77
- package/dist/managers/CanvasManagerStatic.d.cts +1 -1
- package/dist/managers/CanvasManagerStatic.d.ts +1 -1
- package/dist/managers/CanvasManagerStatic.js +9 -9
- package/dist/managers/NarrationManager.cjs +397 -248
- package/dist/managers/NarrationManager.d.cts +2 -1
- package/dist/managers/NarrationManager.d.ts +2 -1
- package/dist/managers/NarrationManager.js +14 -15
- package/dist/managers/NarrationManagerStatic.cjs +397 -248
- package/dist/managers/NarrationManagerStatic.d.cts +1 -1
- package/dist/managers/NarrationManagerStatic.d.ts +1 -1
- package/dist/managers/NarrationManagerStatic.js +14 -15
- package/dist/managers/SoundManager.cjs +397 -248
- package/dist/managers/SoundManager.js +14 -15
- package/dist/managers/StorageManager.cjs +397 -248
- package/dist/managers/StorageManager.js +14 -15
- package/dist/managers/index.cjs +397 -248
- package/dist/managers/index.d.cts +1 -1
- package/dist/managers/index.d.ts +1 -1
- package/dist/managers/index.js +14 -15
- package/dist/types/ContainerChild.d.cts +1 -1
- package/dist/types/ContainerChild.d.ts +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/ticker/MoveTickerProps.d.cts +8 -0
- package/dist/types/ticker/MoveTickerProps.d.ts +8 -0
- package/dist/webworkerAll-XFBJBJMM.js +5 -0
- package/package.json +1 -1
- package/dist/WebGLRenderer-U57ZOBH6.js +0 -9
- package/dist/WebGPURenderer-EYIZ7IXV.js +0 -10
- package/dist/chunk-IRUKNG2Y.js +0 -130
- package/dist/webworkerAll-GSRT3S6X.js +0 -5
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
aliasToRemoveAfter
|
|
3
3
|
} from "./chunk-OMPJ74CO.js";
|
|
4
|
-
import {
|
|
5
|
-
analizePositionsExtensionProps
|
|
6
|
-
} from "./chunk-IRUKNG2Y.js";
|
|
7
4
|
import {
|
|
8
5
|
Close
|
|
9
6
|
} from "./chunk-I6TNJEE3.js";
|
|
@@ -12,7 +9,7 @@ import {
|
|
|
12
9
|
} from "./chunk-DPUSONJ3.js";
|
|
13
10
|
import {
|
|
14
11
|
CanvasManagerStatic
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3XKVLXKN.js";
|
|
16
13
|
import {
|
|
17
14
|
SoundManagerStatic
|
|
18
15
|
} from "./chunk-6FAGAUDR.js";
|
|
@@ -37,7 +34,7 @@ import {
|
|
|
37
34
|
import {
|
|
38
35
|
FilterMemoryToFilter,
|
|
39
36
|
FilterToFilterMemory
|
|
40
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-52ZSR3AN.js";
|
|
41
38
|
import {
|
|
42
39
|
updateTickerProgression
|
|
43
40
|
} from "./chunk-ZZLQ3ILH.js";
|
|
@@ -72,28 +69,28 @@ import {
|
|
|
72
69
|
filters,
|
|
73
70
|
version,
|
|
74
71
|
videoFormats
|
|
75
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-DQ47ST7G.js";
|
|
76
73
|
import {
|
|
77
74
|
Sound,
|
|
78
75
|
SoundLibrary,
|
|
79
76
|
filters_exports,
|
|
80
77
|
sound
|
|
81
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-X55ALTH7.js";
|
|
82
79
|
import {
|
|
83
80
|
Assets,
|
|
84
81
|
Text
|
|
85
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-DZMWRZUL.js";
|
|
86
83
|
import {
|
|
87
84
|
FillGradient,
|
|
88
85
|
TextStyle
|
|
89
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-IG7HSAEJ.js";
|
|
90
87
|
import {
|
|
91
88
|
Color,
|
|
92
89
|
Container,
|
|
93
90
|
Rectangle,
|
|
94
91
|
Sprite,
|
|
95
92
|
Texture
|
|
96
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-KAHX5SKO.js";
|
|
97
94
|
import {
|
|
98
95
|
CanvasEvent
|
|
99
96
|
} from "./chunk-HKAY3U4R.js";
|
|
@@ -943,17 +940,17 @@ var ImageContainer = class extends Container2 {
|
|
|
943
940
|
reloadPosition() {
|
|
944
941
|
if (this._align) {
|
|
945
942
|
if (this._align.x !== void 0) {
|
|
946
|
-
super.x = this._align.x
|
|
943
|
+
super.x = calculateAlign("width", this._align.x, this.width, this.pivot.x);
|
|
947
944
|
}
|
|
948
945
|
if (this._align.y !== void 0) {
|
|
949
|
-
super.y = this._align.y
|
|
946
|
+
super.y = calculateAlign("height", this._align.y, this.height, this.pivot.y);
|
|
950
947
|
}
|
|
951
948
|
} else if (this._percentagePosition) {
|
|
952
949
|
if (this._percentagePosition.x !== void 0) {
|
|
953
|
-
super.x = this._percentagePosition.x
|
|
950
|
+
super.x = calculatePercentagePosition("width", this._percentagePosition.x);
|
|
954
951
|
}
|
|
955
952
|
if (this._percentagePosition.y !== void 0) {
|
|
956
|
-
super.y = this._percentagePosition.y
|
|
953
|
+
super.y = calculatePercentagePosition("height", this._percentagePosition.y);
|
|
957
954
|
}
|
|
958
955
|
}
|
|
959
956
|
}
|
|
@@ -1782,27 +1779,30 @@ function getMemorySprite(element) {
|
|
|
1782
1779
|
};
|
|
1783
1780
|
}
|
|
1784
1781
|
async function setMemorySprite(element, memory, options) {
|
|
1782
|
+
let ignoreTexture = options?.ignoreTexture || false;
|
|
1785
1783
|
await setMemoryContainer(element, memory);
|
|
1786
|
-
if (
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
element.texture = texture;
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
if ("textureData" in memory) {
|
|
1793
|
-
if (memory.textureData.alias) {
|
|
1794
|
-
element.textureAlias = memory.textureData.alias;
|
|
1795
|
-
}
|
|
1796
|
-
if (memory.textureData.url !== "EMPTY") {
|
|
1797
|
-
let textureUrl = memory.textureData.url;
|
|
1798
|
-
if (memory.textureData.alias && Assets.resolver.hasKey(memory.textureData.alias)) {
|
|
1799
|
-
textureUrl = memory.textureData.alias;
|
|
1800
|
-
}
|
|
1801
|
-
let texture = await getTexture(textureUrl);
|
|
1784
|
+
if (!ignoreTexture) {
|
|
1785
|
+
if ("textureImage" in memory && memory.textureImage && memory.textureImage.image) {
|
|
1786
|
+
let texture = await getTexture(memory.textureImage.image);
|
|
1802
1787
|
if (texture) {
|
|
1803
1788
|
element.texture = texture;
|
|
1804
1789
|
}
|
|
1805
1790
|
}
|
|
1791
|
+
if ("textureData" in memory) {
|
|
1792
|
+
if (memory.textureData.alias) {
|
|
1793
|
+
element.textureAlias = memory.textureData.alias;
|
|
1794
|
+
}
|
|
1795
|
+
if (memory.textureData.url !== "EMPTY") {
|
|
1796
|
+
let textureUrl = memory.textureData.url;
|
|
1797
|
+
if (memory.textureData.alias && Assets.resolver.hasKey(memory.textureData.alias)) {
|
|
1798
|
+
textureUrl = memory.textureData.alias;
|
|
1799
|
+
}
|
|
1800
|
+
let texture = await getTexture(textureUrl);
|
|
1801
|
+
if (texture) {
|
|
1802
|
+
element.texture = texture;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
1806
|
}
|
|
1807
1807
|
let half = options?.half;
|
|
1808
1808
|
if (half) {
|
|
@@ -2115,11 +2115,11 @@ var CanvasManager = class {
|
|
|
2115
2115
|
"height" in oldAlias && delete oldAlias.height;
|
|
2116
2116
|
"width" in oldAlias && delete oldAlias.width;
|
|
2117
2117
|
if (newAlias instanceof VideoSprite) {
|
|
2118
|
-
await setMemoryVideoSprite(newAlias, oldAlias);
|
|
2118
|
+
await setMemoryVideoSprite(newAlias, oldAlias, { ignoreTexture: true });
|
|
2119
2119
|
} else if (newAlias instanceof ImageSprite) {
|
|
2120
|
-
await setMemoryImageSprite(newAlias, oldAlias);
|
|
2120
|
+
await setMemoryImageSprite(newAlias, oldAlias, { ignoreTexture: true });
|
|
2121
2121
|
} else if (newAlias instanceof Sprite2) {
|
|
2122
|
-
await setMemorySprite(newAlias, oldAlias);
|
|
2122
|
+
await setMemorySprite(newAlias, oldAlias, { ignoreTexture: true });
|
|
2123
2123
|
} else if (newAlias instanceof Text2) {
|
|
2124
2124
|
await setMemoryText(newAlias, oldAlias);
|
|
2125
2125
|
} else if (newAlias instanceof ImageContainer) {
|
|
@@ -3592,16 +3592,25 @@ var NarrationManager = class {
|
|
|
3592
3592
|
return this.alreadyCurrentStepMadeChoicesObj?.find((choice) => choice.choiceIndex === index)?.madeTimes || 0;
|
|
3593
3593
|
}
|
|
3594
3594
|
/* Run Methods */
|
|
3595
|
+
getCanGoNext(options) {
|
|
3596
|
+
let showWarn = options?.showWarn || false;
|
|
3597
|
+
let choiceMenuOptions = this.choiceMenuOptions;
|
|
3598
|
+
if (choiceMenuOptions && choiceMenuOptions.length > 0) {
|
|
3599
|
+
showWarn && console.warn("[Pixi\u2019VN] The player must make a choice");
|
|
3600
|
+
return false;
|
|
3601
|
+
}
|
|
3602
|
+
if (this.isRequiredInput) {
|
|
3603
|
+
showWarn && console.warn("[Pixi\u2019VN] The player must enter a value");
|
|
3604
|
+
return false;
|
|
3605
|
+
}
|
|
3606
|
+
return true;
|
|
3607
|
+
}
|
|
3595
3608
|
/**
|
|
3596
3609
|
* Return if can go to the next step.
|
|
3597
3610
|
* @returns True if can go to the next step.
|
|
3598
3611
|
*/
|
|
3599
3612
|
get canGoNext() {
|
|
3600
|
-
|
|
3601
|
-
if (options && options.length > 0) {
|
|
3602
|
-
return false;
|
|
3603
|
-
}
|
|
3604
|
-
return true;
|
|
3613
|
+
return this.getCanGoNext();
|
|
3605
3614
|
}
|
|
3606
3615
|
/**
|
|
3607
3616
|
* Execute the next step and add it to the history.
|
|
@@ -3628,8 +3637,7 @@ var NarrationManager = class {
|
|
|
3628
3637
|
* ```
|
|
3629
3638
|
*/
|
|
3630
3639
|
async goNext(props, choiseMade) {
|
|
3631
|
-
if (!this.
|
|
3632
|
-
console.warn("[Pixi\u2019VN] The player must make a choice");
|
|
3640
|
+
if (!this.getCanGoNext({ showWarn: true })) {
|
|
3633
3641
|
return;
|
|
3634
3642
|
}
|
|
3635
3643
|
if (this.currentLabel && this.currentLabel.onStepEnd) {
|
|
@@ -3999,6 +4007,7 @@ var NarrationManager = class {
|
|
|
3999
4007
|
let glueDialogue = storage.getVariable(storage.keysSystem.CURRENT_DIALOGUE_MEMORY_KEY);
|
|
4000
4008
|
if (glueDialogue) {
|
|
4001
4009
|
dialogue.text = `${glueDialogue.text}${dialogue.text}`;
|
|
4010
|
+
dialogue.character = dialogue.character || glueDialogue.character;
|
|
4002
4011
|
}
|
|
4003
4012
|
this.dialogGlue = false;
|
|
4004
4013
|
}
|
|
@@ -4740,6 +4749,24 @@ FadeAlphaTicker = __decorateClass([
|
|
|
4740
4749
|
], FadeAlphaTicker);
|
|
4741
4750
|
|
|
4742
4751
|
// src/classes/ticker/MoveTicker.ts
|
|
4752
|
+
function calculateDestination(args, element) {
|
|
4753
|
+
let destination = createExportableElement(args.destination);
|
|
4754
|
+
if (destination.type === "align") {
|
|
4755
|
+
let anchorx = void 0;
|
|
4756
|
+
let anchory = void 0;
|
|
4757
|
+
if (element instanceof Sprite) {
|
|
4758
|
+
anchorx = element.anchor.x;
|
|
4759
|
+
anchory = element.anchor.y;
|
|
4760
|
+
}
|
|
4761
|
+
destination.x = calculateAlign("width", destination.x, element.width, element.pivot.x, anchorx);
|
|
4762
|
+
destination.y = calculateAlign("height", destination.y, element.height, element.pivot.y, anchory);
|
|
4763
|
+
}
|
|
4764
|
+
if (destination.type === "percentage") {
|
|
4765
|
+
destination.x = calculatePercentagePosition("width", destination.x);
|
|
4766
|
+
destination.y = calculatePercentagePosition("height", destination.y);
|
|
4767
|
+
}
|
|
4768
|
+
return destination;
|
|
4769
|
+
}
|
|
4743
4770
|
var MoveTicker = class extends TickerBase {
|
|
4744
4771
|
fn(ticker, args, aliases, tickerId) {
|
|
4745
4772
|
let xSpeed = 10;
|
|
@@ -4753,7 +4780,6 @@ var MoveTicker = class extends TickerBase {
|
|
|
4753
4780
|
ySpeed = this.speedConvert(args.speed.y);
|
|
4754
4781
|
}
|
|
4755
4782
|
}
|
|
4756
|
-
let destination = args.destination;
|
|
4757
4783
|
let aliasToRemoveAfter2 = args.aliasToRemoveAfter || [];
|
|
4758
4784
|
if (typeof aliasToRemoveAfter2 === "string") {
|
|
4759
4785
|
aliasToRemoveAfter2 = [aliasToRemoveAfter2];
|
|
@@ -4776,6 +4802,7 @@ var MoveTicker = class extends TickerBase {
|
|
|
4776
4802
|
}).forEach((alias) => {
|
|
4777
4803
|
let element = canvas.find(alias);
|
|
4778
4804
|
if (element && element instanceof Container) {
|
|
4805
|
+
let destination = calculateDestination(args, element);
|
|
4779
4806
|
let xDistance = destination.x - element.x > 0 ? 1 : -1;
|
|
4780
4807
|
if (xDistance != 0) {
|
|
4781
4808
|
element.x += xDistance * xSpeed * ticker.deltaTime;
|
|
@@ -4807,7 +4834,7 @@ var MoveTicker = class extends TickerBase {
|
|
|
4807
4834
|
alias.forEach((alias2) => {
|
|
4808
4835
|
let element = canvas.find(alias2);
|
|
4809
4836
|
if (element) {
|
|
4810
|
-
let destination = args
|
|
4837
|
+
let destination = calculateDestination(args, element);
|
|
4811
4838
|
element.x = destination.x;
|
|
4812
4839
|
element.y = destination.y;
|
|
4813
4840
|
if (args.isPushInOut && element.children.length > 0) {
|
|
@@ -5510,7 +5537,7 @@ var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
|
|
|
5510
5537
|
character: juliette,
|
|
5511
5538
|
text: `Here's what's going to happen:
|
|
5512
5539
|
- ${eggHeadName} will move to { x: 500, y: 100 } with a speed of 24.
|
|
5513
|
-
- ${flowerTopName} will move to { x:
|
|
5540
|
+
- ${flowerTopName} will move to { x: 0.5, y: 0.5, type: "align" } with a speed of 18.
|
|
5514
5541
|
- ${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.
|
|
5515
5542
|
- ${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.`
|
|
5516
5543
|
};
|
|
@@ -5519,7 +5546,7 @@ var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
|
|
|
5519
5546
|
speed: 24
|
|
5520
5547
|
}));
|
|
5521
5548
|
canvas.addTicker("flowerTop", new MoveTicker({
|
|
5522
|
-
destination: { x:
|
|
5549
|
+
destination: { x: 0.5, y: 0.5, type: "align" },
|
|
5523
5550
|
speed: 18
|
|
5524
5551
|
}));
|
|
5525
5552
|
canvas.addTickersSteps("helmlok", [
|
|
@@ -6113,6 +6140,142 @@ var pixivnTestStartLabel2 = newLabel(
|
|
|
6113
6140
|
]
|
|
6114
6141
|
);
|
|
6115
6142
|
|
|
6143
|
+
// src/classes/canvas/AdditionalPositions.ts
|
|
6144
|
+
var AdditionalPositionsExtension2 = class extends Container {
|
|
6145
|
+
/**
|
|
6146
|
+
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
6147
|
+
* For example:
|
|
6148
|
+
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
6149
|
+
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
6150
|
+
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
6151
|
+
*
|
|
6152
|
+
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
6153
|
+
*/
|
|
6154
|
+
set align(_value) {
|
|
6155
|
+
throw new Error("Method not implemented.");
|
|
6156
|
+
}
|
|
6157
|
+
/**
|
|
6158
|
+
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
6159
|
+
* For example:
|
|
6160
|
+
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
6161
|
+
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
6162
|
+
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
6163
|
+
*
|
|
6164
|
+
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
6165
|
+
*/
|
|
6166
|
+
set xAlign(_value) {
|
|
6167
|
+
throw new Error("Method not implemented.");
|
|
6168
|
+
}
|
|
6169
|
+
/**
|
|
6170
|
+
* is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
|
|
6171
|
+
* For example:
|
|
6172
|
+
* - if you set align to 0.5, the element will be in the center of the canvas.
|
|
6173
|
+
* - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
|
|
6174
|
+
* - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
|
|
6175
|
+
*
|
|
6176
|
+
* **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
|
|
6177
|
+
*/
|
|
6178
|
+
set yAlign(_value) {
|
|
6179
|
+
throw new Error("Method not implemented.");
|
|
6180
|
+
}
|
|
6181
|
+
/**
|
|
6182
|
+
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
6183
|
+
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
6184
|
+
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
6185
|
+
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
6186
|
+
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
6187
|
+
*
|
|
6188
|
+
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
6189
|
+
*/
|
|
6190
|
+
set percentagePosition(_value) {
|
|
6191
|
+
throw new Error("Method not implemented.");
|
|
6192
|
+
}
|
|
6193
|
+
/**
|
|
6194
|
+
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
6195
|
+
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
6196
|
+
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
6197
|
+
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
6198
|
+
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
6199
|
+
*
|
|
6200
|
+
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
6201
|
+
*/
|
|
6202
|
+
set xPercentagePosition(_value) {
|
|
6203
|
+
throw new Error("Method not implemented.");
|
|
6204
|
+
}
|
|
6205
|
+
/**
|
|
6206
|
+
* is a way to set the position of the element in the canvas calculated in percentage.
|
|
6207
|
+
* For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
|
|
6208
|
+
* - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
|
|
6209
|
+
* - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
|
|
6210
|
+
* - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
|
|
6211
|
+
*
|
|
6212
|
+
* **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
|
|
6213
|
+
*/
|
|
6214
|
+
set yPercentagePosition(_value) {
|
|
6215
|
+
throw new Error("Method not implemented.");
|
|
6216
|
+
}
|
|
6217
|
+
};
|
|
6218
|
+
function analizePositionsExtensionProps(props) {
|
|
6219
|
+
if (!props) {
|
|
6220
|
+
return props;
|
|
6221
|
+
}
|
|
6222
|
+
if (typeof props.align !== "number") {
|
|
6223
|
+
if (props.xAlign != void 0) {
|
|
6224
|
+
if (props.align === void 0) {
|
|
6225
|
+
props.align = { x: props.xAlign };
|
|
6226
|
+
delete props.xAlign;
|
|
6227
|
+
} else {
|
|
6228
|
+
props.align.x = props.xAlign;
|
|
6229
|
+
delete props.xAlign;
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
if (props.yAlign != void 0) {
|
|
6233
|
+
if (props.align === void 0) {
|
|
6234
|
+
props.align = { y: props.yAlign };
|
|
6235
|
+
delete props.yAlign;
|
|
6236
|
+
} else {
|
|
6237
|
+
props.align.y = props.yAlign;
|
|
6238
|
+
delete props.yAlign;
|
|
6239
|
+
}
|
|
6240
|
+
}
|
|
6241
|
+
}
|
|
6242
|
+
if (typeof props.percentagePosition !== "number") {
|
|
6243
|
+
if (props.xPercentagePosition != void 0) {
|
|
6244
|
+
if (props.percentagePosition === void 0) {
|
|
6245
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
6246
|
+
delete props.xPercentagePosition;
|
|
6247
|
+
} else {
|
|
6248
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
6249
|
+
delete props.xPercentagePosition;
|
|
6250
|
+
}
|
|
6251
|
+
}
|
|
6252
|
+
if (props.yPercentagePosition != void 0) {
|
|
6253
|
+
if (props.percentagePosition === void 0) {
|
|
6254
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
6255
|
+
delete props.yPercentagePosition;
|
|
6256
|
+
} else {
|
|
6257
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
6258
|
+
delete props.yPercentagePosition;
|
|
6259
|
+
}
|
|
6260
|
+
}
|
|
6261
|
+
}
|
|
6262
|
+
return props;
|
|
6263
|
+
}
|
|
6264
|
+
function calculateAlign(type, align, width, pivot, anchor = 0) {
|
|
6265
|
+
if (type === "width") {
|
|
6266
|
+
return align * (canvas.screen.width - width) + pivot + anchor * width;
|
|
6267
|
+
} else {
|
|
6268
|
+
return align * (canvas.screen.height - width) + pivot + anchor * width;
|
|
6269
|
+
}
|
|
6270
|
+
}
|
|
6271
|
+
function calculatePercentagePosition(type, percentage) {
|
|
6272
|
+
if (type === "width") {
|
|
6273
|
+
return percentage * canvas.screen.width;
|
|
6274
|
+
} else {
|
|
6275
|
+
return percentage * canvas.screen.height;
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6116
6279
|
// src/classes/canvas/ImageSprite.ts
|
|
6117
6280
|
var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
6118
6281
|
pixivnId = CANVAS_IMAGE_ID;
|
|
@@ -6239,17 +6402,17 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
6239
6402
|
reloadPosition() {
|
|
6240
6403
|
if (this._align) {
|
|
6241
6404
|
if (this._align.x !== void 0) {
|
|
6242
|
-
super.x = this._align.x
|
|
6405
|
+
super.x = calculateAlign("width", this._align.x, this.width, this.pivot.x, this.anchor.x);
|
|
6243
6406
|
}
|
|
6244
6407
|
if (this._align.y !== void 0) {
|
|
6245
|
-
super.y = this._align.y
|
|
6408
|
+
super.y = calculateAlign("height", this._align.y, this.height, this.pivot.y, this.anchor.y);
|
|
6246
6409
|
}
|
|
6247
6410
|
} else if (this._percentagePosition) {
|
|
6248
6411
|
if (this._percentagePosition.x !== void 0) {
|
|
6249
|
-
super.x = this._percentagePosition.x
|
|
6412
|
+
super.x = calculatePercentagePosition("width", this._percentagePosition.x);
|
|
6250
6413
|
}
|
|
6251
6414
|
if (this._percentagePosition.y !== void 0) {
|
|
6252
|
-
super.y = this._percentagePosition.y
|
|
6415
|
+
super.y = calculatePercentagePosition("height", this._percentagePosition.y);
|
|
6253
6416
|
}
|
|
6254
6417
|
}
|
|
6255
6418
|
}
|
|
@@ -6278,17 +6441,21 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
6278
6441
|
super.y = value;
|
|
6279
6442
|
}
|
|
6280
6443
|
};
|
|
6281
|
-
async function setMemoryImageSprite(element, memory) {
|
|
6444
|
+
async function setMemoryImageSprite(element, memory, options) {
|
|
6445
|
+
let ignoreTexture = options?.ignoreTexture || false;
|
|
6282
6446
|
memory = analizePositionsExtensionProps(memory);
|
|
6283
6447
|
return await setMemorySprite(element, memory, {
|
|
6284
6448
|
half: async () => {
|
|
6285
6449
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
6286
6450
|
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
6287
|
-
|
|
6451
|
+
if (!ignoreTexture) {
|
|
6452
|
+
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
6453
|
+
}
|
|
6288
6454
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
6289
6455
|
await element.load();
|
|
6290
6456
|
}
|
|
6291
|
-
}
|
|
6457
|
+
},
|
|
6458
|
+
ignoreTexture: options?.ignoreTexture
|
|
6292
6459
|
});
|
|
6293
6460
|
}
|
|
6294
6461
|
|
|
@@ -6399,8 +6566,8 @@ var VideoSprite = class _VideoSprite extends ImageSprite {
|
|
|
6399
6566
|
}
|
|
6400
6567
|
}
|
|
6401
6568
|
};
|
|
6402
|
-
async function setMemoryVideoSprite(element, memory) {
|
|
6403
|
-
await setMemoryImageSprite(element, memory);
|
|
6569
|
+
async function setMemoryVideoSprite(element, memory, options) {
|
|
6570
|
+
await setMemoryImageSprite(element, memory, { ignoreTexture: options?.ignoreTexture });
|
|
6404
6571
|
"loop" in memory && memory.loop !== void 0 && (element.loop = memory.loop);
|
|
6405
6572
|
"currentTime" in memory && memory.currentTime !== void 0 && (element.currentTime = memory.currentTime);
|
|
6406
6573
|
"paused" in memory && memory.paused !== void 0 && (element.paused = memory.paused);
|
|
@@ -6685,6 +6852,10 @@ export {
|
|
|
6685
6852
|
getTexture,
|
|
6686
6853
|
getTextStyle,
|
|
6687
6854
|
checkIfTextureNotIsEmpty,
|
|
6855
|
+
AdditionalPositionsExtension2 as AdditionalPositionsExtension,
|
|
6856
|
+
analizePositionsExtensionProps,
|
|
6857
|
+
calculateAlign,
|
|
6858
|
+
calculatePercentagePosition,
|
|
6688
6859
|
registeredCanvasElement,
|
|
6689
6860
|
canvasElementDecorator,
|
|
6690
6861
|
getCanvasElementTypeById,
|