@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
|
@@ -57720,7 +57720,7 @@ extensions.add(soundAsset);
|
|
|
57720
57720
|
var sound = setInstance(new SoundLibrary());
|
|
57721
57721
|
|
|
57722
57722
|
// package.json
|
|
57723
|
-
var version = "0.9.
|
|
57723
|
+
var version = "0.9.7";
|
|
57724
57724
|
|
|
57725
57725
|
// src/constants.ts
|
|
57726
57726
|
var Repeat = "repeat";
|
|
@@ -57966,12 +57966,15 @@ var Container3 = class extends Container {
|
|
|
57966
57966
|
this.setMemory(value);
|
|
57967
57967
|
}
|
|
57968
57968
|
async setMemory(value) {
|
|
57969
|
+
await this.importChildren(value);
|
|
57970
|
+
return await setMemoryContainer(this, value);
|
|
57971
|
+
}
|
|
57972
|
+
async importChildren(value) {
|
|
57969
57973
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
57970
57974
|
let child = value.elements[i3];
|
|
57971
57975
|
let element = await importCanvasElement(child);
|
|
57972
57976
|
this.addChild(element);
|
|
57973
57977
|
}
|
|
57974
|
-
return await setMemoryContainer(this, value);
|
|
57975
57978
|
}
|
|
57976
57979
|
};
|
|
57977
57980
|
function getMemoryContainer(element) {
|
|
@@ -58059,29 +58062,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58059
58062
|
if (!props) {
|
|
58060
58063
|
return props;
|
|
58061
58064
|
}
|
|
58062
|
-
if (props.align
|
|
58063
|
-
if (
|
|
58064
|
-
props.
|
|
58065
|
-
|
|
58066
|
-
|
|
58067
|
-
|
|
58068
|
-
props.
|
|
58065
|
+
if (typeof props.align !== "number") {
|
|
58066
|
+
if (props.xAlign != void 0) {
|
|
58067
|
+
if (props.align === void 0) {
|
|
58068
|
+
props.align = { x: props.xAlign };
|
|
58069
|
+
delete props.xAlign;
|
|
58070
|
+
} else {
|
|
58071
|
+
props.align.x = props.xAlign;
|
|
58072
|
+
delete props.xAlign;
|
|
58069
58073
|
}
|
|
58070
|
-
|
|
58071
|
-
|
|
58074
|
+
}
|
|
58075
|
+
if (props.yAlign != void 0) {
|
|
58076
|
+
if (props.align === void 0) {
|
|
58077
|
+
props.align = { y: props.yAlign };
|
|
58078
|
+
delete props.yAlign;
|
|
58079
|
+
} else {
|
|
58080
|
+
props.align.y = props.yAlign;
|
|
58081
|
+
delete props.yAlign;
|
|
58072
58082
|
}
|
|
58073
58083
|
}
|
|
58074
58084
|
}
|
|
58075
|
-
if (props.percentagePosition
|
|
58076
|
-
if (
|
|
58077
|
-
props.
|
|
58078
|
-
|
|
58079
|
-
|
|
58080
|
-
|
|
58081
|
-
props.
|
|
58085
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58086
|
+
if (props.xPercentagePosition != void 0) {
|
|
58087
|
+
if (props.percentagePosition === void 0) {
|
|
58088
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58089
|
+
delete props.xPercentagePosition;
|
|
58090
|
+
} else {
|
|
58091
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58092
|
+
delete props.xPercentagePosition;
|
|
58082
58093
|
}
|
|
58083
|
-
|
|
58084
|
-
|
|
58094
|
+
}
|
|
58095
|
+
if (props.yPercentagePosition != void 0) {
|
|
58096
|
+
if (props.percentagePosition === void 0) {
|
|
58097
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58098
|
+
delete props.yPercentagePosition;
|
|
58099
|
+
} else {
|
|
58100
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58101
|
+
delete props.yPercentagePosition;
|
|
58085
58102
|
}
|
|
58086
58103
|
}
|
|
58087
58104
|
}
|
|
@@ -58101,10 +58118,10 @@ var ImageContainer = class extends Container3 {
|
|
|
58101
58118
|
if (options?.anchor !== void 0) {
|
|
58102
58119
|
this.anchor = options.anchor;
|
|
58103
58120
|
}
|
|
58104
|
-
if (options?.align !== void 0) {
|
|
58121
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58105
58122
|
this.align = options.align;
|
|
58106
58123
|
}
|
|
58107
|
-
if (options?.percentagePosition !== void 0) {
|
|
58124
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58108
58125
|
this.percentagePosition = options.percentagePosition;
|
|
58109
58126
|
}
|
|
58110
58127
|
}
|
|
@@ -58122,7 +58139,8 @@ var ImageContainer = class extends Container3 {
|
|
|
58122
58139
|
this.setMemory(value);
|
|
58123
58140
|
}
|
|
58124
58141
|
async setMemory(value) {
|
|
58125
|
-
await
|
|
58142
|
+
await this.importChildren(value);
|
|
58143
|
+
await setMemoryImageContainer(this, value);
|
|
58126
58144
|
this.reloadAnchor();
|
|
58127
58145
|
this.reloadPosition();
|
|
58128
58146
|
}
|
|
@@ -58296,11 +58314,13 @@ var ImageContainer = class extends Container3 {
|
|
|
58296
58314
|
}
|
|
58297
58315
|
};
|
|
58298
58316
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58317
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58299
58318
|
setMemoryContainer(element, memory, {
|
|
58300
58319
|
...opstions,
|
|
58301
58320
|
end: async () => {
|
|
58302
58321
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58303
58322
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58323
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58304
58324
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58305
58325
|
await element.load();
|
|
58306
58326
|
}
|
|
@@ -60357,7 +60377,6 @@ var CanvasManager = class {
|
|
|
60357
60377
|
* @param data The object.
|
|
60358
60378
|
*/
|
|
60359
60379
|
async import(data) {
|
|
60360
|
-
this.clear();
|
|
60361
60380
|
try {
|
|
60362
60381
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60363
60382
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60365,6 +60384,7 @@ var CanvasManager = class {
|
|
|
60365
60384
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60366
60385
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60367
60386
|
let list = await Promise.all(promises);
|
|
60387
|
+
this.clear();
|
|
60368
60388
|
list.forEach((element, i3) => {
|
|
60369
60389
|
let alias = elementAliasesOrder[i3];
|
|
60370
60390
|
this.add(alias, element);
|
|
@@ -63781,9 +63801,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63781
63801
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63782
63802
|
};
|
|
63783
63803
|
canvas.removeAll();
|
|
63784
|
-
let container =
|
|
63785
|
-
container
|
|
63786
|
-
container.align = 0.5;
|
|
63804
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
63805
|
+
canvas.add("container", container);
|
|
63787
63806
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63788
63807
|
helmlok.anchor = 0.5;
|
|
63789
63808
|
helmlok.xAlign = 1;
|
|
@@ -64077,6 +64096,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64077
64096
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64078
64097
|
constructor(options, textureAlias) {
|
|
64079
64098
|
super(options);
|
|
64099
|
+
options = analizePositionsExtensionProps(options);
|
|
64080
64100
|
if (textureAlias) {
|
|
64081
64101
|
this.textureAlias = textureAlias;
|
|
64082
64102
|
}
|
|
@@ -64100,7 +64120,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64100
64120
|
this.setMemory(value);
|
|
64101
64121
|
}
|
|
64102
64122
|
async setMemory(value) {
|
|
64103
|
-
await
|
|
64123
|
+
await setMemoryImageSprite(this, value);
|
|
64104
64124
|
this.reloadPosition();
|
|
64105
64125
|
}
|
|
64106
64126
|
static from(source7, skipCache) {
|
|
@@ -64237,9 +64257,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64237
64257
|
}
|
|
64238
64258
|
};
|
|
64239
64259
|
async function setMemoryImageSprite(element, memory) {
|
|
64260
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64240
64261
|
return await setMemorySprite(element, memory, {
|
|
64241
64262
|
half: async () => {
|
|
64242
64263
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64264
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64243
64265
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64244
64266
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64245
64267
|
await element.load();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stepLabelTestLAbel
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NB4Q3GFK.js";
|
|
4
4
|
import "../chunk-OMPJ74CO.js";
|
|
5
5
|
import "../chunk-2JGQWY5I.js";
|
|
6
6
|
import "../chunk-2BUPSB7O.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-IRUKNG2Y.js";
|
|
8
8
|
import "../chunk-6GJXIPNB.js";
|
|
9
9
|
import "../chunk-I6TNJEE3.js";
|
|
10
10
|
import "../chunk-DPUSONJ3.js";
|
|
@@ -21,7 +21,7 @@ import "../chunk-ZBUW3MBH.js";
|
|
|
21
21
|
import "../chunk-PIYIZHZL.js";
|
|
22
22
|
import "../chunk-B7XQM2BB.js";
|
|
23
23
|
import "../chunk-LEMOIFSV.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-TOG67Z7Q.js";
|
|
25
25
|
import "../chunk-WS3FY4Q6.js";
|
|
26
26
|
import "../chunk-Z3NBKYVU.js";
|
|
27
27
|
import "../chunk-SAUNZQHZ.js";
|
|
@@ -57720,7 +57720,7 @@ extensions.add(soundAsset);
|
|
|
57720
57720
|
var sound = setInstance(new SoundLibrary());
|
|
57721
57721
|
|
|
57722
57722
|
// package.json
|
|
57723
|
-
var version = "0.9.
|
|
57723
|
+
var version = "0.9.7";
|
|
57724
57724
|
|
|
57725
57725
|
// src/constants.ts
|
|
57726
57726
|
var Repeat = "repeat";
|
|
@@ -57966,12 +57966,15 @@ var Container3 = class extends Container {
|
|
|
57966
57966
|
this.setMemory(value);
|
|
57967
57967
|
}
|
|
57968
57968
|
async setMemory(value) {
|
|
57969
|
+
await this.importChildren(value);
|
|
57970
|
+
return await setMemoryContainer(this, value);
|
|
57971
|
+
}
|
|
57972
|
+
async importChildren(value) {
|
|
57969
57973
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
57970
57974
|
let child = value.elements[i3];
|
|
57971
57975
|
let element = await importCanvasElement(child);
|
|
57972
57976
|
this.addChild(element);
|
|
57973
57977
|
}
|
|
57974
|
-
return await setMemoryContainer(this, value);
|
|
57975
57978
|
}
|
|
57976
57979
|
};
|
|
57977
57980
|
function getMemoryContainer(element) {
|
|
@@ -58059,29 +58062,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58059
58062
|
if (!props) {
|
|
58060
58063
|
return props;
|
|
58061
58064
|
}
|
|
58062
|
-
if (props.align
|
|
58063
|
-
if (
|
|
58064
|
-
props.
|
|
58065
|
-
|
|
58066
|
-
|
|
58067
|
-
|
|
58068
|
-
props.
|
|
58065
|
+
if (typeof props.align !== "number") {
|
|
58066
|
+
if (props.xAlign != void 0) {
|
|
58067
|
+
if (props.align === void 0) {
|
|
58068
|
+
props.align = { x: props.xAlign };
|
|
58069
|
+
delete props.xAlign;
|
|
58070
|
+
} else {
|
|
58071
|
+
props.align.x = props.xAlign;
|
|
58072
|
+
delete props.xAlign;
|
|
58069
58073
|
}
|
|
58070
|
-
|
|
58071
|
-
|
|
58074
|
+
}
|
|
58075
|
+
if (props.yAlign != void 0) {
|
|
58076
|
+
if (props.align === void 0) {
|
|
58077
|
+
props.align = { y: props.yAlign };
|
|
58078
|
+
delete props.yAlign;
|
|
58079
|
+
} else {
|
|
58080
|
+
props.align.y = props.yAlign;
|
|
58081
|
+
delete props.yAlign;
|
|
58072
58082
|
}
|
|
58073
58083
|
}
|
|
58074
58084
|
}
|
|
58075
|
-
if (props.percentagePosition
|
|
58076
|
-
if (
|
|
58077
|
-
props.
|
|
58078
|
-
|
|
58079
|
-
|
|
58080
|
-
|
|
58081
|
-
props.
|
|
58085
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58086
|
+
if (props.xPercentagePosition != void 0) {
|
|
58087
|
+
if (props.percentagePosition === void 0) {
|
|
58088
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58089
|
+
delete props.xPercentagePosition;
|
|
58090
|
+
} else {
|
|
58091
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58092
|
+
delete props.xPercentagePosition;
|
|
58082
58093
|
}
|
|
58083
|
-
|
|
58084
|
-
|
|
58094
|
+
}
|
|
58095
|
+
if (props.yPercentagePosition != void 0) {
|
|
58096
|
+
if (props.percentagePosition === void 0) {
|
|
58097
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58098
|
+
delete props.yPercentagePosition;
|
|
58099
|
+
} else {
|
|
58100
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58101
|
+
delete props.yPercentagePosition;
|
|
58085
58102
|
}
|
|
58086
58103
|
}
|
|
58087
58104
|
}
|
|
@@ -58101,10 +58118,10 @@ var ImageContainer = class extends Container3 {
|
|
|
58101
58118
|
if (options?.anchor !== void 0) {
|
|
58102
58119
|
this.anchor = options.anchor;
|
|
58103
58120
|
}
|
|
58104
|
-
if (options?.align !== void 0) {
|
|
58121
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58105
58122
|
this.align = options.align;
|
|
58106
58123
|
}
|
|
58107
|
-
if (options?.percentagePosition !== void 0) {
|
|
58124
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58108
58125
|
this.percentagePosition = options.percentagePosition;
|
|
58109
58126
|
}
|
|
58110
58127
|
}
|
|
@@ -58122,7 +58139,8 @@ var ImageContainer = class extends Container3 {
|
|
|
58122
58139
|
this.setMemory(value);
|
|
58123
58140
|
}
|
|
58124
58141
|
async setMemory(value) {
|
|
58125
|
-
await
|
|
58142
|
+
await this.importChildren(value);
|
|
58143
|
+
await setMemoryImageContainer(this, value);
|
|
58126
58144
|
this.reloadAnchor();
|
|
58127
58145
|
this.reloadPosition();
|
|
58128
58146
|
}
|
|
@@ -58296,11 +58314,13 @@ var ImageContainer = class extends Container3 {
|
|
|
58296
58314
|
}
|
|
58297
58315
|
};
|
|
58298
58316
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58317
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58299
58318
|
setMemoryContainer(element, memory, {
|
|
58300
58319
|
...opstions,
|
|
58301
58320
|
end: async () => {
|
|
58302
58321
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58303
58322
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58323
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58304
58324
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58305
58325
|
await element.load();
|
|
58306
58326
|
}
|
|
@@ -60357,7 +60377,6 @@ var CanvasManager = class {
|
|
|
60357
60377
|
* @param data The object.
|
|
60358
60378
|
*/
|
|
60359
60379
|
async import(data) {
|
|
60360
|
-
this.clear();
|
|
60361
60380
|
try {
|
|
60362
60381
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60363
60382
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60365,6 +60384,7 @@ var CanvasManager = class {
|
|
|
60365
60384
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60366
60385
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60367
60386
|
let list = await Promise.all(promises);
|
|
60387
|
+
this.clear();
|
|
60368
60388
|
list.forEach((element, i3) => {
|
|
60369
60389
|
let alias = elementAliasesOrder[i3];
|
|
60370
60390
|
this.add(alias, element);
|
|
@@ -63781,9 +63801,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63781
63801
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63782
63802
|
};
|
|
63783
63803
|
canvas.removeAll();
|
|
63784
|
-
let container =
|
|
63785
|
-
container
|
|
63786
|
-
container.align = 0.5;
|
|
63804
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
63805
|
+
canvas.add("container", container);
|
|
63787
63806
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63788
63807
|
helmlok.anchor = 0.5;
|
|
63789
63808
|
helmlok.xAlign = 1;
|
|
@@ -64051,6 +64070,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64051
64070
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64052
64071
|
constructor(options, textureAlias) {
|
|
64053
64072
|
super(options);
|
|
64073
|
+
options = analizePositionsExtensionProps(options);
|
|
64054
64074
|
if (textureAlias) {
|
|
64055
64075
|
this.textureAlias = textureAlias;
|
|
64056
64076
|
}
|
|
@@ -64074,7 +64094,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64074
64094
|
this.setMemory(value);
|
|
64075
64095
|
}
|
|
64076
64096
|
async setMemory(value) {
|
|
64077
|
-
await
|
|
64097
|
+
await setMemoryImageSprite(this, value);
|
|
64078
64098
|
this.reloadPosition();
|
|
64079
64099
|
}
|
|
64080
64100
|
static from(source7, skipCache) {
|
|
@@ -64211,9 +64231,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64211
64231
|
}
|
|
64212
64232
|
};
|
|
64213
64233
|
async function setMemoryImageSprite(element, memory) {
|
|
64234
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64214
64235
|
return await setMemorySprite(element, memory, {
|
|
64215
64236
|
half: async () => {
|
|
64216
64237
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64238
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64217
64239
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64218
64240
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64219
64241
|
await element.load();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
videoTest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NB4Q3GFK.js";
|
|
4
4
|
import "../chunk-OMPJ74CO.js";
|
|
5
5
|
import "../chunk-2JGQWY5I.js";
|
|
6
6
|
import "../chunk-2BUPSB7O.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-IRUKNG2Y.js";
|
|
8
8
|
import "../chunk-6GJXIPNB.js";
|
|
9
9
|
import "../chunk-I6TNJEE3.js";
|
|
10
10
|
import "../chunk-DPUSONJ3.js";
|
|
@@ -21,7 +21,7 @@ import "../chunk-ZBUW3MBH.js";
|
|
|
21
21
|
import "../chunk-PIYIZHZL.js";
|
|
22
22
|
import "../chunk-B7XQM2BB.js";
|
|
23
23
|
import "../chunk-LEMOIFSV.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-TOG67Z7Q.js";
|
|
25
25
|
import "../chunk-WS3FY4Q6.js";
|
|
26
26
|
import "../chunk-Z3NBKYVU.js";
|
|
27
27
|
import "../chunk-SAUNZQHZ.js";
|
package/dist/labels/index.cjs
CHANGED
|
@@ -57721,7 +57721,7 @@ extensions.add(soundAsset);
|
|
|
57721
57721
|
var sound = setInstance(new SoundLibrary());
|
|
57722
57722
|
|
|
57723
57723
|
// package.json
|
|
57724
|
-
var version = "0.9.
|
|
57724
|
+
var version = "0.9.7";
|
|
57725
57725
|
|
|
57726
57726
|
// src/constants.ts
|
|
57727
57727
|
var Repeat = "repeat";
|
|
@@ -58125,12 +58125,15 @@ var Container2 = class extends Container {
|
|
|
58125
58125
|
this.setMemory(value);
|
|
58126
58126
|
}
|
|
58127
58127
|
async setMemory(value) {
|
|
58128
|
+
await this.importChildren(value);
|
|
58129
|
+
return await setMemoryContainer(this, value);
|
|
58130
|
+
}
|
|
58131
|
+
async importChildren(value) {
|
|
58128
58132
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
58129
58133
|
let child = value.elements[i3];
|
|
58130
58134
|
let element = await importCanvasElement(child);
|
|
58131
58135
|
this.addChild(element);
|
|
58132
58136
|
}
|
|
58133
|
-
return await setMemoryContainer(this, value);
|
|
58134
58137
|
}
|
|
58135
58138
|
};
|
|
58136
58139
|
function getMemoryContainer(element) {
|
|
@@ -58218,29 +58221,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58218
58221
|
if (!props) {
|
|
58219
58222
|
return props;
|
|
58220
58223
|
}
|
|
58221
|
-
if (props.align
|
|
58222
|
-
if (
|
|
58223
|
-
props.
|
|
58224
|
-
|
|
58225
|
-
|
|
58226
|
-
|
|
58227
|
-
props.
|
|
58224
|
+
if (typeof props.align !== "number") {
|
|
58225
|
+
if (props.xAlign != void 0) {
|
|
58226
|
+
if (props.align === void 0) {
|
|
58227
|
+
props.align = { x: props.xAlign };
|
|
58228
|
+
delete props.xAlign;
|
|
58229
|
+
} else {
|
|
58230
|
+
props.align.x = props.xAlign;
|
|
58231
|
+
delete props.xAlign;
|
|
58228
58232
|
}
|
|
58229
|
-
|
|
58230
|
-
|
|
58233
|
+
}
|
|
58234
|
+
if (props.yAlign != void 0) {
|
|
58235
|
+
if (props.align === void 0) {
|
|
58236
|
+
props.align = { y: props.yAlign };
|
|
58237
|
+
delete props.yAlign;
|
|
58238
|
+
} else {
|
|
58239
|
+
props.align.y = props.yAlign;
|
|
58240
|
+
delete props.yAlign;
|
|
58231
58241
|
}
|
|
58232
58242
|
}
|
|
58233
58243
|
}
|
|
58234
|
-
if (props.percentagePosition
|
|
58235
|
-
if (
|
|
58236
|
-
props.
|
|
58237
|
-
|
|
58238
|
-
|
|
58239
|
-
|
|
58240
|
-
props.
|
|
58244
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58245
|
+
if (props.xPercentagePosition != void 0) {
|
|
58246
|
+
if (props.percentagePosition === void 0) {
|
|
58247
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58248
|
+
delete props.xPercentagePosition;
|
|
58249
|
+
} else {
|
|
58250
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58251
|
+
delete props.xPercentagePosition;
|
|
58241
58252
|
}
|
|
58242
|
-
|
|
58243
|
-
|
|
58253
|
+
}
|
|
58254
|
+
if (props.yPercentagePosition != void 0) {
|
|
58255
|
+
if (props.percentagePosition === void 0) {
|
|
58256
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58257
|
+
delete props.yPercentagePosition;
|
|
58258
|
+
} else {
|
|
58259
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58260
|
+
delete props.yPercentagePosition;
|
|
58244
58261
|
}
|
|
58245
58262
|
}
|
|
58246
58263
|
}
|
|
@@ -58260,10 +58277,10 @@ var ImageContainer = class extends Container2 {
|
|
|
58260
58277
|
if (options?.anchor !== void 0) {
|
|
58261
58278
|
this.anchor = options.anchor;
|
|
58262
58279
|
}
|
|
58263
|
-
if (options?.align !== void 0) {
|
|
58280
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58264
58281
|
this.align = options.align;
|
|
58265
58282
|
}
|
|
58266
|
-
if (options?.percentagePosition !== void 0) {
|
|
58283
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58267
58284
|
this.percentagePosition = options.percentagePosition;
|
|
58268
58285
|
}
|
|
58269
58286
|
}
|
|
@@ -58281,7 +58298,8 @@ var ImageContainer = class extends Container2 {
|
|
|
58281
58298
|
this.setMemory(value);
|
|
58282
58299
|
}
|
|
58283
58300
|
async setMemory(value) {
|
|
58284
|
-
await
|
|
58301
|
+
await this.importChildren(value);
|
|
58302
|
+
await setMemoryImageContainer(this, value);
|
|
58285
58303
|
this.reloadAnchor();
|
|
58286
58304
|
this.reloadPosition();
|
|
58287
58305
|
}
|
|
@@ -58455,11 +58473,13 @@ var ImageContainer = class extends Container2 {
|
|
|
58455
58473
|
}
|
|
58456
58474
|
};
|
|
58457
58475
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58476
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58458
58477
|
setMemoryContainer(element, memory, {
|
|
58459
58478
|
...opstions,
|
|
58460
58479
|
end: async () => {
|
|
58461
58480
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58462
58481
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58482
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58463
58483
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58464
58484
|
await element.load();
|
|
58465
58485
|
}
|
|
@@ -60445,7 +60465,6 @@ var CanvasManager = class {
|
|
|
60445
60465
|
* @param data The object.
|
|
60446
60466
|
*/
|
|
60447
60467
|
async import(data) {
|
|
60448
|
-
this.clear();
|
|
60449
60468
|
try {
|
|
60450
60469
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60451
60470
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60453,6 +60472,7 @@ var CanvasManager = class {
|
|
|
60453
60472
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60454
60473
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60455
60474
|
let list = await Promise.all(promises);
|
|
60475
|
+
this.clear();
|
|
60456
60476
|
list.forEach((element, i3) => {
|
|
60457
60477
|
let alias = elementAliasesOrder[i3];
|
|
60458
60478
|
this.add(alias, element);
|
|
@@ -63037,6 +63057,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
63037
63057
|
pixivnId = CANVAS_IMAGE_ID;
|
|
63038
63058
|
constructor(options, textureAlias) {
|
|
63039
63059
|
super(options);
|
|
63060
|
+
options = analizePositionsExtensionProps(options);
|
|
63040
63061
|
if (textureAlias) {
|
|
63041
63062
|
this.textureAlias = textureAlias;
|
|
63042
63063
|
}
|
|
@@ -63060,7 +63081,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
63060
63081
|
this.setMemory(value);
|
|
63061
63082
|
}
|
|
63062
63083
|
async setMemory(value) {
|
|
63063
|
-
await
|
|
63084
|
+
await setMemoryImageSprite(this, value);
|
|
63064
63085
|
this.reloadPosition();
|
|
63065
63086
|
}
|
|
63066
63087
|
static from(source7, skipCache) {
|
|
@@ -63197,9 +63218,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
63197
63218
|
}
|
|
63198
63219
|
};
|
|
63199
63220
|
async function setMemoryImageSprite(element, memory) {
|
|
63221
|
+
memory = analizePositionsExtensionProps(memory);
|
|
63200
63222
|
return await setMemorySprite(element, memory, {
|
|
63201
63223
|
half: async () => {
|
|
63202
63224
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
63225
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
63203
63226
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
63204
63227
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
63205
63228
|
await element.load();
|
|
@@ -64275,9 +64298,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
64275
64298
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
64276
64299
|
};
|
|
64277
64300
|
canvas.removeAll();
|
|
64278
|
-
let container =
|
|
64279
|
-
container
|
|
64280
|
-
container.align = 0.5;
|
|
64301
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
64302
|
+
canvas.add("container", container);
|
|
64281
64303
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
64282
64304
|
helmlok.anchor = 0.5;
|
|
64283
64305
|
helmlok.xAlign = 1;
|
package/dist/labels/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pixivnTestStartLabel
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NB4Q3GFK.js";
|
|
4
4
|
import "../chunk-OMPJ74CO.js";
|
|
5
5
|
import "../chunk-2JGQWY5I.js";
|
|
6
6
|
import "../chunk-2BUPSB7O.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-IRUKNG2Y.js";
|
|
8
8
|
import "../chunk-6GJXIPNB.js";
|
|
9
9
|
import "../chunk-I6TNJEE3.js";
|
|
10
10
|
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";
|