@drincs/pixi-vn 0.9.6 → 0.9.7
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-HBivknFV.d.ts → ContainerChild-B5yD0BI8.d.ts} +3 -7
- package/dist/{ContainerChild-CEuXVx00.d.cts → ContainerChild-WzyxEjAc.d.cts} +3 -7
- package/dist/{chunk-SCOZ46ME.js → chunk-IRUKNG2Y.js} +32 -18
- package/dist/{chunk-JMXJKUTS.js → chunk-NB4Q3GFK.js} +19 -11
- package/dist/{chunk-AQPVWC55.js → chunk-TOG67Z7Q.js} +1 -1
- package/dist/classes/CharacterBaseModel.cjs +50 -28
- package/dist/classes/CharacterBaseModel.js +3 -3
- package/dist/classes/CharacterStoredClass.cjs +50 -28
- package/dist/classes/CharacterStoredClass.js +3 -3
- package/dist/classes/ChoiceMenuOption.cjs +50 -28
- package/dist/classes/ChoiceMenuOption.js +3 -3
- package/dist/classes/Sound.cjs +50 -28
- package/dist/classes/Sound.js +3 -3
- package/dist/classes/StoredClassModel.cjs +50 -28
- package/dist/classes/StoredClassModel.js +3 -3
- package/dist/classes/canvas/AdditionalPositions.cjs +32 -18
- package/dist/classes/canvas/AdditionalPositions.js +1 -1
- package/dist/classes/canvas/CanvasBaseItem.d.cts +2 -2
- package/dist/classes/canvas/CanvasBaseItem.d.ts +2 -2
- package/dist/classes/canvas/Container.cjs +50 -28
- package/dist/classes/canvas/Container.d.cts +3 -2
- package/dist/classes/canvas/Container.d.ts +3 -2
- package/dist/classes/canvas/Container.js +3 -3
- package/dist/classes/canvas/ImageContainer.cjs +67 -45
- package/dist/classes/canvas/ImageContainer.d.cts +1 -1
- package/dist/classes/canvas/ImageContainer.d.ts +1 -1
- package/dist/classes/canvas/ImageContainer.js +3 -3
- package/dist/classes/canvas/ImageSprite.cjs +50 -28
- package/dist/classes/canvas/ImageSprite.d.cts +1 -1
- package/dist/classes/canvas/ImageSprite.d.ts +1 -1
- package/dist/classes/canvas/ImageSprite.js +3 -3
- package/dist/classes/canvas/Sprite.cjs +50 -28
- package/dist/classes/canvas/Sprite.d.cts +2 -2
- package/dist/classes/canvas/Sprite.d.ts +2 -2
- package/dist/classes/canvas/Sprite.js +3 -3
- package/dist/classes/canvas/Text.cjs +50 -28
- package/dist/classes/canvas/Text.d.cts +2 -2
- package/dist/classes/canvas/Text.d.ts +2 -2
- package/dist/classes/canvas/Text.js +3 -3
- package/dist/classes/canvas/VideoSprite.cjs +50 -28
- package/dist/classes/canvas/VideoSprite.d.cts +2 -2
- package/dist/classes/canvas/VideoSprite.d.ts +2 -2
- package/dist/classes/canvas/VideoSprite.js +3 -3
- package/dist/classes/index.cjs +50 -28
- package/dist/classes/index.d.cts +2 -2
- package/dist/classes/index.d.ts +2 -2
- package/dist/classes/index.js +3 -3
- package/dist/classes/ticker/FadeAlphaTicker.cjs +50 -28
- package/dist/classes/ticker/FadeAlphaTicker.js +3 -3
- package/dist/classes/ticker/MoveTicker.cjs +50 -28
- package/dist/classes/ticker/MoveTicker.js +3 -3
- package/dist/classes/ticker/RotateTicker.cjs +50 -28
- package/dist/classes/ticker/RotateTicker.js +3 -3
- package/dist/classes/ticker/TickerBase.cjs +50 -28
- package/dist/classes/ticker/TickerBase.js +3 -3
- package/dist/classes/ticker/ZoomTicker.cjs +50 -28
- package/dist/classes/ticker/ZoomTicker.js +3 -3
- package/dist/classes/ticker/index.cjs +50 -28
- package/dist/classes/ticker/index.js +3 -3
- package/dist/constants.cjs +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/decorators/canvas-element-decorator.cjs +50 -28
- package/dist/decorators/canvas-element-decorator.d.cts +2 -2
- package/dist/decorators/canvas-element-decorator.d.ts +2 -2
- package/dist/decorators/canvas-element-decorator.js +3 -3
- package/dist/decorators/event-decorator.d.cts +2 -2
- package/dist/decorators/event-decorator.d.ts +2 -2
- package/dist/decorators/index.cjs +50 -28
- package/dist/decorators/index.d.cts +2 -2
- package/dist/decorators/index.d.ts +2 -2
- package/dist/decorators/index.js +3 -3
- package/dist/decorators/label-decorator.cjs +50 -28
- package/dist/decorators/label-decorator.js +3 -3
- package/dist/functions/canvas/canvas-effect.cjs +50 -28
- package/dist/functions/canvas/canvas-effect.js +3 -3
- package/dist/functions/canvas/canvas-memory-utility.cjs +50 -28
- package/dist/functions/canvas/canvas-memory-utility.d.cts +2 -2
- package/dist/functions/canvas/canvas-memory-utility.d.ts +2 -2
- package/dist/functions/canvas/canvas-memory-utility.js +3 -3
- package/dist/functions/canvas/canvas-transition.cjs +50 -28
- package/dist/functions/canvas/canvas-transition.d.cts +2 -2
- package/dist/functions/canvas/canvas-transition.d.ts +2 -2
- package/dist/functions/canvas/canvas-transition.js +3 -3
- package/dist/functions/canvas/canvas-utility.cjs +50 -28
- package/dist/functions/canvas/canvas-utility.js +3 -3
- package/dist/functions/canvas/image-container-utility.cjs +50 -28
- package/dist/functions/canvas/image-container-utility.d.cts +2 -2
- package/dist/functions/canvas/image-container-utility.d.ts +2 -2
- package/dist/functions/canvas/image-container-utility.js +3 -3
- package/dist/functions/canvas/image-utility.cjs +50 -28
- package/dist/functions/canvas/image-utility.d.cts +2 -2
- package/dist/functions/canvas/image-utility.d.ts +2 -2
- package/dist/functions/canvas/image-utility.js +3 -3
- package/dist/functions/canvas/video-utility.cjs +50 -28
- package/dist/functions/canvas/video-utility.d.cts +2 -2
- package/dist/functions/canvas/video-utility.d.ts +2 -2
- package/dist/functions/canvas/video-utility.js +3 -3
- package/dist/functions/dialogue-utility.cjs +50 -28
- package/dist/functions/dialogue-utility.js +3 -3
- package/dist/functions/flags-utility.cjs +50 -28
- package/dist/functions/flags-utility.js +3 -3
- package/dist/functions/game-utility.cjs +50 -28
- package/dist/functions/game-utility.js +3 -3
- package/dist/functions/index.cjs +50 -28
- package/dist/functions/index.d.cts +2 -2
- package/dist/functions/index.d.ts +2 -2
- package/dist/functions/index.js +3 -3
- package/dist/functions/saves-utility.cjs +50 -28
- package/dist/functions/saves-utility.d.cts +2 -2
- package/dist/functions/saves-utility.d.ts +2 -2
- package/dist/functions/saves-utility.js +3 -3
- package/dist/functions/texture-utility.cjs +50 -28
- package/dist/functions/texture-utility.d.cts +2 -2
- package/dist/functions/texture-utility.d.ts +2 -2
- package/dist/functions/texture-utility.js +3 -3
- package/dist/index.cjs +67 -47
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/interface/HistoryStep.d.cts +2 -2
- package/dist/interface/HistoryStep.d.ts +2 -2
- package/dist/interface/SaveData.d.cts +2 -2
- package/dist/interface/SaveData.d.ts +2 -2
- package/dist/interface/canvas/canvas-memory.d.cts +2 -2
- package/dist/interface/canvas/canvas-memory.d.ts +2 -2
- 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 +2 -2
- package/dist/interface/export/ExportedCanvas.d.ts +2 -2
- package/dist/interface/export/ExportedStep.d.cts +2 -2
- package/dist/interface/export/ExportedStep.d.ts +2 -2
- package/dist/interface/index.d.cts +1 -1
- package/dist/interface/index.d.ts +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.cjs +50 -28
- package/dist/labels/BaseCanvasElementTestLabel.js +3 -3
- package/dist/labels/CanvasEventsTestLabel.cjs +50 -28
- package/dist/labels/CanvasEventsTestLabel.d.cts +2 -2
- package/dist/labels/CanvasEventsTestLabel.d.ts +2 -2
- package/dist/labels/CanvasEventsTestLabel.js +3 -3
- package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +67 -47
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +3 -3
- package/dist/labels/ImagesAnimationsTestLabel.cjs +50 -28
- package/dist/labels/ImagesAnimationsTestLabel.js +3 -3
- package/dist/labels/InputTestLabel.cjs +50 -28
- package/dist/labels/InputTestLabel.js +3 -3
- package/dist/labels/MarkdownTest.cjs +50 -28
- package/dist/labels/MarkdownTest.js +3 -3
- package/dist/labels/SoundTestLabel.cjs +50 -28
- package/dist/labels/SoundTestLabel.js +3 -3
- package/dist/labels/StartLabel.cjs +50 -28
- package/dist/labels/StartLabel.js +3 -3
- package/dist/labels/StepLabelTest.cjs +50 -28
- package/dist/labels/StepLabelTest.js +3 -3
- package/dist/labels/VideoTestLabel.cjs +50 -28
- package/dist/labels/VideoTestLabel.js +3 -3
- package/dist/labels/index.cjs +50 -28
- package/dist/labels/index.js +3 -3
- package/dist/managers/CanvasManager.cjs +50 -28
- package/dist/managers/CanvasManager.d.cts +2 -2
- package/dist/managers/CanvasManager.d.ts +2 -2
- package/dist/managers/CanvasManager.js +3 -3
- package/dist/managers/CanvasManagerStatic.d.cts +2 -2
- package/dist/managers/CanvasManagerStatic.d.ts +2 -2
- package/dist/managers/NarrationManager.cjs +50 -28
- package/dist/managers/NarrationManager.d.cts +2 -2
- package/dist/managers/NarrationManager.d.ts +2 -2
- package/dist/managers/NarrationManager.js +3 -3
- package/dist/managers/NarrationManagerStatic.cjs +50 -28
- package/dist/managers/NarrationManagerStatic.d.cts +2 -2
- package/dist/managers/NarrationManagerStatic.d.ts +2 -2
- package/dist/managers/NarrationManagerStatic.js +3 -3
- package/dist/managers/SoundManager.cjs +50 -28
- package/dist/managers/SoundManager.js +3 -3
- package/dist/managers/StorageManager.cjs +50 -28
- package/dist/managers/StorageManager.js +3 -3
- package/dist/managers/index.cjs +50 -28
- package/dist/managers/index.d.cts +2 -2
- package/dist/managers/index.d.ts +2 -2
- package/dist/managers/index.js +3 -3
- package/dist/types/ContainerChild.d.cts +2 -2
- package/dist/types/ContainerChild.d.ts +2 -2
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
Text,
|
|
3
3
|
getMemoryText,
|
|
4
4
|
setMemoryText
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-NB4Q3GFK.js";
|
|
6
6
|
import "../../chunk-OMPJ74CO.js";
|
|
7
7
|
import "../../chunk-2JGQWY5I.js";
|
|
8
8
|
import "../../chunk-2BUPSB7O.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-IRUKNG2Y.js";
|
|
10
10
|
import "../../chunk-6GJXIPNB.js";
|
|
11
11
|
import "../../chunk-I6TNJEE3.js";
|
|
12
12
|
import "../../chunk-DPUSONJ3.js";
|
|
@@ -23,7 +23,7 @@ import "../../chunk-ZBUW3MBH.js";
|
|
|
23
23
|
import "../../chunk-PIYIZHZL.js";
|
|
24
24
|
import "../../chunk-B7XQM2BB.js";
|
|
25
25
|
import "../../chunk-LEMOIFSV.js";
|
|
26
|
-
import "../../chunk-
|
|
26
|
+
import "../../chunk-TOG67Z7Q.js";
|
|
27
27
|
import "../../chunk-WS3FY4Q6.js";
|
|
28
28
|
import "../../chunk-Z3NBKYVU.js";
|
|
29
29
|
import "../../chunk-SAUNZQHZ.js";
|
|
@@ -57719,7 +57719,7 @@ extensions.add(soundAsset);
|
|
|
57719
57719
|
var sound = setInstance(new SoundLibrary());
|
|
57720
57720
|
|
|
57721
57721
|
// package.json
|
|
57722
|
-
var version = "0.9.
|
|
57722
|
+
var version = "0.9.7";
|
|
57723
57723
|
|
|
57724
57724
|
// src/constants.ts
|
|
57725
57725
|
var Repeat = "repeat";
|
|
@@ -57936,12 +57936,15 @@ var Container2 = class extends Container {
|
|
|
57936
57936
|
this.setMemory(value);
|
|
57937
57937
|
}
|
|
57938
57938
|
async setMemory(value) {
|
|
57939
|
+
await this.importChildren(value);
|
|
57940
|
+
return await setMemoryContainer(this, value);
|
|
57941
|
+
}
|
|
57942
|
+
async importChildren(value) {
|
|
57939
57943
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
57940
57944
|
let child = value.elements[i3];
|
|
57941
57945
|
let element = await importCanvasElement(child);
|
|
57942
57946
|
this.addChild(element);
|
|
57943
57947
|
}
|
|
57944
|
-
return await setMemoryContainer(this, value);
|
|
57945
57948
|
}
|
|
57946
57949
|
};
|
|
57947
57950
|
function getMemoryContainer(element) {
|
|
@@ -58029,29 +58032,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58029
58032
|
if (!props) {
|
|
58030
58033
|
return props;
|
|
58031
58034
|
}
|
|
58032
|
-
if (props.align
|
|
58033
|
-
if (
|
|
58034
|
-
props.
|
|
58035
|
-
|
|
58036
|
-
|
|
58037
|
-
|
|
58038
|
-
props.
|
|
58035
|
+
if (typeof props.align !== "number") {
|
|
58036
|
+
if (props.xAlign != void 0) {
|
|
58037
|
+
if (props.align === void 0) {
|
|
58038
|
+
props.align = { x: props.xAlign };
|
|
58039
|
+
delete props.xAlign;
|
|
58040
|
+
} else {
|
|
58041
|
+
props.align.x = props.xAlign;
|
|
58042
|
+
delete props.xAlign;
|
|
58039
58043
|
}
|
|
58040
|
-
|
|
58041
|
-
|
|
58044
|
+
}
|
|
58045
|
+
if (props.yAlign != void 0) {
|
|
58046
|
+
if (props.align === void 0) {
|
|
58047
|
+
props.align = { y: props.yAlign };
|
|
58048
|
+
delete props.yAlign;
|
|
58049
|
+
} else {
|
|
58050
|
+
props.align.y = props.yAlign;
|
|
58051
|
+
delete props.yAlign;
|
|
58042
58052
|
}
|
|
58043
58053
|
}
|
|
58044
58054
|
}
|
|
58045
|
-
if (props.percentagePosition
|
|
58046
|
-
if (
|
|
58047
|
-
props.
|
|
58048
|
-
|
|
58049
|
-
|
|
58050
|
-
|
|
58051
|
-
props.
|
|
58055
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58056
|
+
if (props.xPercentagePosition != void 0) {
|
|
58057
|
+
if (props.percentagePosition === void 0) {
|
|
58058
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58059
|
+
delete props.xPercentagePosition;
|
|
58060
|
+
} else {
|
|
58061
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58062
|
+
delete props.xPercentagePosition;
|
|
58052
58063
|
}
|
|
58053
|
-
|
|
58054
|
-
|
|
58064
|
+
}
|
|
58065
|
+
if (props.yPercentagePosition != void 0) {
|
|
58066
|
+
if (props.percentagePosition === void 0) {
|
|
58067
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58068
|
+
delete props.yPercentagePosition;
|
|
58069
|
+
} else {
|
|
58070
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58071
|
+
delete props.yPercentagePosition;
|
|
58055
58072
|
}
|
|
58056
58073
|
}
|
|
58057
58074
|
}
|
|
@@ -58071,10 +58088,10 @@ var ImageContainer = class extends Container2 {
|
|
|
58071
58088
|
if (options?.anchor !== void 0) {
|
|
58072
58089
|
this.anchor = options.anchor;
|
|
58073
58090
|
}
|
|
58074
|
-
if (options?.align !== void 0) {
|
|
58091
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58075
58092
|
this.align = options.align;
|
|
58076
58093
|
}
|
|
58077
|
-
if (options?.percentagePosition !== void 0) {
|
|
58094
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58078
58095
|
this.percentagePosition = options.percentagePosition;
|
|
58079
58096
|
}
|
|
58080
58097
|
}
|
|
@@ -58092,7 +58109,8 @@ var ImageContainer = class extends Container2 {
|
|
|
58092
58109
|
this.setMemory(value);
|
|
58093
58110
|
}
|
|
58094
58111
|
async setMemory(value) {
|
|
58095
|
-
await
|
|
58112
|
+
await this.importChildren(value);
|
|
58113
|
+
await setMemoryImageContainer(this, value);
|
|
58096
58114
|
this.reloadAnchor();
|
|
58097
58115
|
this.reloadPosition();
|
|
58098
58116
|
}
|
|
@@ -58266,11 +58284,13 @@ var ImageContainer = class extends Container2 {
|
|
|
58266
58284
|
}
|
|
58267
58285
|
};
|
|
58268
58286
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58287
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58269
58288
|
setMemoryContainer(element, memory, {
|
|
58270
58289
|
...opstions,
|
|
58271
58290
|
end: async () => {
|
|
58272
58291
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58273
58292
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58293
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58274
58294
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58275
58295
|
await element.load();
|
|
58276
58296
|
}
|
|
@@ -59694,7 +59714,6 @@ var CanvasManager = class {
|
|
|
59694
59714
|
* @param data The object.
|
|
59695
59715
|
*/
|
|
59696
59716
|
async import(data) {
|
|
59697
|
-
this.clear();
|
|
59698
59717
|
try {
|
|
59699
59718
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
59700
59719
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -59702,6 +59721,7 @@ var CanvasManager = class {
|
|
|
59702
59721
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
59703
59722
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
59704
59723
|
let list = await Promise.all(promises);
|
|
59724
|
+
this.clear();
|
|
59705
59725
|
list.forEach((element, i3) => {
|
|
59706
59726
|
let alias = elementAliasesOrder[i3];
|
|
59707
59727
|
this.add(alias, element);
|
|
@@ -63983,9 +64003,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63983
64003
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63984
64004
|
};
|
|
63985
64005
|
canvas.removeAll();
|
|
63986
|
-
let container =
|
|
63987
|
-
container
|
|
63988
|
-
container.align = 0.5;
|
|
64006
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
64007
|
+
canvas.add("container", container);
|
|
63989
64008
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63990
64009
|
helmlok.anchor = 0.5;
|
|
63991
64010
|
helmlok.xAlign = 1;
|
|
@@ -64296,6 +64315,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64296
64315
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64297
64316
|
constructor(options, textureAlias) {
|
|
64298
64317
|
super(options);
|
|
64318
|
+
options = analizePositionsExtensionProps(options);
|
|
64299
64319
|
if (textureAlias) {
|
|
64300
64320
|
this.textureAlias = textureAlias;
|
|
64301
64321
|
}
|
|
@@ -64319,7 +64339,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64319
64339
|
this.setMemory(value);
|
|
64320
64340
|
}
|
|
64321
64341
|
async setMemory(value) {
|
|
64322
|
-
await
|
|
64342
|
+
await setMemoryImageSprite(this, value);
|
|
64323
64343
|
this.reloadPosition();
|
|
64324
64344
|
}
|
|
64325
64345
|
static from(source7, skipCache) {
|
|
@@ -64456,9 +64476,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64456
64476
|
}
|
|
64457
64477
|
};
|
|
64458
64478
|
async function setMemoryImageSprite(element, memory) {
|
|
64479
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64459
64480
|
return await setMemorySprite(element, memory, {
|
|
64460
64481
|
half: async () => {
|
|
64461
64482
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64483
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64462
64484
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64463
64485
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64464
64486
|
await element.load();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Texture, TextureSourceLike } from 'pixi.js';
|
|
2
|
-
import { I as ImageSprite, V as VideoSpriteMemory } from '../../ContainerChild-
|
|
3
|
-
import '../../interface/canvas/TextureMemory.cjs';
|
|
2
|
+
import { I as ImageSprite, V as VideoSpriteMemory } from '../../ContainerChild-WzyxEjAc.cjs';
|
|
4
3
|
import './AdditionalPositions.cjs';
|
|
4
|
+
import '../../interface/canvas/TextureMemory.cjs';
|
|
5
5
|
import './AnchorExtension.cjs';
|
|
6
6
|
import '../../types/CanvasEventNamesType.cjs';
|
|
7
7
|
import '../CanvasEvent.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Texture, TextureSourceLike } from 'pixi.js';
|
|
2
|
-
import { I as ImageSprite, V as VideoSpriteMemory } from '../../ContainerChild-
|
|
3
|
-
import '../../interface/canvas/TextureMemory.js';
|
|
2
|
+
import { I as ImageSprite, V as VideoSpriteMemory } from '../../ContainerChild-B5yD0BI8.js';
|
|
4
3
|
import './AdditionalPositions.js';
|
|
4
|
+
import '../../interface/canvas/TextureMemory.js';
|
|
5
5
|
import './AnchorExtension.js';
|
|
6
6
|
import '../../types/CanvasEventNamesType.js';
|
|
7
7
|
import '../CanvasEvent.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoSprite,
|
|
3
3
|
setMemoryVideoSprite
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-NB4Q3GFK.js";
|
|
5
5
|
import "../../chunk-OMPJ74CO.js";
|
|
6
6
|
import "../../chunk-2JGQWY5I.js";
|
|
7
7
|
import "../../chunk-2BUPSB7O.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-IRUKNG2Y.js";
|
|
9
9
|
import "../../chunk-6GJXIPNB.js";
|
|
10
10
|
import "../../chunk-I6TNJEE3.js";
|
|
11
11
|
import "../../chunk-DPUSONJ3.js";
|
|
@@ -22,7 +22,7 @@ import "../../chunk-ZBUW3MBH.js";
|
|
|
22
22
|
import "../../chunk-PIYIZHZL.js";
|
|
23
23
|
import "../../chunk-B7XQM2BB.js";
|
|
24
24
|
import "../../chunk-LEMOIFSV.js";
|
|
25
|
-
import "../../chunk-
|
|
25
|
+
import "../../chunk-TOG67Z7Q.js";
|
|
26
26
|
import "../../chunk-WS3FY4Q6.js";
|
|
27
27
|
import "../../chunk-Z3NBKYVU.js";
|
|
28
28
|
import "../../chunk-SAUNZQHZ.js";
|
package/dist/classes/index.cjs
CHANGED
|
@@ -57743,7 +57743,7 @@ extensions.add(soundAsset);
|
|
|
57743
57743
|
var sound = setInstance(new SoundLibrary());
|
|
57744
57744
|
|
|
57745
57745
|
// package.json
|
|
57746
|
-
var version = "0.9.
|
|
57746
|
+
var version = "0.9.7";
|
|
57747
57747
|
|
|
57748
57748
|
// src/constants.ts
|
|
57749
57749
|
var Repeat = "repeat";
|
|
@@ -58147,12 +58147,15 @@ var Container2 = class extends Container {
|
|
|
58147
58147
|
this.setMemory(value);
|
|
58148
58148
|
}
|
|
58149
58149
|
async setMemory(value) {
|
|
58150
|
+
await this.importChildren(value);
|
|
58151
|
+
return await setMemoryContainer(this, value);
|
|
58152
|
+
}
|
|
58153
|
+
async importChildren(value) {
|
|
58150
58154
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
58151
58155
|
let child = value.elements[i3];
|
|
58152
58156
|
let element = await importCanvasElement(child);
|
|
58153
58157
|
this.addChild(element);
|
|
58154
58158
|
}
|
|
58155
|
-
return await setMemoryContainer(this, value);
|
|
58156
58159
|
}
|
|
58157
58160
|
};
|
|
58158
58161
|
function getMemoryContainer(element) {
|
|
@@ -58240,29 +58243,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58240
58243
|
if (!props) {
|
|
58241
58244
|
return props;
|
|
58242
58245
|
}
|
|
58243
|
-
if (props.align
|
|
58244
|
-
if (
|
|
58245
|
-
props.
|
|
58246
|
-
|
|
58247
|
-
|
|
58248
|
-
|
|
58249
|
-
props.
|
|
58246
|
+
if (typeof props.align !== "number") {
|
|
58247
|
+
if (props.xAlign != void 0) {
|
|
58248
|
+
if (props.align === void 0) {
|
|
58249
|
+
props.align = { x: props.xAlign };
|
|
58250
|
+
delete props.xAlign;
|
|
58251
|
+
} else {
|
|
58252
|
+
props.align.x = props.xAlign;
|
|
58253
|
+
delete props.xAlign;
|
|
58250
58254
|
}
|
|
58251
|
-
|
|
58252
|
-
|
|
58255
|
+
}
|
|
58256
|
+
if (props.yAlign != void 0) {
|
|
58257
|
+
if (props.align === void 0) {
|
|
58258
|
+
props.align = { y: props.yAlign };
|
|
58259
|
+
delete props.yAlign;
|
|
58260
|
+
} else {
|
|
58261
|
+
props.align.y = props.yAlign;
|
|
58262
|
+
delete props.yAlign;
|
|
58253
58263
|
}
|
|
58254
58264
|
}
|
|
58255
58265
|
}
|
|
58256
|
-
if (props.percentagePosition
|
|
58257
|
-
if (
|
|
58258
|
-
props.
|
|
58259
|
-
|
|
58260
|
-
|
|
58261
|
-
|
|
58262
|
-
props.
|
|
58266
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58267
|
+
if (props.xPercentagePosition != void 0) {
|
|
58268
|
+
if (props.percentagePosition === void 0) {
|
|
58269
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58270
|
+
delete props.xPercentagePosition;
|
|
58271
|
+
} else {
|
|
58272
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58273
|
+
delete props.xPercentagePosition;
|
|
58263
58274
|
}
|
|
58264
|
-
|
|
58265
|
-
|
|
58275
|
+
}
|
|
58276
|
+
if (props.yPercentagePosition != void 0) {
|
|
58277
|
+
if (props.percentagePosition === void 0) {
|
|
58278
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58279
|
+
delete props.yPercentagePosition;
|
|
58280
|
+
} else {
|
|
58281
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58282
|
+
delete props.yPercentagePosition;
|
|
58266
58283
|
}
|
|
58267
58284
|
}
|
|
58268
58285
|
}
|
|
@@ -58282,10 +58299,10 @@ var ImageContainer = class extends Container2 {
|
|
|
58282
58299
|
if (options?.anchor !== void 0) {
|
|
58283
58300
|
this.anchor = options.anchor;
|
|
58284
58301
|
}
|
|
58285
|
-
if (options?.align !== void 0) {
|
|
58302
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58286
58303
|
this.align = options.align;
|
|
58287
58304
|
}
|
|
58288
|
-
if (options?.percentagePosition !== void 0) {
|
|
58305
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58289
58306
|
this.percentagePosition = options.percentagePosition;
|
|
58290
58307
|
}
|
|
58291
58308
|
}
|
|
@@ -58303,7 +58320,8 @@ var ImageContainer = class extends Container2 {
|
|
|
58303
58320
|
this.setMemory(value);
|
|
58304
58321
|
}
|
|
58305
58322
|
async setMemory(value) {
|
|
58306
|
-
await
|
|
58323
|
+
await this.importChildren(value);
|
|
58324
|
+
await setMemoryImageContainer(this, value);
|
|
58307
58325
|
this.reloadAnchor();
|
|
58308
58326
|
this.reloadPosition();
|
|
58309
58327
|
}
|
|
@@ -58477,11 +58495,13 @@ var ImageContainer = class extends Container2 {
|
|
|
58477
58495
|
}
|
|
58478
58496
|
};
|
|
58479
58497
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58498
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58480
58499
|
setMemoryContainer(element, memory, {
|
|
58481
58500
|
...opstions,
|
|
58482
58501
|
end: async () => {
|
|
58483
58502
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58484
58503
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58504
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58485
58505
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58486
58506
|
await element.load();
|
|
58487
58507
|
}
|
|
@@ -60467,7 +60487,6 @@ var CanvasManager = class {
|
|
|
60467
60487
|
* @param data The object.
|
|
60468
60488
|
*/
|
|
60469
60489
|
async import(data) {
|
|
60470
|
-
this.clear();
|
|
60471
60490
|
try {
|
|
60472
60491
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60473
60492
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60475,6 +60494,7 @@ var CanvasManager = class {
|
|
|
60475
60494
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60476
60495
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60477
60496
|
let list = await Promise.all(promises);
|
|
60497
|
+
this.clear();
|
|
60478
60498
|
list.forEach((element, i3) => {
|
|
60479
60499
|
let alias = elementAliasesOrder[i3];
|
|
60480
60500
|
this.add(alias, element);
|
|
@@ -63872,9 +63892,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63872
63892
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63873
63893
|
};
|
|
63874
63894
|
canvas.removeAll();
|
|
63875
|
-
let container =
|
|
63876
|
-
container
|
|
63877
|
-
container.align = 0.5;
|
|
63895
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
63896
|
+
canvas.add("container", container);
|
|
63878
63897
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63879
63898
|
helmlok.anchor = 0.5;
|
|
63880
63899
|
helmlok.xAlign = 1;
|
|
@@ -64185,6 +64204,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64185
64204
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64186
64205
|
constructor(options, textureAlias) {
|
|
64187
64206
|
super(options);
|
|
64207
|
+
options = analizePositionsExtensionProps(options);
|
|
64188
64208
|
if (textureAlias) {
|
|
64189
64209
|
this.textureAlias = textureAlias;
|
|
64190
64210
|
}
|
|
@@ -64208,7 +64228,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64208
64228
|
this.setMemory(value);
|
|
64209
64229
|
}
|
|
64210
64230
|
async setMemory(value) {
|
|
64211
|
-
await
|
|
64231
|
+
await setMemoryImageSprite(this, value);
|
|
64212
64232
|
this.reloadPosition();
|
|
64213
64233
|
}
|
|
64214
64234
|
static from(source7, skipCache) {
|
|
@@ -64345,9 +64365,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64345
64365
|
}
|
|
64346
64366
|
};
|
|
64347
64367
|
async function setMemoryImageSprite(element, memory) {
|
|
64368
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64348
64369
|
return await setMemorySprite(element, memory, {
|
|
64349
64370
|
half: async () => {
|
|
64350
64371
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64372
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64351
64373
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64352
64374
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64353
64375
|
await element.load();
|
package/dist/classes/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as CanvasVideo, default as VideoSprite } from './canvas/VideoSprite.cjs';
|
|
2
|
-
export { C as CanvasBase, C as CanvasBaseItem, I as CanvasImage, S as CanvasSprite, I as ImageSprite, S as Sprite } from '../ContainerChild-
|
|
2
|
+
export { C as CanvasBase, C as CanvasBaseItem, I as CanvasImage, S as CanvasSprite, I as ImageSprite, S as Sprite } from '../ContainerChild-WzyxEjAc.cjs';
|
|
3
3
|
export { default as CanvasContainer, default as Container } from './canvas/Container.cjs';
|
|
4
4
|
export { default as ImageContainer } from './canvas/ImageContainer.cjs';
|
|
5
5
|
export { default as CanvasText, default as Text } from './canvas/Text.cjs';
|
|
@@ -13,8 +13,8 @@ export { default as LabelAbstract } from './LabelAbstract.cjs';
|
|
|
13
13
|
export { default as Sound } from './Sound.cjs';
|
|
14
14
|
export { default as StoredClassModel } from './StoredClassModel.cjs';
|
|
15
15
|
import 'pixi.js';
|
|
16
|
-
import '../interface/canvas/TextureMemory.cjs';
|
|
17
16
|
import './canvas/AdditionalPositions.cjs';
|
|
17
|
+
import '../interface/canvas/TextureMemory.cjs';
|
|
18
18
|
import './canvas/AnchorExtension.cjs';
|
|
19
19
|
import '../types/CanvasEventNamesType.cjs';
|
|
20
20
|
import '../types/EventIdType.cjs';
|
package/dist/classes/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as CanvasVideo, default as VideoSprite } from './canvas/VideoSprite.js';
|
|
2
|
-
export { C as CanvasBase, C as CanvasBaseItem, I as CanvasImage, S as CanvasSprite, I as ImageSprite, S as Sprite } from '../ContainerChild-
|
|
2
|
+
export { C as CanvasBase, C as CanvasBaseItem, I as CanvasImage, S as CanvasSprite, I as ImageSprite, S as Sprite } from '../ContainerChild-B5yD0BI8.js';
|
|
3
3
|
export { default as CanvasContainer, default as Container } from './canvas/Container.js';
|
|
4
4
|
export { default as ImageContainer } from './canvas/ImageContainer.js';
|
|
5
5
|
export { default as CanvasText, default as Text } from './canvas/Text.js';
|
|
@@ -13,8 +13,8 @@ export { default as LabelAbstract } from './LabelAbstract.js';
|
|
|
13
13
|
export { default as Sound } from './Sound.js';
|
|
14
14
|
export { default as StoredClassModel } from './StoredClassModel.js';
|
|
15
15
|
import 'pixi.js';
|
|
16
|
-
import '../interface/canvas/TextureMemory.js';
|
|
17
16
|
import './canvas/AdditionalPositions.js';
|
|
17
|
+
import '../interface/canvas/TextureMemory.js';
|
|
18
18
|
import './canvas/AnchorExtension.js';
|
|
19
19
|
import '../types/CanvasEventNamesType.js';
|
|
20
20
|
import '../types/EventIdType.js';
|
package/dist/classes/index.js
CHANGED
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
StoredClassModel,
|
|
12
12
|
Text,
|
|
13
13
|
VideoSprite
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-NB4Q3GFK.js";
|
|
15
15
|
import "../chunk-OMPJ74CO.js";
|
|
16
16
|
import "../chunk-2JGQWY5I.js";
|
|
17
17
|
import "../chunk-2BUPSB7O.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-IRUKNG2Y.js";
|
|
19
19
|
import {
|
|
20
20
|
CanvasBaseItem
|
|
21
21
|
} from "../chunk-6GJXIPNB.js";
|
|
@@ -34,7 +34,7 @@ import "../chunk-ZBUW3MBH.js";
|
|
|
34
34
|
import "../chunk-PIYIZHZL.js";
|
|
35
35
|
import "../chunk-B7XQM2BB.js";
|
|
36
36
|
import "../chunk-LEMOIFSV.js";
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-TOG67Z7Q.js";
|
|
38
38
|
import "../chunk-WS3FY4Q6.js";
|
|
39
39
|
import "../chunk-Z3NBKYVU.js";
|
|
40
40
|
import "../chunk-SAUNZQHZ.js";
|