@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.
Files changed (186) hide show
  1. package/dist/{ContainerChild-HBivknFV.d.ts → ContainerChild-B5yD0BI8.d.ts} +3 -7
  2. package/dist/{ContainerChild-CEuXVx00.d.cts → ContainerChild-WzyxEjAc.d.cts} +3 -7
  3. package/dist/{chunk-SCOZ46ME.js → chunk-IRUKNG2Y.js} +32 -18
  4. package/dist/{chunk-JMXJKUTS.js → chunk-NB4Q3GFK.js} +19 -11
  5. package/dist/{chunk-AQPVWC55.js → chunk-TOG67Z7Q.js} +1 -1
  6. package/dist/classes/CharacterBaseModel.cjs +50 -28
  7. package/dist/classes/CharacterBaseModel.js +3 -3
  8. package/dist/classes/CharacterStoredClass.cjs +50 -28
  9. package/dist/classes/CharacterStoredClass.js +3 -3
  10. package/dist/classes/ChoiceMenuOption.cjs +50 -28
  11. package/dist/classes/ChoiceMenuOption.js +3 -3
  12. package/dist/classes/Sound.cjs +50 -28
  13. package/dist/classes/Sound.js +3 -3
  14. package/dist/classes/StoredClassModel.cjs +50 -28
  15. package/dist/classes/StoredClassModel.js +3 -3
  16. package/dist/classes/canvas/AdditionalPositions.cjs +32 -18
  17. package/dist/classes/canvas/AdditionalPositions.js +1 -1
  18. package/dist/classes/canvas/CanvasBaseItem.d.cts +2 -2
  19. package/dist/classes/canvas/CanvasBaseItem.d.ts +2 -2
  20. package/dist/classes/canvas/Container.cjs +50 -28
  21. package/dist/classes/canvas/Container.d.cts +3 -2
  22. package/dist/classes/canvas/Container.d.ts +3 -2
  23. package/dist/classes/canvas/Container.js +3 -3
  24. package/dist/classes/canvas/ImageContainer.cjs +67 -45
  25. package/dist/classes/canvas/ImageContainer.d.cts +1 -1
  26. package/dist/classes/canvas/ImageContainer.d.ts +1 -1
  27. package/dist/classes/canvas/ImageContainer.js +3 -3
  28. package/dist/classes/canvas/ImageSprite.cjs +50 -28
  29. package/dist/classes/canvas/ImageSprite.d.cts +1 -1
  30. package/dist/classes/canvas/ImageSprite.d.ts +1 -1
  31. package/dist/classes/canvas/ImageSprite.js +3 -3
  32. package/dist/classes/canvas/Sprite.cjs +50 -28
  33. package/dist/classes/canvas/Sprite.d.cts +2 -2
  34. package/dist/classes/canvas/Sprite.d.ts +2 -2
  35. package/dist/classes/canvas/Sprite.js +3 -3
  36. package/dist/classes/canvas/Text.cjs +50 -28
  37. package/dist/classes/canvas/Text.d.cts +2 -2
  38. package/dist/classes/canvas/Text.d.ts +2 -2
  39. package/dist/classes/canvas/Text.js +3 -3
  40. package/dist/classes/canvas/VideoSprite.cjs +50 -28
  41. package/dist/classes/canvas/VideoSprite.d.cts +2 -2
  42. package/dist/classes/canvas/VideoSprite.d.ts +2 -2
  43. package/dist/classes/canvas/VideoSprite.js +3 -3
  44. package/dist/classes/index.cjs +50 -28
  45. package/dist/classes/index.d.cts +2 -2
  46. package/dist/classes/index.d.ts +2 -2
  47. package/dist/classes/index.js +3 -3
  48. package/dist/classes/ticker/FadeAlphaTicker.cjs +50 -28
  49. package/dist/classes/ticker/FadeAlphaTicker.js +3 -3
  50. package/dist/classes/ticker/MoveTicker.cjs +50 -28
  51. package/dist/classes/ticker/MoveTicker.js +3 -3
  52. package/dist/classes/ticker/RotateTicker.cjs +50 -28
  53. package/dist/classes/ticker/RotateTicker.js +3 -3
  54. package/dist/classes/ticker/TickerBase.cjs +50 -28
  55. package/dist/classes/ticker/TickerBase.js +3 -3
  56. package/dist/classes/ticker/ZoomTicker.cjs +50 -28
  57. package/dist/classes/ticker/ZoomTicker.js +3 -3
  58. package/dist/classes/ticker/index.cjs +50 -28
  59. package/dist/classes/ticker/index.js +3 -3
  60. package/dist/constants.cjs +1 -1
  61. package/dist/constants.d.cts +1 -1
  62. package/dist/constants.d.ts +1 -1
  63. package/dist/constants.js +1 -1
  64. package/dist/decorators/canvas-element-decorator.cjs +50 -28
  65. package/dist/decorators/canvas-element-decorator.d.cts +2 -2
  66. package/dist/decorators/canvas-element-decorator.d.ts +2 -2
  67. package/dist/decorators/canvas-element-decorator.js +3 -3
  68. package/dist/decorators/event-decorator.d.cts +2 -2
  69. package/dist/decorators/event-decorator.d.ts +2 -2
  70. package/dist/decorators/index.cjs +50 -28
  71. package/dist/decorators/index.d.cts +2 -2
  72. package/dist/decorators/index.d.ts +2 -2
  73. package/dist/decorators/index.js +3 -3
  74. package/dist/decorators/label-decorator.cjs +50 -28
  75. package/dist/decorators/label-decorator.js +3 -3
  76. package/dist/functions/canvas/canvas-effect.cjs +50 -28
  77. package/dist/functions/canvas/canvas-effect.js +3 -3
  78. package/dist/functions/canvas/canvas-memory-utility.cjs +50 -28
  79. package/dist/functions/canvas/canvas-memory-utility.d.cts +2 -2
  80. package/dist/functions/canvas/canvas-memory-utility.d.ts +2 -2
  81. package/dist/functions/canvas/canvas-memory-utility.js +3 -3
  82. package/dist/functions/canvas/canvas-transition.cjs +50 -28
  83. package/dist/functions/canvas/canvas-transition.d.cts +2 -2
  84. package/dist/functions/canvas/canvas-transition.d.ts +2 -2
  85. package/dist/functions/canvas/canvas-transition.js +3 -3
  86. package/dist/functions/canvas/canvas-utility.cjs +50 -28
  87. package/dist/functions/canvas/canvas-utility.js +3 -3
  88. package/dist/functions/canvas/image-container-utility.cjs +50 -28
  89. package/dist/functions/canvas/image-container-utility.d.cts +2 -2
  90. package/dist/functions/canvas/image-container-utility.d.ts +2 -2
  91. package/dist/functions/canvas/image-container-utility.js +3 -3
  92. package/dist/functions/canvas/image-utility.cjs +50 -28
  93. package/dist/functions/canvas/image-utility.d.cts +2 -2
  94. package/dist/functions/canvas/image-utility.d.ts +2 -2
  95. package/dist/functions/canvas/image-utility.js +3 -3
  96. package/dist/functions/canvas/video-utility.cjs +50 -28
  97. package/dist/functions/canvas/video-utility.d.cts +2 -2
  98. package/dist/functions/canvas/video-utility.d.ts +2 -2
  99. package/dist/functions/canvas/video-utility.js +3 -3
  100. package/dist/functions/dialogue-utility.cjs +50 -28
  101. package/dist/functions/dialogue-utility.js +3 -3
  102. package/dist/functions/flags-utility.cjs +50 -28
  103. package/dist/functions/flags-utility.js +3 -3
  104. package/dist/functions/game-utility.cjs +50 -28
  105. package/dist/functions/game-utility.js +3 -3
  106. package/dist/functions/index.cjs +50 -28
  107. package/dist/functions/index.d.cts +2 -2
  108. package/dist/functions/index.d.ts +2 -2
  109. package/dist/functions/index.js +3 -3
  110. package/dist/functions/saves-utility.cjs +50 -28
  111. package/dist/functions/saves-utility.d.cts +2 -2
  112. package/dist/functions/saves-utility.d.ts +2 -2
  113. package/dist/functions/saves-utility.js +3 -3
  114. package/dist/functions/texture-utility.cjs +50 -28
  115. package/dist/functions/texture-utility.d.cts +2 -2
  116. package/dist/functions/texture-utility.d.ts +2 -2
  117. package/dist/functions/texture-utility.js +3 -3
  118. package/dist/index.cjs +67 -47
  119. package/dist/index.d.cts +1 -1
  120. package/dist/index.d.ts +1 -1
  121. package/dist/index.js +3 -3
  122. package/dist/interface/HistoryStep.d.cts +2 -2
  123. package/dist/interface/HistoryStep.d.ts +2 -2
  124. package/dist/interface/SaveData.d.cts +2 -2
  125. package/dist/interface/SaveData.d.ts +2 -2
  126. package/dist/interface/canvas/canvas-memory.d.cts +2 -2
  127. package/dist/interface/canvas/canvas-memory.d.ts +2 -2
  128. package/dist/interface/canvas/canvas-options.d.cts +1 -1
  129. package/dist/interface/canvas/canvas-options.d.ts +1 -1
  130. package/dist/interface/export/ExportedCanvas.d.cts +2 -2
  131. package/dist/interface/export/ExportedCanvas.d.ts +2 -2
  132. package/dist/interface/export/ExportedStep.d.cts +2 -2
  133. package/dist/interface/export/ExportedStep.d.ts +2 -2
  134. package/dist/interface/index.d.cts +1 -1
  135. package/dist/interface/index.d.ts +1 -1
  136. package/dist/labels/BaseCanvasElementTestLabel.cjs +50 -28
  137. package/dist/labels/BaseCanvasElementTestLabel.js +3 -3
  138. package/dist/labels/CanvasEventsTestLabel.cjs +50 -28
  139. package/dist/labels/CanvasEventsTestLabel.d.cts +2 -2
  140. package/dist/labels/CanvasEventsTestLabel.d.ts +2 -2
  141. package/dist/labels/CanvasEventsTestLabel.js +3 -3
  142. package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +67 -47
  143. package/dist/labels/CustomTickerCanvasElementTestLabel.js +3 -3
  144. package/dist/labels/ImagesAnimationsTestLabel.cjs +50 -28
  145. package/dist/labels/ImagesAnimationsTestLabel.js +3 -3
  146. package/dist/labels/InputTestLabel.cjs +50 -28
  147. package/dist/labels/InputTestLabel.js +3 -3
  148. package/dist/labels/MarkdownTest.cjs +50 -28
  149. package/dist/labels/MarkdownTest.js +3 -3
  150. package/dist/labels/SoundTestLabel.cjs +50 -28
  151. package/dist/labels/SoundTestLabel.js +3 -3
  152. package/dist/labels/StartLabel.cjs +50 -28
  153. package/dist/labels/StartLabel.js +3 -3
  154. package/dist/labels/StepLabelTest.cjs +50 -28
  155. package/dist/labels/StepLabelTest.js +3 -3
  156. package/dist/labels/VideoTestLabel.cjs +50 -28
  157. package/dist/labels/VideoTestLabel.js +3 -3
  158. package/dist/labels/index.cjs +50 -28
  159. package/dist/labels/index.js +3 -3
  160. package/dist/managers/CanvasManager.cjs +50 -28
  161. package/dist/managers/CanvasManager.d.cts +2 -2
  162. package/dist/managers/CanvasManager.d.ts +2 -2
  163. package/dist/managers/CanvasManager.js +3 -3
  164. package/dist/managers/CanvasManagerStatic.d.cts +2 -2
  165. package/dist/managers/CanvasManagerStatic.d.ts +2 -2
  166. package/dist/managers/NarrationManager.cjs +50 -28
  167. package/dist/managers/NarrationManager.d.cts +2 -2
  168. package/dist/managers/NarrationManager.d.ts +2 -2
  169. package/dist/managers/NarrationManager.js +3 -3
  170. package/dist/managers/NarrationManagerStatic.cjs +50 -28
  171. package/dist/managers/NarrationManagerStatic.d.cts +2 -2
  172. package/dist/managers/NarrationManagerStatic.d.ts +2 -2
  173. package/dist/managers/NarrationManagerStatic.js +3 -3
  174. package/dist/managers/SoundManager.cjs +50 -28
  175. package/dist/managers/SoundManager.js +3 -3
  176. package/dist/managers/StorageManager.cjs +50 -28
  177. package/dist/managers/StorageManager.js +3 -3
  178. package/dist/managers/index.cjs +50 -28
  179. package/dist/managers/index.d.cts +2 -2
  180. package/dist/managers/index.d.ts +2 -2
  181. package/dist/managers/index.js +3 -3
  182. package/dist/types/ContainerChild.d.cts +2 -2
  183. package/dist/types/ContainerChild.d.ts +2 -2
  184. package/dist/types/index.d.cts +2 -2
  185. package/dist/types/index.d.ts +2 -2
  186. package/package.json +1 -1
@@ -57723,7 +57723,7 @@ extensions.add(soundAsset);
57723
57723
  var sound = setInstance(new SoundLibrary());
57724
57724
 
57725
57725
  // package.json
57726
- var version = "0.9.6";
57726
+ var version = "0.9.7";
57727
57727
 
57728
57728
  // src/constants.ts
57729
57729
  var Repeat = "repeat";
@@ -58624,29 +58624,43 @@ function analizePositionsExtensionProps(props) {
58624
58624
  if (!props) {
58625
58625
  return props;
58626
58626
  }
58627
- if (props.align != void 0) {
58628
- if (typeof props.align === "number") {
58629
- props.xAlign = props.align;
58630
- props.yAlign = props.align;
58631
- } else {
58632
- if (props.align.x != void 0) {
58633
- props.xAlign = props.align.x;
58627
+ if (typeof props.align !== "number") {
58628
+ if (props.xAlign != void 0) {
58629
+ if (props.align === void 0) {
58630
+ props.align = { x: props.xAlign };
58631
+ delete props.xAlign;
58632
+ } else {
58633
+ props.align.x = props.xAlign;
58634
+ delete props.xAlign;
58634
58635
  }
58635
- if (props.align.y != void 0) {
58636
- props.yAlign = props.align.y;
58636
+ }
58637
+ if (props.yAlign != void 0) {
58638
+ if (props.align === void 0) {
58639
+ props.align = { y: props.yAlign };
58640
+ delete props.yAlign;
58641
+ } else {
58642
+ props.align.y = props.yAlign;
58643
+ delete props.yAlign;
58637
58644
  }
58638
58645
  }
58639
58646
  }
58640
- if (props.percentagePosition != void 0) {
58641
- if (typeof props.percentagePosition === "number") {
58642
- props.xPercentagePosition = props.percentagePosition;
58643
- props.yPercentagePosition = props.percentagePosition;
58644
- } else {
58645
- if (props.percentagePosition.x != void 0) {
58646
- props.xPercentagePosition = props.percentagePosition.x;
58647
+ if (typeof props.percentagePosition !== "number") {
58648
+ if (props.xPercentagePosition != void 0) {
58649
+ if (props.percentagePosition === void 0) {
58650
+ props.percentagePosition = { x: props.xPercentagePosition };
58651
+ delete props.xPercentagePosition;
58652
+ } else {
58653
+ props.percentagePosition.x = props.xPercentagePosition;
58654
+ delete props.xPercentagePosition;
58647
58655
  }
58648
- if (props.percentagePosition.y != void 0) {
58649
- props.yPercentagePosition = props.percentagePosition.y;
58656
+ }
58657
+ if (props.yPercentagePosition != void 0) {
58658
+ if (props.percentagePosition === void 0) {
58659
+ props.percentagePosition = { y: props.yPercentagePosition };
58660
+ delete props.yPercentagePosition;
58661
+ } else {
58662
+ props.percentagePosition.y = props.yPercentagePosition;
58663
+ delete props.yPercentagePosition;
58650
58664
  }
58651
58665
  }
58652
58666
  }
@@ -58688,12 +58702,15 @@ var Container2 = class extends Container {
58688
58702
  this.setMemory(value);
58689
58703
  }
58690
58704
  async setMemory(value) {
58705
+ await this.importChildren(value);
58706
+ return await setMemoryContainer(this, value);
58707
+ }
58708
+ async importChildren(value) {
58691
58709
  for (let i3 = 0; i3 < value.elements.length; i3++) {
58692
58710
  let child = value.elements[i3];
58693
58711
  let element = await importCanvasElement(child);
58694
58712
  this.addChild(element);
58695
58713
  }
58696
- return await setMemoryContainer(this, value);
58697
58714
  }
58698
58715
  };
58699
58716
  function getMemoryContainer(element) {
@@ -58785,10 +58802,10 @@ var ImageContainer = class extends Container2 {
58785
58802
  if (options?.anchor !== void 0) {
58786
58803
  this.anchor = options.anchor;
58787
58804
  }
58788
- if (options?.align !== void 0) {
58805
+ if (options && "align" in options && options?.align !== void 0) {
58789
58806
  this.align = options.align;
58790
58807
  }
58791
- if (options?.percentagePosition !== void 0) {
58808
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
58792
58809
  this.percentagePosition = options.percentagePosition;
58793
58810
  }
58794
58811
  }
@@ -58806,7 +58823,8 @@ var ImageContainer = class extends Container2 {
58806
58823
  this.setMemory(value);
58807
58824
  }
58808
58825
  async setMemory(value) {
58809
- await super.setMemory(value);
58826
+ await this.importChildren(value);
58827
+ await setMemoryImageContainer(this, value);
58810
58828
  this.reloadAnchor();
58811
58829
  this.reloadPosition();
58812
58830
  }
@@ -58980,11 +58998,13 @@ var ImageContainer = class extends Container2 {
58980
58998
  }
58981
58999
  };
58982
59000
  async function setMemoryImageContainer(element, memory, opstions) {
59001
+ memory = analizePositionsExtensionProps(memory);
58983
59002
  setMemoryContainer(element, memory, {
58984
59003
  ...opstions,
58985
59004
  end: async () => {
58986
59005
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
58987
59006
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
59007
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
58988
59008
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
58989
59009
  await element.load();
58990
59010
  }
@@ -60349,9 +60369,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
60349
60369
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
60350
60370
  };
60351
60371
  canvas.removeAll();
60352
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
60353
- container.anchor = 0.5;
60354
- container.align = 0.5;
60372
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
60373
+ canvas.add("container", container);
60355
60374
  let helmlok = addImage("helmlok", helmlokImage);
60356
60375
  helmlok.anchor = 0.5;
60357
60376
  helmlok.xAlign = 1;
@@ -60811,6 +60830,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60811
60830
  pixivnId = CANVAS_IMAGE_ID;
60812
60831
  constructor(options, textureAlias) {
60813
60832
  super(options);
60833
+ options = analizePositionsExtensionProps(options);
60814
60834
  if (textureAlias) {
60815
60835
  this.textureAlias = textureAlias;
60816
60836
  }
@@ -60834,7 +60854,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60834
60854
  this.setMemory(value);
60835
60855
  }
60836
60856
  async setMemory(value) {
60837
- await super.setMemory(value);
60857
+ await setMemoryImageSprite(this, value);
60838
60858
  this.reloadPosition();
60839
60859
  }
60840
60860
  static from(source7, skipCache) {
@@ -60971,9 +60991,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60971
60991
  }
60972
60992
  };
60973
60993
  async function setMemoryImageSprite(element, memory) {
60994
+ memory = analizePositionsExtensionProps(memory);
60974
60995
  return await setMemorySprite(element, memory, {
60975
60996
  half: async () => {
60976
60997
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
60998
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
60977
60999
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
60978
61000
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
60979
61001
  await element.load();
@@ -62648,7 +62670,6 @@ var CanvasManager = class {
62648
62670
  * @param data The object.
62649
62671
  */
62650
62672
  async import(data) {
62651
- this.clear();
62652
62673
  try {
62653
62674
  let tickersOnPause = data["tickersOnPause"] || {};
62654
62675
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -62656,6 +62677,7 @@ var CanvasManager = class {
62656
62677
  let elementAliasesOrder = data["elementAliasesOrder"];
62657
62678
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
62658
62679
  let list = await Promise.all(promises);
62680
+ this.clear();
62659
62681
  list.forEach((element, i3) => {
62660
62682
  let alias = elementAliasesOrder[i3];
62661
62683
  this.add(alias, element);
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  clearAllGameDatas
3
- } from "../chunk-JMXJKUTS.js";
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-SCOZ46ME.js";
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-AQPVWC55.js";
24
+ import "../chunk-TOG67Z7Q.js";
25
25
  import "../chunk-WS3FY4Q6.js";
26
26
  import "../chunk-Z3NBKYVU.js";
27
27
  import "../chunk-SAUNZQHZ.js";
@@ -57757,7 +57757,7 @@ extensions.add(soundAsset);
57757
57757
  var sound = setInstance(new SoundLibrary());
57758
57758
 
57759
57759
  // package.json
57760
- var version = "0.9.6";
57760
+ var version = "0.9.7";
57761
57761
 
57762
57762
  // src/constants.ts
57763
57763
  var Repeat = "repeat";
@@ -57930,12 +57930,15 @@ var Container2 = class extends Container {
57930
57930
  this.setMemory(value);
57931
57931
  }
57932
57932
  async setMemory(value) {
57933
+ await this.importChildren(value);
57934
+ return await setMemoryContainer(this, value);
57935
+ }
57936
+ async importChildren(value) {
57933
57937
  for (let i3 = 0; i3 < value.elements.length; i3++) {
57934
57938
  let child = value.elements[i3];
57935
57939
  let element = await importCanvasElement(child);
57936
57940
  this.addChild(element);
57937
57941
  }
57938
- return await setMemoryContainer(this, value);
57939
57942
  }
57940
57943
  };
57941
57944
  function getMemoryContainer(element) {
@@ -58023,29 +58026,43 @@ function analizePositionsExtensionProps(props) {
58023
58026
  if (!props) {
58024
58027
  return props;
58025
58028
  }
58026
- if (props.align != void 0) {
58027
- if (typeof props.align === "number") {
58028
- props.xAlign = props.align;
58029
- props.yAlign = props.align;
58030
- } else {
58031
- if (props.align.x != void 0) {
58032
- props.xAlign = props.align.x;
58029
+ if (typeof props.align !== "number") {
58030
+ if (props.xAlign != void 0) {
58031
+ if (props.align === void 0) {
58032
+ props.align = { x: props.xAlign };
58033
+ delete props.xAlign;
58034
+ } else {
58035
+ props.align.x = props.xAlign;
58036
+ delete props.xAlign;
58033
58037
  }
58034
- if (props.align.y != void 0) {
58035
- props.yAlign = props.align.y;
58038
+ }
58039
+ if (props.yAlign != void 0) {
58040
+ if (props.align === void 0) {
58041
+ props.align = { y: props.yAlign };
58042
+ delete props.yAlign;
58043
+ } else {
58044
+ props.align.y = props.yAlign;
58045
+ delete props.yAlign;
58036
58046
  }
58037
58047
  }
58038
58048
  }
58039
- if (props.percentagePosition != void 0) {
58040
- if (typeof props.percentagePosition === "number") {
58041
- props.xPercentagePosition = props.percentagePosition;
58042
- props.yPercentagePosition = props.percentagePosition;
58043
- } else {
58044
- if (props.percentagePosition.x != void 0) {
58045
- props.xPercentagePosition = props.percentagePosition.x;
58049
+ if (typeof props.percentagePosition !== "number") {
58050
+ if (props.xPercentagePosition != void 0) {
58051
+ if (props.percentagePosition === void 0) {
58052
+ props.percentagePosition = { x: props.xPercentagePosition };
58053
+ delete props.xPercentagePosition;
58054
+ } else {
58055
+ props.percentagePosition.x = props.xPercentagePosition;
58056
+ delete props.xPercentagePosition;
58046
58057
  }
58047
- if (props.percentagePosition.y != void 0) {
58048
- props.yPercentagePosition = props.percentagePosition.y;
58058
+ }
58059
+ if (props.yPercentagePosition != void 0) {
58060
+ if (props.percentagePosition === void 0) {
58061
+ props.percentagePosition = { y: props.yPercentagePosition };
58062
+ delete props.yPercentagePosition;
58063
+ } else {
58064
+ props.percentagePosition.y = props.yPercentagePosition;
58065
+ delete props.yPercentagePosition;
58049
58066
  }
58050
58067
  }
58051
58068
  }
@@ -58065,10 +58082,10 @@ var ImageContainer = class extends Container2 {
58065
58082
  if (options?.anchor !== void 0) {
58066
58083
  this.anchor = options.anchor;
58067
58084
  }
58068
- if (options?.align !== void 0) {
58085
+ if (options && "align" in options && options?.align !== void 0) {
58069
58086
  this.align = options.align;
58070
58087
  }
58071
- if (options?.percentagePosition !== void 0) {
58088
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
58072
58089
  this.percentagePosition = options.percentagePosition;
58073
58090
  }
58074
58091
  }
@@ -58086,7 +58103,8 @@ var ImageContainer = class extends Container2 {
58086
58103
  this.setMemory(value);
58087
58104
  }
58088
58105
  async setMemory(value) {
58089
- await super.setMemory(value);
58106
+ await this.importChildren(value);
58107
+ await setMemoryImageContainer(this, value);
58090
58108
  this.reloadAnchor();
58091
58109
  this.reloadPosition();
58092
58110
  }
@@ -58260,11 +58278,13 @@ var ImageContainer = class extends Container2 {
58260
58278
  }
58261
58279
  };
58262
58280
  async function setMemoryImageContainer(element, memory, opstions) {
58281
+ memory = analizePositionsExtensionProps(memory);
58263
58282
  setMemoryContainer(element, memory, {
58264
58283
  ...opstions,
58265
58284
  end: async () => {
58266
58285
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
58267
58286
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
58287
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
58268
58288
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
58269
58289
  await element.load();
58270
58290
  }
@@ -59806,7 +59826,6 @@ var CanvasManager = class {
59806
59826
  * @param data The object.
59807
59827
  */
59808
59828
  async import(data) {
59809
- this.clear();
59810
59829
  try {
59811
59830
  let tickersOnPause = data["tickersOnPause"] || {};
59812
59831
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -59814,6 +59833,7 @@ var CanvasManager = class {
59814
59833
  let elementAliasesOrder = data["elementAliasesOrder"];
59815
59834
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
59816
59835
  let list = await Promise.all(promises);
59836
+ this.clear();
59817
59837
  list.forEach((element, i3) => {
59818
59838
  let alias = elementAliasesOrder[i3];
59819
59839
  this.add(alias, element);
@@ -63356,9 +63376,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
63356
63376
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
63357
63377
  };
63358
63378
  canvas.removeAll();
63359
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
63360
- container.anchor = 0.5;
63361
- container.align = 0.5;
63379
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
63380
+ canvas.add("container", container);
63362
63381
  let helmlok = addImage("helmlok", helmlokImage);
63363
63382
  helmlok.anchor = 0.5;
63364
63383
  helmlok.xAlign = 1;
@@ -63669,6 +63688,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
63669
63688
  pixivnId = CANVAS_IMAGE_ID;
63670
63689
  constructor(options, textureAlias) {
63671
63690
  super(options);
63691
+ options = analizePositionsExtensionProps(options);
63672
63692
  if (textureAlias) {
63673
63693
  this.textureAlias = textureAlias;
63674
63694
  }
@@ -63692,7 +63712,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
63692
63712
  this.setMemory(value);
63693
63713
  }
63694
63714
  async setMemory(value) {
63695
- await super.setMemory(value);
63715
+ await setMemoryImageSprite(this, value);
63696
63716
  this.reloadPosition();
63697
63717
  }
63698
63718
  static from(source7, skipCache) {
@@ -63829,9 +63849,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
63829
63849
  }
63830
63850
  };
63831
63851
  async function setMemoryImageSprite(element, memory) {
63852
+ memory = analizePositionsExtensionProps(memory);
63832
63853
  return await setMemorySprite(element, memory, {
63833
63854
  half: async () => {
63834
63855
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
63856
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
63835
63857
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
63836
63858
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
63837
63859
  await element.load();
@@ -13,9 +13,9 @@ export { getTexture } from './texture-utility.cjs';
13
13
  import 'pixi.js';
14
14
  import '../interface/canvas/effect-props.cjs';
15
15
  import '../interface/TickerProgrationType.cjs';
16
- import '../ContainerChild-CEuXVx00.cjs';
17
- import '../interface/canvas/TextureMemory.cjs';
16
+ import '../ContainerChild-WzyxEjAc.cjs';
18
17
  import '../classes/canvas/AdditionalPositions.cjs';
18
+ import '../interface/canvas/TextureMemory.cjs';
19
19
  import '../classes/canvas/AnchorExtension.cjs';
20
20
  import '../types/CanvasEventNamesType.cjs';
21
21
  import '../classes/CanvasEvent.cjs';
@@ -13,9 +13,9 @@ export { getTexture } from './texture-utility.js';
13
13
  import 'pixi.js';
14
14
  import '../interface/canvas/effect-props.js';
15
15
  import '../interface/TickerProgrationType.js';
16
- import '../ContainerChild-HBivknFV.js';
17
- import '../interface/canvas/TextureMemory.js';
16
+ import '../ContainerChild-B5yD0BI8.js';
18
17
  import '../classes/canvas/AdditionalPositions.js';
18
+ import '../interface/canvas/TextureMemory.js';
19
19
  import '../classes/canvas/AnchorExtension.js';
20
20
  import '../types/CanvasEventNamesType.js';
21
21
  import '../classes/CanvasEvent.js';
@@ -33,11 +33,11 @@ import {
33
33
  showWithFadeTransition,
34
34
  zoomIn,
35
35
  zoomOut
36
- } from "../chunk-JMXJKUTS.js";
36
+ } from "../chunk-NB4Q3GFK.js";
37
37
  import "../chunk-OMPJ74CO.js";
38
38
  import "../chunk-2JGQWY5I.js";
39
39
  import "../chunk-2BUPSB7O.js";
40
- import "../chunk-SCOZ46ME.js";
40
+ import "../chunk-IRUKNG2Y.js";
41
41
  import "../chunk-6GJXIPNB.js";
42
42
  import "../chunk-I6TNJEE3.js";
43
43
  import "../chunk-DPUSONJ3.js";
@@ -56,7 +56,7 @@ import {
56
56
  } from "../chunk-PIYIZHZL.js";
57
57
  import "../chunk-B7XQM2BB.js";
58
58
  import "../chunk-LEMOIFSV.js";
59
- import "../chunk-AQPVWC55.js";
59
+ import "../chunk-TOG67Z7Q.js";
60
60
  import "../chunk-WS3FY4Q6.js";
61
61
  import "../chunk-Z3NBKYVU.js";
62
62
  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.6";
57724
+ var version = "0.9.7";
57725
57725
 
57726
57726
  // src/constants.ts
57727
57727
  var Repeat = "repeat";
@@ -58628,29 +58628,43 @@ function analizePositionsExtensionProps(props) {
58628
58628
  if (!props) {
58629
58629
  return props;
58630
58630
  }
58631
- if (props.align != void 0) {
58632
- if (typeof props.align === "number") {
58633
- props.xAlign = props.align;
58634
- props.yAlign = props.align;
58635
- } else {
58636
- if (props.align.x != void 0) {
58637
- props.xAlign = props.align.x;
58631
+ if (typeof props.align !== "number") {
58632
+ if (props.xAlign != void 0) {
58633
+ if (props.align === void 0) {
58634
+ props.align = { x: props.xAlign };
58635
+ delete props.xAlign;
58636
+ } else {
58637
+ props.align.x = props.xAlign;
58638
+ delete props.xAlign;
58638
58639
  }
58639
- if (props.align.y != void 0) {
58640
- props.yAlign = props.align.y;
58640
+ }
58641
+ if (props.yAlign != void 0) {
58642
+ if (props.align === void 0) {
58643
+ props.align = { y: props.yAlign };
58644
+ delete props.yAlign;
58645
+ } else {
58646
+ props.align.y = props.yAlign;
58647
+ delete props.yAlign;
58641
58648
  }
58642
58649
  }
58643
58650
  }
58644
- if (props.percentagePosition != void 0) {
58645
- if (typeof props.percentagePosition === "number") {
58646
- props.xPercentagePosition = props.percentagePosition;
58647
- props.yPercentagePosition = props.percentagePosition;
58648
- } else {
58649
- if (props.percentagePosition.x != void 0) {
58650
- props.xPercentagePosition = props.percentagePosition.x;
58651
+ if (typeof props.percentagePosition !== "number") {
58652
+ if (props.xPercentagePosition != void 0) {
58653
+ if (props.percentagePosition === void 0) {
58654
+ props.percentagePosition = { x: props.xPercentagePosition };
58655
+ delete props.xPercentagePosition;
58656
+ } else {
58657
+ props.percentagePosition.x = props.xPercentagePosition;
58658
+ delete props.xPercentagePosition;
58651
58659
  }
58652
- if (props.percentagePosition.y != void 0) {
58653
- props.yPercentagePosition = props.percentagePosition.y;
58660
+ }
58661
+ if (props.yPercentagePosition != void 0) {
58662
+ if (props.percentagePosition === void 0) {
58663
+ props.percentagePosition = { y: props.yPercentagePosition };
58664
+ delete props.yPercentagePosition;
58665
+ } else {
58666
+ props.percentagePosition.y = props.yPercentagePosition;
58667
+ delete props.yPercentagePosition;
58654
58668
  }
58655
58669
  }
58656
58670
  }
@@ -58692,12 +58706,15 @@ var Container2 = class extends Container {
58692
58706
  this.setMemory(value);
58693
58707
  }
58694
58708
  async setMemory(value) {
58709
+ await this.importChildren(value);
58710
+ return await setMemoryContainer(this, value);
58711
+ }
58712
+ async importChildren(value) {
58695
58713
  for (let i3 = 0; i3 < value.elements.length; i3++) {
58696
58714
  let child = value.elements[i3];
58697
58715
  let element = await importCanvasElement(child);
58698
58716
  this.addChild(element);
58699
58717
  }
58700
- return await setMemoryContainer(this, value);
58701
58718
  }
58702
58719
  };
58703
58720
  function getMemoryContainer(element) {
@@ -58789,10 +58806,10 @@ var ImageContainer = class extends Container2 {
58789
58806
  if (options?.anchor !== void 0) {
58790
58807
  this.anchor = options.anchor;
58791
58808
  }
58792
- if (options?.align !== void 0) {
58809
+ if (options && "align" in options && options?.align !== void 0) {
58793
58810
  this.align = options.align;
58794
58811
  }
58795
- if (options?.percentagePosition !== void 0) {
58812
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
58796
58813
  this.percentagePosition = options.percentagePosition;
58797
58814
  }
58798
58815
  }
@@ -58810,7 +58827,8 @@ var ImageContainer = class extends Container2 {
58810
58827
  this.setMemory(value);
58811
58828
  }
58812
58829
  async setMemory(value) {
58813
- await super.setMemory(value);
58830
+ await this.importChildren(value);
58831
+ await setMemoryImageContainer(this, value);
58814
58832
  this.reloadAnchor();
58815
58833
  this.reloadPosition();
58816
58834
  }
@@ -58984,11 +59002,13 @@ var ImageContainer = class extends Container2 {
58984
59002
  }
58985
59003
  };
58986
59004
  async function setMemoryImageContainer(element, memory, opstions) {
59005
+ memory = analizePositionsExtensionProps(memory);
58987
59006
  setMemoryContainer(element, memory, {
58988
59007
  ...opstions,
58989
59008
  end: async () => {
58990
59009
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
58991
59010
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
59011
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
58992
59012
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
58993
59013
  await element.load();
58994
59014
  }
@@ -60344,9 +60364,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
60344
60364
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
60345
60365
  };
60346
60366
  canvas.removeAll();
60347
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
60348
- container.anchor = 0.5;
60349
- container.align = 0.5;
60367
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
60368
+ canvas.add("container", container);
60350
60369
  let helmlok = addImage("helmlok", helmlokImage);
60351
60370
  helmlok.anchor = 0.5;
60352
60371
  helmlok.xAlign = 1;
@@ -60806,6 +60825,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60806
60825
  pixivnId = CANVAS_IMAGE_ID;
60807
60826
  constructor(options, textureAlias) {
60808
60827
  super(options);
60828
+ options = analizePositionsExtensionProps(options);
60809
60829
  if (textureAlias) {
60810
60830
  this.textureAlias = textureAlias;
60811
60831
  }
@@ -60829,7 +60849,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60829
60849
  this.setMemory(value);
60830
60850
  }
60831
60851
  async setMemory(value) {
60832
- await super.setMemory(value);
60852
+ await setMemoryImageSprite(this, value);
60833
60853
  this.reloadPosition();
60834
60854
  }
60835
60855
  static from(source7, skipCache) {
@@ -60966,9 +60986,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60966
60986
  }
60967
60987
  };
60968
60988
  async function setMemoryImageSprite(element, memory) {
60989
+ memory = analizePositionsExtensionProps(memory);
60969
60990
  return await setMemorySprite(element, memory, {
60970
60991
  half: async () => {
60971
60992
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
60993
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
60972
60994
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
60973
60995
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
60974
60996
  await element.load();
@@ -62643,7 +62665,6 @@ var CanvasManager = class {
62643
62665
  * @param data The object.
62644
62666
  */
62645
62667
  async import(data) {
62646
- this.clear();
62647
62668
  try {
62648
62669
  let tickersOnPause = data["tickersOnPause"] || {};
62649
62670
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -62651,6 +62672,7 @@ var CanvasManager = class {
62651
62672
  let elementAliasesOrder = data["elementAliasesOrder"];
62652
62673
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
62653
62674
  let list = await Promise.all(promises);
62675
+ this.clear();
62654
62676
  list.forEach((element, i3) => {
62655
62677
  let alias = elementAliasesOrder[i3];
62656
62678
  this.add(alias, element);
@@ -1,10 +1,10 @@
1
1
  import SaveData from '../interface/SaveData.cjs';
2
2
  import '../interface/export/ExportedCanvas.cjs';
3
3
  import '../types/PauseTickerType.cjs';
4
- import '../ContainerChild-CEuXVx00.cjs';
4
+ import '../ContainerChild-WzyxEjAc.cjs';
5
5
  import 'pixi.js';
6
- import '../interface/canvas/TextureMemory.cjs';
7
6
  import '../classes/canvas/AdditionalPositions.cjs';
7
+ import '../interface/canvas/TextureMemory.cjs';
8
8
  import '../classes/canvas/AnchorExtension.cjs';
9
9
  import '../types/CanvasEventNamesType.cjs';
10
10
  import '../classes/CanvasEvent.cjs';
@@ -1,10 +1,10 @@
1
1
  import SaveData from '../interface/SaveData.js';
2
2
  import '../interface/export/ExportedCanvas.js';
3
3
  import '../types/PauseTickerType.js';
4
- import '../ContainerChild-HBivknFV.js';
4
+ import '../ContainerChild-B5yD0BI8.js';
5
5
  import 'pixi.js';
6
- import '../interface/canvas/TextureMemory.js';
7
6
  import '../classes/canvas/AdditionalPositions.js';
7
+ import '../interface/canvas/TextureMemory.js';
8
8
  import '../classes/canvas/AnchorExtension.js';
9
9
  import '../types/CanvasEventNamesType.js';
10
10
  import '../classes/CanvasEvent.js';
@@ -4,11 +4,11 @@ import {
4
4
  jsonToSaveData,
5
5
  loadSaveData,
6
6
  loadSaveJson
7
- } from "../chunk-JMXJKUTS.js";
7
+ } from "../chunk-NB4Q3GFK.js";
8
8
  import "../chunk-OMPJ74CO.js";
9
9
  import "../chunk-2JGQWY5I.js";
10
10
  import "../chunk-2BUPSB7O.js";
11
- import "../chunk-SCOZ46ME.js";
11
+ import "../chunk-IRUKNG2Y.js";
12
12
  import "../chunk-6GJXIPNB.js";
13
13
  import "../chunk-I6TNJEE3.js";
14
14
  import "../chunk-DPUSONJ3.js";
@@ -25,7 +25,7 @@ import "../chunk-ZBUW3MBH.js";
25
25
  import "../chunk-PIYIZHZL.js";
26
26
  import "../chunk-B7XQM2BB.js";
27
27
  import "../chunk-LEMOIFSV.js";
28
- import "../chunk-AQPVWC55.js";
28
+ import "../chunk-TOG67Z7Q.js";
29
29
  import "../chunk-WS3FY4Q6.js";
30
30
  import "../chunk-Z3NBKYVU.js";
31
31
  import "../chunk-SAUNZQHZ.js";