@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
@@ -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";
@@ -58436,29 +58436,43 @@ function analizePositionsExtensionProps(props) {
58436
58436
  if (!props) {
58437
58437
  return props;
58438
58438
  }
58439
- if (props.align != void 0) {
58440
- if (typeof props.align === "number") {
58441
- props.xAlign = props.align;
58442
- props.yAlign = props.align;
58443
- } else {
58444
- if (props.align.x != void 0) {
58445
- props.xAlign = props.align.x;
58439
+ if (typeof props.align !== "number") {
58440
+ if (props.xAlign != void 0) {
58441
+ if (props.align === void 0) {
58442
+ props.align = { x: props.xAlign };
58443
+ delete props.xAlign;
58444
+ } else {
58445
+ props.align.x = props.xAlign;
58446
+ delete props.xAlign;
58446
58447
  }
58447
- if (props.align.y != void 0) {
58448
- props.yAlign = props.align.y;
58448
+ }
58449
+ if (props.yAlign != void 0) {
58450
+ if (props.align === void 0) {
58451
+ props.align = { y: props.yAlign };
58452
+ delete props.yAlign;
58453
+ } else {
58454
+ props.align.y = props.yAlign;
58455
+ delete props.yAlign;
58449
58456
  }
58450
58457
  }
58451
58458
  }
58452
- if (props.percentagePosition != void 0) {
58453
- if (typeof props.percentagePosition === "number") {
58454
- props.xPercentagePosition = props.percentagePosition;
58455
- props.yPercentagePosition = props.percentagePosition;
58456
- } else {
58457
- if (props.percentagePosition.x != void 0) {
58458
- props.xPercentagePosition = props.percentagePosition.x;
58459
+ if (typeof props.percentagePosition !== "number") {
58460
+ if (props.xPercentagePosition != void 0) {
58461
+ if (props.percentagePosition === void 0) {
58462
+ props.percentagePosition = { x: props.xPercentagePosition };
58463
+ delete props.xPercentagePosition;
58464
+ } else {
58465
+ props.percentagePosition.x = props.xPercentagePosition;
58466
+ delete props.xPercentagePosition;
58459
58467
  }
58460
- if (props.percentagePosition.y != void 0) {
58461
- props.yPercentagePosition = props.percentagePosition.y;
58468
+ }
58469
+ if (props.yPercentagePosition != void 0) {
58470
+ if (props.percentagePosition === void 0) {
58471
+ props.percentagePosition = { y: props.yPercentagePosition };
58472
+ delete props.yPercentagePosition;
58473
+ } else {
58474
+ props.percentagePosition.y = props.yPercentagePosition;
58475
+ delete props.yPercentagePosition;
58462
58476
  }
58463
58477
  }
58464
58478
  }
@@ -58500,12 +58514,15 @@ var Container2 = class extends Container {
58500
58514
  this.setMemory(value);
58501
58515
  }
58502
58516
  async setMemory(value) {
58517
+ await this.importChildren(value);
58518
+ return await setMemoryContainer(this, value);
58519
+ }
58520
+ async importChildren(value) {
58503
58521
  for (let i3 = 0; i3 < value.elements.length; i3++) {
58504
58522
  let child = value.elements[i3];
58505
58523
  let element = await importCanvasElement(child);
58506
58524
  this.addChild(element);
58507
58525
  }
58508
- return await setMemoryContainer(this, value);
58509
58526
  }
58510
58527
  };
58511
58528
  function getMemoryContainer(element) {
@@ -58597,10 +58614,10 @@ var ImageContainer = class extends Container2 {
58597
58614
  if (options?.anchor !== void 0) {
58598
58615
  this.anchor = options.anchor;
58599
58616
  }
58600
- if (options?.align !== void 0) {
58617
+ if (options && "align" in options && options?.align !== void 0) {
58601
58618
  this.align = options.align;
58602
58619
  }
58603
- if (options?.percentagePosition !== void 0) {
58620
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
58604
58621
  this.percentagePosition = options.percentagePosition;
58605
58622
  }
58606
58623
  }
@@ -58618,7 +58635,8 @@ var ImageContainer = class extends Container2 {
58618
58635
  this.setMemory(value);
58619
58636
  }
58620
58637
  async setMemory(value) {
58621
- await super.setMemory(value);
58638
+ await this.importChildren(value);
58639
+ await setMemoryImageContainer(this, value);
58622
58640
  this.reloadAnchor();
58623
58641
  this.reloadPosition();
58624
58642
  }
@@ -58792,11 +58810,13 @@ var ImageContainer = class extends Container2 {
58792
58810
  }
58793
58811
  };
58794
58812
  async function setMemoryImageContainer(element, memory, opstions) {
58813
+ memory = analizePositionsExtensionProps(memory);
58795
58814
  setMemoryContainer(element, memory, {
58796
58815
  ...opstions,
58797
58816
  end: async () => {
58798
58817
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
58799
58818
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
58819
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
58800
58820
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
58801
58821
  await element.load();
58802
58822
  }
@@ -62695,9 +62715,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
62695
62715
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
62696
62716
  };
62697
62717
  canvas.removeAll();
62698
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
62699
- container.anchor = 0.5;
62700
- container.align = 0.5;
62718
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
62719
+ canvas.add("container", container);
62701
62720
  let helmlok = addImage("helmlok", helmlokImage);
62702
62721
  helmlok.anchor = 0.5;
62703
62722
  helmlok.xAlign = 1;
@@ -63154,6 +63173,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
63154
63173
  pixivnId = CANVAS_IMAGE_ID;
63155
63174
  constructor(options, textureAlias) {
63156
63175
  super(options);
63176
+ options = analizePositionsExtensionProps(options);
63157
63177
  if (textureAlias) {
63158
63178
  this.textureAlias = textureAlias;
63159
63179
  }
@@ -63177,7 +63197,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
63177
63197
  this.setMemory(value);
63178
63198
  }
63179
63199
  async setMemory(value) {
63180
- await super.setMemory(value);
63200
+ await setMemoryImageSprite(this, value);
63181
63201
  this.reloadPosition();
63182
63202
  }
63183
63203
  static from(source7, skipCache) {
@@ -63314,9 +63334,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
63314
63334
  }
63315
63335
  };
63316
63336
  async function setMemoryImageSprite(element, memory) {
63337
+ memory = analizePositionsExtensionProps(memory);
63317
63338
  return await setMemorySprite(element, memory, {
63318
63339
  half: async () => {
63319
63340
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
63341
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
63320
63342
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
63321
63343
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
63322
63344
  await element.load();
@@ -64519,7 +64541,6 @@ var CanvasManager = class {
64519
64541
  * @param data The object.
64520
64542
  */
64521
64543
  async import(data) {
64522
- this.clear();
64523
64544
  try {
64524
64545
  let tickersOnPause = data["tickersOnPause"] || {};
64525
64546
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -64527,6 +64548,7 @@ var CanvasManager = class {
64527
64548
  let elementAliasesOrder = data["elementAliasesOrder"];
64528
64549
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
64529
64550
  let list = await Promise.all(promises);
64551
+ this.clear();
64530
64552
  list.forEach((element, i3) => {
64531
64553
  let alias = elementAliasesOrder[i3];
64532
64554
  this.add(alias, element);
@@ -1,6 +1,6 @@
1
1
  import * as pixi_js from 'pixi.js';
2
2
  import { ApplicationOptions, Container } from 'pixi.js';
3
- import { C as CanvasBaseItem, a as CanvasBaseItemMemory } from '../ContainerChild-CEuXVx00.cjs';
3
+ import { C as CanvasBaseItem, a as CanvasBaseItemMemory } from '../ContainerChild-WzyxEjAc.cjs';
4
4
  import TickerBase from '../classes/ticker/TickerBase.cjs';
5
5
  import { PauseType } from '../types/PauseType.cjs';
6
6
  import { RepeatType } from '../types/RepeatType.cjs';
@@ -9,8 +9,8 @@ import Ticker from '../interface/Ticker.cjs';
9
9
  import TickerArgs from '../interface/TickerArgs.cjs';
10
10
  import TickerHistory from '../interface/TickerHistory.cjs';
11
11
  import TickersSteps from '../interface/TickersSteps.cjs';
12
- import '../interface/canvas/TextureMemory.cjs';
13
12
  import '../classes/canvas/AdditionalPositions.cjs';
13
+ import '../interface/canvas/TextureMemory.cjs';
14
14
  import '../classes/canvas/AnchorExtension.cjs';
15
15
  import '../types/CanvasEventNamesType.cjs';
16
16
  import '../classes/CanvasEvent.cjs';
@@ -1,6 +1,6 @@
1
1
  import * as pixi_js from 'pixi.js';
2
2
  import { ApplicationOptions, Container } from 'pixi.js';
3
- import { C as CanvasBaseItem, a as CanvasBaseItemMemory } from '../ContainerChild-HBivknFV.js';
3
+ import { C as CanvasBaseItem, a as CanvasBaseItemMemory } from '../ContainerChild-B5yD0BI8.js';
4
4
  import TickerBase from '../classes/ticker/TickerBase.js';
5
5
  import { PauseType } from '../types/PauseType.js';
6
6
  import { RepeatType } from '../types/RepeatType.js';
@@ -9,8 +9,8 @@ import Ticker from '../interface/Ticker.js';
9
9
  import TickerArgs from '../interface/TickerArgs.js';
10
10
  import TickerHistory from '../interface/TickerHistory.js';
11
11
  import TickersSteps from '../interface/TickersSteps.js';
12
- import '../interface/canvas/TextureMemory.js';
13
12
  import '../classes/canvas/AdditionalPositions.js';
13
+ import '../interface/canvas/TextureMemory.js';
14
14
  import '../classes/canvas/AnchorExtension.js';
15
15
  import '../types/CanvasEventNamesType.js';
16
16
  import '../classes/CanvasEvent.js';
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CanvasManager
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";
@@ -1,12 +1,12 @@
1
1
  import * as pixi_js from 'pixi.js';
2
2
  import { Application, ApplicationOptions } from 'pixi.js';
3
- import { C as CanvasBaseItem } from '../ContainerChild-CEuXVx00.cjs';
3
+ import { C as CanvasBaseItem } from '../ContainerChild-WzyxEjAc.cjs';
4
4
  import PauseTickerType from '../types/PauseTickerType.cjs';
5
5
  import TickerHistory from '../interface/TickerHistory.cjs';
6
6
  import TickersSteps from '../interface/TickersSteps.cjs';
7
7
  import TickerTimeoutHistory from '../interface/TickerTimeoutHistory.cjs';
8
- import '../interface/canvas/TextureMemory.cjs';
9
8
  import '../classes/canvas/AdditionalPositions.cjs';
9
+ import '../interface/canvas/TextureMemory.cjs';
10
10
  import '../classes/canvas/AnchorExtension.cjs';
11
11
  import '../types/CanvasEventNamesType.cjs';
12
12
  import '../classes/CanvasEvent.cjs';
@@ -1,12 +1,12 @@
1
1
  import * as pixi_js from 'pixi.js';
2
2
  import { Application, ApplicationOptions } from 'pixi.js';
3
- import { C as CanvasBaseItem } from '../ContainerChild-HBivknFV.js';
3
+ import { C as CanvasBaseItem } from '../ContainerChild-B5yD0BI8.js';
4
4
  import PauseTickerType from '../types/PauseTickerType.js';
5
5
  import TickerHistory from '../interface/TickerHistory.js';
6
6
  import TickersSteps from '../interface/TickersSteps.js';
7
7
  import TickerTimeoutHistory from '../interface/TickerTimeoutHistory.js';
8
- import '../interface/canvas/TextureMemory.js';
9
8
  import '../classes/canvas/AdditionalPositions.js';
9
+ import '../interface/canvas/TextureMemory.js';
10
10
  import '../classes/canvas/AnchorExtension.js';
11
11
  import '../types/CanvasEventNamesType.js';
12
12
  import '../classes/CanvasEvent.js';
@@ -57724,7 +57724,7 @@ extensions.add(soundAsset);
57724
57724
  var sound = setInstance(new SoundLibrary());
57725
57725
 
57726
57726
  // package.json
57727
- var version = "0.9.6";
57727
+ var version = "0.9.7";
57728
57728
 
57729
57729
  // src/constants.ts
57730
57730
  var Repeat = "repeat";
@@ -58625,29 +58625,43 @@ function analizePositionsExtensionProps(props) {
58625
58625
  if (!props) {
58626
58626
  return props;
58627
58627
  }
58628
- if (props.align != void 0) {
58629
- if (typeof props.align === "number") {
58630
- props.xAlign = props.align;
58631
- props.yAlign = props.align;
58632
- } else {
58633
- if (props.align.x != void 0) {
58634
- props.xAlign = props.align.x;
58628
+ if (typeof props.align !== "number") {
58629
+ if (props.xAlign != void 0) {
58630
+ if (props.align === void 0) {
58631
+ props.align = { x: props.xAlign };
58632
+ delete props.xAlign;
58633
+ } else {
58634
+ props.align.x = props.xAlign;
58635
+ delete props.xAlign;
58635
58636
  }
58636
- if (props.align.y != void 0) {
58637
- props.yAlign = props.align.y;
58637
+ }
58638
+ if (props.yAlign != void 0) {
58639
+ if (props.align === void 0) {
58640
+ props.align = { y: props.yAlign };
58641
+ delete props.yAlign;
58642
+ } else {
58643
+ props.align.y = props.yAlign;
58644
+ delete props.yAlign;
58638
58645
  }
58639
58646
  }
58640
58647
  }
58641
- if (props.percentagePosition != void 0) {
58642
- if (typeof props.percentagePosition === "number") {
58643
- props.xPercentagePosition = props.percentagePosition;
58644
- props.yPercentagePosition = props.percentagePosition;
58645
- } else {
58646
- if (props.percentagePosition.x != void 0) {
58647
- props.xPercentagePosition = props.percentagePosition.x;
58648
+ if (typeof props.percentagePosition !== "number") {
58649
+ if (props.xPercentagePosition != void 0) {
58650
+ if (props.percentagePosition === void 0) {
58651
+ props.percentagePosition = { x: props.xPercentagePosition };
58652
+ delete props.xPercentagePosition;
58653
+ } else {
58654
+ props.percentagePosition.x = props.xPercentagePosition;
58655
+ delete props.xPercentagePosition;
58648
58656
  }
58649
- if (props.percentagePosition.y != void 0) {
58650
- props.yPercentagePosition = props.percentagePosition.y;
58657
+ }
58658
+ if (props.yPercentagePosition != void 0) {
58659
+ if (props.percentagePosition === void 0) {
58660
+ props.percentagePosition = { y: props.yPercentagePosition };
58661
+ delete props.yPercentagePosition;
58662
+ } else {
58663
+ props.percentagePosition.y = props.yPercentagePosition;
58664
+ delete props.yPercentagePosition;
58651
58665
  }
58652
58666
  }
58653
58667
  }
@@ -58689,12 +58703,15 @@ var Container2 = class extends Container {
58689
58703
  this.setMemory(value);
58690
58704
  }
58691
58705
  async setMemory(value) {
58706
+ await this.importChildren(value);
58707
+ return await setMemoryContainer(this, value);
58708
+ }
58709
+ async importChildren(value) {
58692
58710
  for (let i3 = 0; i3 < value.elements.length; i3++) {
58693
58711
  let child = value.elements[i3];
58694
58712
  let element = await importCanvasElement(child);
58695
58713
  this.addChild(element);
58696
58714
  }
58697
- return await setMemoryContainer(this, value);
58698
58715
  }
58699
58716
  };
58700
58717
  function getMemoryContainer(element) {
@@ -58786,10 +58803,10 @@ var ImageContainer = class extends Container2 {
58786
58803
  if (options?.anchor !== void 0) {
58787
58804
  this.anchor = options.anchor;
58788
58805
  }
58789
- if (options?.align !== void 0) {
58806
+ if (options && "align" in options && options?.align !== void 0) {
58790
58807
  this.align = options.align;
58791
58808
  }
58792
- if (options?.percentagePosition !== void 0) {
58809
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
58793
58810
  this.percentagePosition = options.percentagePosition;
58794
58811
  }
58795
58812
  }
@@ -58807,7 +58824,8 @@ var ImageContainer = class extends Container2 {
58807
58824
  this.setMemory(value);
58808
58825
  }
58809
58826
  async setMemory(value) {
58810
- await super.setMemory(value);
58827
+ await this.importChildren(value);
58828
+ await setMemoryImageContainer(this, value);
58811
58829
  this.reloadAnchor();
58812
58830
  this.reloadPosition();
58813
58831
  }
@@ -58981,11 +58999,13 @@ var ImageContainer = class extends Container2 {
58981
58999
  }
58982
59000
  };
58983
59001
  async function setMemoryImageContainer(element, memory, opstions) {
59002
+ memory = analizePositionsExtensionProps(memory);
58984
59003
  setMemoryContainer(element, memory, {
58985
59004
  ...opstions,
58986
59005
  end: async () => {
58987
59006
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
58988
59007
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
59008
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
58989
59009
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
58990
59010
  await element.load();
58991
59011
  }
@@ -60350,9 +60370,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
60350
60370
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
60351
60371
  };
60352
60372
  canvas.removeAll();
60353
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
60354
- container.anchor = 0.5;
60355
- container.align = 0.5;
60373
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
60374
+ canvas.add("container", container);
60356
60375
  let helmlok = addImage("helmlok", helmlokImage);
60357
60376
  helmlok.anchor = 0.5;
60358
60377
  helmlok.xAlign = 1;
@@ -60812,6 +60831,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60812
60831
  pixivnId = CANVAS_IMAGE_ID;
60813
60832
  constructor(options, textureAlias) {
60814
60833
  super(options);
60834
+ options = analizePositionsExtensionProps(options);
60815
60835
  if (textureAlias) {
60816
60836
  this.textureAlias = textureAlias;
60817
60837
  }
@@ -60835,7 +60855,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60835
60855
  this.setMemory(value);
60836
60856
  }
60837
60857
  async setMemory(value) {
60838
- await super.setMemory(value);
60858
+ await setMemoryImageSprite(this, value);
60839
60859
  this.reloadPosition();
60840
60860
  }
60841
60861
  static from(source7, skipCache) {
@@ -60972,9 +60992,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60972
60992
  }
60973
60993
  };
60974
60994
  async function setMemoryImageSprite(element, memory) {
60995
+ memory = analizePositionsExtensionProps(memory);
60975
60996
  return await setMemorySprite(element, memory, {
60976
60997
  half: async () => {
60977
60998
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
60999
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
60978
61000
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
60979
61001
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
60980
61002
  await element.load();
@@ -62649,7 +62671,6 @@ var CanvasManager = class {
62649
62671
  * @param data The object.
62650
62672
  */
62651
62673
  async import(data) {
62652
- this.clear();
62653
62674
  try {
62654
62675
  let tickersOnPause = data["tickersOnPause"] || {};
62655
62676
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -62657,6 +62678,7 @@ var CanvasManager = class {
62657
62678
  let elementAliasesOrder = data["elementAliasesOrder"];
62658
62679
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
62659
62680
  let list = await Promise.all(promises);
62681
+ this.clear();
62660
62682
  list.forEach((element, i3) => {
62661
62683
  let alias = elementAliasesOrder[i3];
62662
62684
  this.add(alias, element);
@@ -19,10 +19,10 @@ import '../types/LabelRunModeType.cjs';
19
19
  import 'deep-diff';
20
20
  import '../interface/export/ExportedCanvas.cjs';
21
21
  import '../types/PauseTickerType.cjs';
22
- import '../ContainerChild-CEuXVx00.cjs';
22
+ import '../ContainerChild-WzyxEjAc.cjs';
23
23
  import 'pixi.js';
24
- import '../interface/canvas/TextureMemory.cjs';
25
24
  import '../classes/canvas/AdditionalPositions.cjs';
25
+ import '../interface/canvas/TextureMemory.cjs';
26
26
  import '../classes/canvas/AnchorExtension.cjs';
27
27
  import '../types/CanvasEventNamesType.cjs';
28
28
  import '../classes/CanvasEvent.cjs';
@@ -19,10 +19,10 @@ import '../types/LabelRunModeType.js';
19
19
  import 'deep-diff';
20
20
  import '../interface/export/ExportedCanvas.js';
21
21
  import '../types/PauseTickerType.js';
22
- import '../ContainerChild-HBivknFV.js';
22
+ import '../ContainerChild-B5yD0BI8.js';
23
23
  import 'pixi.js';
24
- import '../interface/canvas/TextureMemory.js';
25
24
  import '../classes/canvas/AdditionalPositions.js';
25
+ import '../interface/canvas/TextureMemory.js';
26
26
  import '../classes/canvas/AnchorExtension.js';
27
27
  import '../types/CanvasEventNamesType.js';
28
28
  import '../classes/CanvasEvent.js';
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  NarrationManager
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";