@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
|
@@ -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";
|
|
@@ -58013,12 +58013,15 @@ var Container3 = class extends Container {
|
|
|
58013
58013
|
this.setMemory(value);
|
|
58014
58014
|
}
|
|
58015
58015
|
async setMemory(value) {
|
|
58016
|
+
await this.importChildren(value);
|
|
58017
|
+
return await setMemoryContainer(this, value);
|
|
58018
|
+
}
|
|
58019
|
+
async importChildren(value) {
|
|
58016
58020
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
58017
58021
|
let child = value.elements[i3];
|
|
58018
58022
|
let element = await importCanvasElement(child);
|
|
58019
58023
|
this.addChild(element);
|
|
58020
58024
|
}
|
|
58021
|
-
return await setMemoryContainer(this, value);
|
|
58022
58025
|
}
|
|
58023
58026
|
};
|
|
58024
58027
|
function getMemoryContainer(element) {
|
|
@@ -58106,29 +58109,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58106
58109
|
if (!props) {
|
|
58107
58110
|
return props;
|
|
58108
58111
|
}
|
|
58109
|
-
if (props.align
|
|
58110
|
-
if (
|
|
58111
|
-
props.
|
|
58112
|
-
|
|
58113
|
-
|
|
58114
|
-
|
|
58115
|
-
props.
|
|
58112
|
+
if (typeof props.align !== "number") {
|
|
58113
|
+
if (props.xAlign != void 0) {
|
|
58114
|
+
if (props.align === void 0) {
|
|
58115
|
+
props.align = { x: props.xAlign };
|
|
58116
|
+
delete props.xAlign;
|
|
58117
|
+
} else {
|
|
58118
|
+
props.align.x = props.xAlign;
|
|
58119
|
+
delete props.xAlign;
|
|
58116
58120
|
}
|
|
58117
|
-
|
|
58118
|
-
|
|
58121
|
+
}
|
|
58122
|
+
if (props.yAlign != void 0) {
|
|
58123
|
+
if (props.align === void 0) {
|
|
58124
|
+
props.align = { y: props.yAlign };
|
|
58125
|
+
delete props.yAlign;
|
|
58126
|
+
} else {
|
|
58127
|
+
props.align.y = props.yAlign;
|
|
58128
|
+
delete props.yAlign;
|
|
58119
58129
|
}
|
|
58120
58130
|
}
|
|
58121
58131
|
}
|
|
58122
|
-
if (props.percentagePosition
|
|
58123
|
-
if (
|
|
58124
|
-
props.
|
|
58125
|
-
|
|
58126
|
-
|
|
58127
|
-
|
|
58128
|
-
props.
|
|
58132
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58133
|
+
if (props.xPercentagePosition != void 0) {
|
|
58134
|
+
if (props.percentagePosition === void 0) {
|
|
58135
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58136
|
+
delete props.xPercentagePosition;
|
|
58137
|
+
} else {
|
|
58138
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58139
|
+
delete props.xPercentagePosition;
|
|
58129
58140
|
}
|
|
58130
|
-
|
|
58131
|
-
|
|
58141
|
+
}
|
|
58142
|
+
if (props.yPercentagePosition != void 0) {
|
|
58143
|
+
if (props.percentagePosition === void 0) {
|
|
58144
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58145
|
+
delete props.yPercentagePosition;
|
|
58146
|
+
} else {
|
|
58147
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58148
|
+
delete props.yPercentagePosition;
|
|
58132
58149
|
}
|
|
58133
58150
|
}
|
|
58134
58151
|
}
|
|
@@ -58148,10 +58165,10 @@ var ImageContainer = class extends Container3 {
|
|
|
58148
58165
|
if (options?.anchor !== void 0) {
|
|
58149
58166
|
this.anchor = options.anchor;
|
|
58150
58167
|
}
|
|
58151
|
-
if (options?.align !== void 0) {
|
|
58168
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58152
58169
|
this.align = options.align;
|
|
58153
58170
|
}
|
|
58154
|
-
if (options?.percentagePosition !== void 0) {
|
|
58171
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58155
58172
|
this.percentagePosition = options.percentagePosition;
|
|
58156
58173
|
}
|
|
58157
58174
|
}
|
|
@@ -58169,7 +58186,8 @@ var ImageContainer = class extends Container3 {
|
|
|
58169
58186
|
this.setMemory(value);
|
|
58170
58187
|
}
|
|
58171
58188
|
async setMemory(value) {
|
|
58172
|
-
await
|
|
58189
|
+
await this.importChildren(value);
|
|
58190
|
+
await setMemoryImageContainer(this, value);
|
|
58173
58191
|
this.reloadAnchor();
|
|
58174
58192
|
this.reloadPosition();
|
|
58175
58193
|
}
|
|
@@ -58343,11 +58361,13 @@ var ImageContainer = class extends Container3 {
|
|
|
58343
58361
|
}
|
|
58344
58362
|
};
|
|
58345
58363
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58364
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58346
58365
|
setMemoryContainer(element, memory, {
|
|
58347
58366
|
...opstions,
|
|
58348
58367
|
end: async () => {
|
|
58349
58368
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58350
58369
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58370
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58351
58371
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58352
58372
|
await element.load();
|
|
58353
58373
|
}
|
|
@@ -60404,7 +60424,6 @@ var CanvasManager = class {
|
|
|
60404
60424
|
* @param data The object.
|
|
60405
60425
|
*/
|
|
60406
60426
|
async import(data) {
|
|
60407
|
-
this.clear();
|
|
60408
60427
|
try {
|
|
60409
60428
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60410
60429
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60412,6 +60431,7 @@ var CanvasManager = class {
|
|
|
60412
60431
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60413
60432
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60414
60433
|
let list = await Promise.all(promises);
|
|
60434
|
+
this.clear();
|
|
60415
60435
|
list.forEach((element, i3) => {
|
|
60416
60436
|
let alias = elementAliasesOrder[i3];
|
|
60417
60437
|
this.add(alias, element);
|
|
@@ -63708,9 +63728,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63708
63728
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63709
63729
|
};
|
|
63710
63730
|
canvas.removeAll();
|
|
63711
|
-
let container =
|
|
63712
|
-
container
|
|
63713
|
-
container.align = 0.5;
|
|
63731
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
63732
|
+
canvas.add("container", container);
|
|
63714
63733
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63715
63734
|
helmlok.anchor = 0.5;
|
|
63716
63735
|
helmlok.xAlign = 1;
|
|
@@ -64021,6 +64040,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64021
64040
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64022
64041
|
constructor(options, textureAlias) {
|
|
64023
64042
|
super(options);
|
|
64043
|
+
options = analizePositionsExtensionProps(options);
|
|
64024
64044
|
if (textureAlias) {
|
|
64025
64045
|
this.textureAlias = textureAlias;
|
|
64026
64046
|
}
|
|
@@ -64044,7 +64064,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64044
64064
|
this.setMemory(value);
|
|
64045
64065
|
}
|
|
64046
64066
|
async setMemory(value) {
|
|
64047
|
-
await
|
|
64067
|
+
await setMemoryImageSprite(this, value);
|
|
64048
64068
|
this.reloadPosition();
|
|
64049
64069
|
}
|
|
64050
64070
|
static from(source7, skipCache) {
|
|
@@ -64181,9 +64201,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64181
64201
|
}
|
|
64182
64202
|
};
|
|
64183
64203
|
async function setMemoryImageSprite(element, memory) {
|
|
64204
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64184
64205
|
return await setMemorySprite(element, memory, {
|
|
64185
64206
|
half: async () => {
|
|
64186
64207
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64208
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64187
64209
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64188
64210
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64189
64211
|
await element.load();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FadeAlphaTicker
|
|
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";
|
|
@@ -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";
|
|
@@ -57967,12 +57967,15 @@ var Container3 = class extends Container {
|
|
|
57967
57967
|
this.setMemory(value);
|
|
57968
57968
|
}
|
|
57969
57969
|
async setMemory(value) {
|
|
57970
|
+
await this.importChildren(value);
|
|
57971
|
+
return await setMemoryContainer(this, value);
|
|
57972
|
+
}
|
|
57973
|
+
async importChildren(value) {
|
|
57970
57974
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
57971
57975
|
let child = value.elements[i3];
|
|
57972
57976
|
let element = await importCanvasElement(child);
|
|
57973
57977
|
this.addChild(element);
|
|
57974
57978
|
}
|
|
57975
|
-
return await setMemoryContainer(this, value);
|
|
57976
57979
|
}
|
|
57977
57980
|
};
|
|
57978
57981
|
function getMemoryContainer(element) {
|
|
@@ -58060,29 +58063,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58060
58063
|
if (!props) {
|
|
58061
58064
|
return props;
|
|
58062
58065
|
}
|
|
58063
|
-
if (props.align
|
|
58064
|
-
if (
|
|
58065
|
-
props.
|
|
58066
|
-
|
|
58067
|
-
|
|
58068
|
-
|
|
58069
|
-
props.
|
|
58066
|
+
if (typeof props.align !== "number") {
|
|
58067
|
+
if (props.xAlign != void 0) {
|
|
58068
|
+
if (props.align === void 0) {
|
|
58069
|
+
props.align = { x: props.xAlign };
|
|
58070
|
+
delete props.xAlign;
|
|
58071
|
+
} else {
|
|
58072
|
+
props.align.x = props.xAlign;
|
|
58073
|
+
delete props.xAlign;
|
|
58070
58074
|
}
|
|
58071
|
-
|
|
58072
|
-
|
|
58075
|
+
}
|
|
58076
|
+
if (props.yAlign != void 0) {
|
|
58077
|
+
if (props.align === void 0) {
|
|
58078
|
+
props.align = { y: props.yAlign };
|
|
58079
|
+
delete props.yAlign;
|
|
58080
|
+
} else {
|
|
58081
|
+
props.align.y = props.yAlign;
|
|
58082
|
+
delete props.yAlign;
|
|
58073
58083
|
}
|
|
58074
58084
|
}
|
|
58075
58085
|
}
|
|
58076
|
-
if (props.percentagePosition
|
|
58077
|
-
if (
|
|
58078
|
-
props.
|
|
58079
|
-
|
|
58080
|
-
|
|
58081
|
-
|
|
58082
|
-
props.
|
|
58086
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58087
|
+
if (props.xPercentagePosition != void 0) {
|
|
58088
|
+
if (props.percentagePosition === void 0) {
|
|
58089
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58090
|
+
delete props.xPercentagePosition;
|
|
58091
|
+
} else {
|
|
58092
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58093
|
+
delete props.xPercentagePosition;
|
|
58083
58094
|
}
|
|
58084
|
-
|
|
58085
|
-
|
|
58095
|
+
}
|
|
58096
|
+
if (props.yPercentagePosition != void 0) {
|
|
58097
|
+
if (props.percentagePosition === void 0) {
|
|
58098
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58099
|
+
delete props.yPercentagePosition;
|
|
58100
|
+
} else {
|
|
58101
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58102
|
+
delete props.yPercentagePosition;
|
|
58086
58103
|
}
|
|
58087
58104
|
}
|
|
58088
58105
|
}
|
|
@@ -58102,10 +58119,10 @@ var ImageContainer = class extends Container3 {
|
|
|
58102
58119
|
if (options?.anchor !== void 0) {
|
|
58103
58120
|
this.anchor = options.anchor;
|
|
58104
58121
|
}
|
|
58105
|
-
if (options?.align !== void 0) {
|
|
58122
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58106
58123
|
this.align = options.align;
|
|
58107
58124
|
}
|
|
58108
|
-
if (options?.percentagePosition !== void 0) {
|
|
58125
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58109
58126
|
this.percentagePosition = options.percentagePosition;
|
|
58110
58127
|
}
|
|
58111
58128
|
}
|
|
@@ -58123,7 +58140,8 @@ var ImageContainer = class extends Container3 {
|
|
|
58123
58140
|
this.setMemory(value);
|
|
58124
58141
|
}
|
|
58125
58142
|
async setMemory(value) {
|
|
58126
|
-
await
|
|
58143
|
+
await this.importChildren(value);
|
|
58144
|
+
await setMemoryImageContainer(this, value);
|
|
58127
58145
|
this.reloadAnchor();
|
|
58128
58146
|
this.reloadPosition();
|
|
58129
58147
|
}
|
|
@@ -58297,11 +58315,13 @@ var ImageContainer = class extends Container3 {
|
|
|
58297
58315
|
}
|
|
58298
58316
|
};
|
|
58299
58317
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58318
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58300
58319
|
setMemoryContainer(element, memory, {
|
|
58301
58320
|
...opstions,
|
|
58302
58321
|
end: async () => {
|
|
58303
58322
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58304
58323
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58324
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58305
58325
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58306
58326
|
await element.load();
|
|
58307
58327
|
}
|
|
@@ -60358,7 +60378,6 @@ var CanvasManager = class {
|
|
|
60358
60378
|
* @param data The object.
|
|
60359
60379
|
*/
|
|
60360
60380
|
async import(data) {
|
|
60361
|
-
this.clear();
|
|
60362
60381
|
try {
|
|
60363
60382
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60364
60383
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60366,6 +60385,7 @@ var CanvasManager = class {
|
|
|
60366
60385
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60367
60386
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60368
60387
|
let list = await Promise.all(promises);
|
|
60388
|
+
this.clear();
|
|
60369
60389
|
list.forEach((element, i3) => {
|
|
60370
60390
|
let alias = elementAliasesOrder[i3];
|
|
60371
60391
|
this.add(alias, element);
|
|
@@ -63694,9 +63714,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63694
63714
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63695
63715
|
};
|
|
63696
63716
|
canvas.removeAll();
|
|
63697
|
-
let container =
|
|
63698
|
-
container
|
|
63699
|
-
container.align = 0.5;
|
|
63717
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
63718
|
+
canvas.add("container", container);
|
|
63700
63719
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63701
63720
|
helmlok.anchor = 0.5;
|
|
63702
63721
|
helmlok.xAlign = 1;
|
|
@@ -64007,6 +64026,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64007
64026
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64008
64027
|
constructor(options, textureAlias) {
|
|
64009
64028
|
super(options);
|
|
64029
|
+
options = analizePositionsExtensionProps(options);
|
|
64010
64030
|
if (textureAlias) {
|
|
64011
64031
|
this.textureAlias = textureAlias;
|
|
64012
64032
|
}
|
|
@@ -64030,7 +64050,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64030
64050
|
this.setMemory(value);
|
|
64031
64051
|
}
|
|
64032
64052
|
async setMemory(value) {
|
|
64033
|
-
await
|
|
64053
|
+
await setMemoryImageSprite(this, value);
|
|
64034
64054
|
this.reloadPosition();
|
|
64035
64055
|
}
|
|
64036
64056
|
static from(source7, skipCache) {
|
|
@@ -64167,9 +64187,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64167
64187
|
}
|
|
64168
64188
|
};
|
|
64169
64189
|
async function setMemoryImageSprite(element, memory) {
|
|
64190
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64170
64191
|
return await setMemorySprite(element, memory, {
|
|
64171
64192
|
half: async () => {
|
|
64172
64193
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64194
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64173
64195
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64174
64196
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64175
64197
|
await element.load();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MoveTicker
|
|
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";
|
|
@@ -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";
|
|
@@ -57967,12 +57967,15 @@ var Container3 = class extends Container {
|
|
|
57967
57967
|
this.setMemory(value);
|
|
57968
57968
|
}
|
|
57969
57969
|
async setMemory(value) {
|
|
57970
|
+
await this.importChildren(value);
|
|
57971
|
+
return await setMemoryContainer(this, value);
|
|
57972
|
+
}
|
|
57973
|
+
async importChildren(value) {
|
|
57970
57974
|
for (let i3 = 0; i3 < value.elements.length; i3++) {
|
|
57971
57975
|
let child = value.elements[i3];
|
|
57972
57976
|
let element = await importCanvasElement(child);
|
|
57973
57977
|
this.addChild(element);
|
|
57974
57978
|
}
|
|
57975
|
-
return await setMemoryContainer(this, value);
|
|
57976
57979
|
}
|
|
57977
57980
|
};
|
|
57978
57981
|
function getMemoryContainer(element) {
|
|
@@ -58060,29 +58063,43 @@ function analizePositionsExtensionProps(props) {
|
|
|
58060
58063
|
if (!props) {
|
|
58061
58064
|
return props;
|
|
58062
58065
|
}
|
|
58063
|
-
if (props.align
|
|
58064
|
-
if (
|
|
58065
|
-
props.
|
|
58066
|
-
|
|
58067
|
-
|
|
58068
|
-
|
|
58069
|
-
props.
|
|
58066
|
+
if (typeof props.align !== "number") {
|
|
58067
|
+
if (props.xAlign != void 0) {
|
|
58068
|
+
if (props.align === void 0) {
|
|
58069
|
+
props.align = { x: props.xAlign };
|
|
58070
|
+
delete props.xAlign;
|
|
58071
|
+
} else {
|
|
58072
|
+
props.align.x = props.xAlign;
|
|
58073
|
+
delete props.xAlign;
|
|
58070
58074
|
}
|
|
58071
|
-
|
|
58072
|
-
|
|
58075
|
+
}
|
|
58076
|
+
if (props.yAlign != void 0) {
|
|
58077
|
+
if (props.align === void 0) {
|
|
58078
|
+
props.align = { y: props.yAlign };
|
|
58079
|
+
delete props.yAlign;
|
|
58080
|
+
} else {
|
|
58081
|
+
props.align.y = props.yAlign;
|
|
58082
|
+
delete props.yAlign;
|
|
58073
58083
|
}
|
|
58074
58084
|
}
|
|
58075
58085
|
}
|
|
58076
|
-
if (props.percentagePosition
|
|
58077
|
-
if (
|
|
58078
|
-
props.
|
|
58079
|
-
|
|
58080
|
-
|
|
58081
|
-
|
|
58082
|
-
props.
|
|
58086
|
+
if (typeof props.percentagePosition !== "number") {
|
|
58087
|
+
if (props.xPercentagePosition != void 0) {
|
|
58088
|
+
if (props.percentagePosition === void 0) {
|
|
58089
|
+
props.percentagePosition = { x: props.xPercentagePosition };
|
|
58090
|
+
delete props.xPercentagePosition;
|
|
58091
|
+
} else {
|
|
58092
|
+
props.percentagePosition.x = props.xPercentagePosition;
|
|
58093
|
+
delete props.xPercentagePosition;
|
|
58083
58094
|
}
|
|
58084
|
-
|
|
58085
|
-
|
|
58095
|
+
}
|
|
58096
|
+
if (props.yPercentagePosition != void 0) {
|
|
58097
|
+
if (props.percentagePosition === void 0) {
|
|
58098
|
+
props.percentagePosition = { y: props.yPercentagePosition };
|
|
58099
|
+
delete props.yPercentagePosition;
|
|
58100
|
+
} else {
|
|
58101
|
+
props.percentagePosition.y = props.yPercentagePosition;
|
|
58102
|
+
delete props.yPercentagePosition;
|
|
58086
58103
|
}
|
|
58087
58104
|
}
|
|
58088
58105
|
}
|
|
@@ -58102,10 +58119,10 @@ var ImageContainer = class extends Container3 {
|
|
|
58102
58119
|
if (options?.anchor !== void 0) {
|
|
58103
58120
|
this.anchor = options.anchor;
|
|
58104
58121
|
}
|
|
58105
|
-
if (options?.align !== void 0) {
|
|
58122
|
+
if (options && "align" in options && options?.align !== void 0) {
|
|
58106
58123
|
this.align = options.align;
|
|
58107
58124
|
}
|
|
58108
|
-
if (options?.percentagePosition !== void 0) {
|
|
58125
|
+
if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
|
|
58109
58126
|
this.percentagePosition = options.percentagePosition;
|
|
58110
58127
|
}
|
|
58111
58128
|
}
|
|
@@ -58123,7 +58140,8 @@ var ImageContainer = class extends Container3 {
|
|
|
58123
58140
|
this.setMemory(value);
|
|
58124
58141
|
}
|
|
58125
58142
|
async setMemory(value) {
|
|
58126
|
-
await
|
|
58143
|
+
await this.importChildren(value);
|
|
58144
|
+
await setMemoryImageContainer(this, value);
|
|
58127
58145
|
this.reloadAnchor();
|
|
58128
58146
|
this.reloadPosition();
|
|
58129
58147
|
}
|
|
@@ -58297,11 +58315,13 @@ var ImageContainer = class extends Container3 {
|
|
|
58297
58315
|
}
|
|
58298
58316
|
};
|
|
58299
58317
|
async function setMemoryImageContainer(element, memory, opstions) {
|
|
58318
|
+
memory = analizePositionsExtensionProps(memory);
|
|
58300
58319
|
setMemoryContainer(element, memory, {
|
|
58301
58320
|
...opstions,
|
|
58302
58321
|
end: async () => {
|
|
58303
58322
|
"anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
|
|
58304
58323
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
58324
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
58305
58325
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
58306
58326
|
await element.load();
|
|
58307
58327
|
}
|
|
@@ -60358,7 +60378,6 @@ var CanvasManager = class {
|
|
|
60358
60378
|
* @param data The object.
|
|
60359
60379
|
*/
|
|
60360
60380
|
async import(data) {
|
|
60361
|
-
this.clear();
|
|
60362
60381
|
try {
|
|
60363
60382
|
let tickersOnPause = data["tickersOnPause"] || {};
|
|
60364
60383
|
if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
|
|
@@ -60366,6 +60385,7 @@ var CanvasManager = class {
|
|
|
60366
60385
|
let elementAliasesOrder = data["elementAliasesOrder"];
|
|
60367
60386
|
let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
|
|
60368
60387
|
let list = await Promise.all(promises);
|
|
60388
|
+
this.clear();
|
|
60369
60389
|
list.forEach((element, i3) => {
|
|
60370
60390
|
let alias = elementAliasesOrder[i3];
|
|
60371
60391
|
this.add(alias, element);
|
|
@@ -63734,9 +63754,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
|
|
|
63734
63754
|
- ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
|
|
63735
63755
|
};
|
|
63736
63756
|
canvas.removeAll();
|
|
63737
|
-
let container =
|
|
63738
|
-
container
|
|
63739
|
-
container.align = 0.5;
|
|
63757
|
+
let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
|
|
63758
|
+
canvas.add("container", container);
|
|
63740
63759
|
let helmlok = addImage("helmlok", helmlokImage);
|
|
63741
63760
|
helmlok.anchor = 0.5;
|
|
63742
63761
|
helmlok.xAlign = 1;
|
|
@@ -64047,6 +64066,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64047
64066
|
pixivnId = CANVAS_IMAGE_ID;
|
|
64048
64067
|
constructor(options, textureAlias) {
|
|
64049
64068
|
super(options);
|
|
64069
|
+
options = analizePositionsExtensionProps(options);
|
|
64050
64070
|
if (textureAlias) {
|
|
64051
64071
|
this.textureAlias = textureAlias;
|
|
64052
64072
|
}
|
|
@@ -64070,7 +64090,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64070
64090
|
this.setMemory(value);
|
|
64071
64091
|
}
|
|
64072
64092
|
async setMemory(value) {
|
|
64073
|
-
await
|
|
64093
|
+
await setMemoryImageSprite(this, value);
|
|
64074
64094
|
this.reloadPosition();
|
|
64075
64095
|
}
|
|
64076
64096
|
static from(source7, skipCache) {
|
|
@@ -64207,9 +64227,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
|
|
|
64207
64227
|
}
|
|
64208
64228
|
};
|
|
64209
64229
|
async function setMemoryImageSprite(element, memory) {
|
|
64230
|
+
memory = analizePositionsExtensionProps(memory);
|
|
64210
64231
|
return await setMemorySprite(element, memory, {
|
|
64211
64232
|
half: async () => {
|
|
64212
64233
|
"align" in memory && memory.align !== void 0 && (element.align = memory.align);
|
|
64234
|
+
"percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
|
|
64213
64235
|
"imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
|
|
64214
64236
|
if ("loadIsStarted" in memory && memory.loadIsStarted) {
|
|
64215
64237
|
await element.load();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RotateTicker
|
|
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";
|