@drincs/pixi-vn 0.9.5 → 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 (188) 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-IRUKNG2Y.js +130 -0
  4. package/dist/{chunk-RFNGGK7X.js → chunk-NB4Q3GFK.js} +37 -17
  5. package/dist/{chunk-K7XIRQGF.js → chunk-TOG67Z7Q.js} +1 -1
  6. package/dist/classes/CharacterBaseModel.cjs +80 -14
  7. package/dist/classes/CharacterBaseModel.js +6 -5
  8. package/dist/classes/CharacterStoredClass.cjs +80 -14
  9. package/dist/classes/CharacterStoredClass.js +6 -5
  10. package/dist/classes/ChoiceMenuOption.cjs +82 -14
  11. package/dist/classes/ChoiceMenuOption.js +6 -5
  12. package/dist/classes/Sound.cjs +80 -14
  13. package/dist/classes/Sound.js +6 -5
  14. package/dist/classes/StoredClassModel.cjs +80 -14
  15. package/dist/classes/StoredClassModel.js +6 -5
  16. package/dist/classes/canvas/AdditionalPositions.cjs +51 -0
  17. package/dist/classes/canvas/AdditionalPositions.d.cts +49 -6
  18. package/dist/classes/canvas/AdditionalPositions.d.ts +49 -6
  19. package/dist/classes/canvas/AdditionalPositions.js +6 -79
  20. package/dist/classes/canvas/CanvasBaseItem.d.cts +2 -2
  21. package/dist/classes/canvas/CanvasBaseItem.d.ts +2 -2
  22. package/dist/classes/canvas/Container.cjs +82 -14
  23. package/dist/classes/canvas/Container.d.cts +3 -2
  24. package/dist/classes/canvas/Container.d.ts +3 -2
  25. package/dist/classes/canvas/Container.js +6 -5
  26. package/dist/classes/canvas/ImageContainer.cjs +80 -14
  27. package/dist/classes/canvas/ImageContainer.d.cts +1 -1
  28. package/dist/classes/canvas/ImageContainer.d.ts +1 -1
  29. package/dist/classes/canvas/ImageContainer.js +6 -5
  30. package/dist/classes/canvas/ImageSprite.cjs +82 -14
  31. package/dist/classes/canvas/ImageSprite.d.cts +1 -1
  32. package/dist/classes/canvas/ImageSprite.d.ts +1 -1
  33. package/dist/classes/canvas/ImageSprite.js +6 -5
  34. package/dist/classes/canvas/Sprite.cjs +82 -14
  35. package/dist/classes/canvas/Sprite.d.cts +2 -2
  36. package/dist/classes/canvas/Sprite.d.ts +2 -2
  37. package/dist/classes/canvas/Sprite.js +6 -5
  38. package/dist/classes/canvas/Text.cjs +82 -14
  39. package/dist/classes/canvas/Text.d.cts +2 -2
  40. package/dist/classes/canvas/Text.d.ts +2 -2
  41. package/dist/classes/canvas/Text.js +6 -5
  42. package/dist/classes/canvas/VideoSprite.cjs +82 -14
  43. package/dist/classes/canvas/VideoSprite.d.cts +2 -2
  44. package/dist/classes/canvas/VideoSprite.d.ts +2 -2
  45. package/dist/classes/canvas/VideoSprite.js +6 -5
  46. package/dist/classes/index.cjs +82 -14
  47. package/dist/classes/index.d.cts +2 -2
  48. package/dist/classes/index.d.ts +2 -2
  49. package/dist/classes/index.js +6 -5
  50. package/dist/classes/ticker/FadeAlphaTicker.cjs +82 -14
  51. package/dist/classes/ticker/FadeAlphaTicker.js +6 -5
  52. package/dist/classes/ticker/MoveTicker.cjs +82 -14
  53. package/dist/classes/ticker/MoveTicker.js +6 -5
  54. package/dist/classes/ticker/RotateTicker.cjs +82 -14
  55. package/dist/classes/ticker/RotateTicker.js +6 -5
  56. package/dist/classes/ticker/TickerBase.cjs +80 -14
  57. package/dist/classes/ticker/TickerBase.js +6 -5
  58. package/dist/classes/ticker/ZoomTicker.cjs +82 -14
  59. package/dist/classes/ticker/ZoomTicker.js +6 -5
  60. package/dist/classes/ticker/index.cjs +82 -14
  61. package/dist/classes/ticker/index.js +6 -5
  62. package/dist/constants.cjs +1 -1
  63. package/dist/constants.d.cts +1 -1
  64. package/dist/constants.d.ts +1 -1
  65. package/dist/constants.js +1 -1
  66. package/dist/decorators/canvas-element-decorator.cjs +82 -14
  67. package/dist/decorators/canvas-element-decorator.d.cts +2 -2
  68. package/dist/decorators/canvas-element-decorator.d.ts +2 -2
  69. package/dist/decorators/canvas-element-decorator.js +6 -5
  70. package/dist/decorators/event-decorator.d.cts +2 -2
  71. package/dist/decorators/event-decorator.d.ts +2 -2
  72. package/dist/decorators/index.cjs +82 -14
  73. package/dist/decorators/index.d.cts +2 -2
  74. package/dist/decorators/index.d.ts +2 -2
  75. package/dist/decorators/index.js +6 -5
  76. package/dist/decorators/label-decorator.cjs +82 -14
  77. package/dist/decorators/label-decorator.js +6 -5
  78. package/dist/functions/canvas/canvas-effect.cjs +80 -14
  79. package/dist/functions/canvas/canvas-effect.js +6 -5
  80. package/dist/functions/canvas/canvas-memory-utility.cjs +82 -14
  81. package/dist/functions/canvas/canvas-memory-utility.d.cts +2 -2
  82. package/dist/functions/canvas/canvas-memory-utility.d.ts +2 -2
  83. package/dist/functions/canvas/canvas-memory-utility.js +6 -5
  84. package/dist/functions/canvas/canvas-transition.cjs +82 -14
  85. package/dist/functions/canvas/canvas-transition.d.cts +2 -2
  86. package/dist/functions/canvas/canvas-transition.d.ts +2 -2
  87. package/dist/functions/canvas/canvas-transition.js +6 -5
  88. package/dist/functions/canvas/canvas-utility.cjs +80 -14
  89. package/dist/functions/canvas/canvas-utility.js +6 -5
  90. package/dist/functions/canvas/image-container-utility.cjs +82 -14
  91. package/dist/functions/canvas/image-container-utility.d.cts +2 -2
  92. package/dist/functions/canvas/image-container-utility.d.ts +2 -2
  93. package/dist/functions/canvas/image-container-utility.js +6 -5
  94. package/dist/functions/canvas/image-utility.cjs +82 -14
  95. package/dist/functions/canvas/image-utility.d.cts +2 -2
  96. package/dist/functions/canvas/image-utility.d.ts +2 -2
  97. package/dist/functions/canvas/image-utility.js +6 -5
  98. package/dist/functions/canvas/video-utility.cjs +82 -14
  99. package/dist/functions/canvas/video-utility.d.cts +2 -2
  100. package/dist/functions/canvas/video-utility.d.ts +2 -2
  101. package/dist/functions/canvas/video-utility.js +6 -5
  102. package/dist/functions/dialogue-utility.cjs +80 -14
  103. package/dist/functions/dialogue-utility.js +6 -5
  104. package/dist/functions/flags-utility.cjs +80 -14
  105. package/dist/functions/flags-utility.js +6 -5
  106. package/dist/functions/game-utility.cjs +80 -14
  107. package/dist/functions/game-utility.js +6 -5
  108. package/dist/functions/index.cjs +82 -14
  109. package/dist/functions/index.d.cts +2 -2
  110. package/dist/functions/index.d.ts +2 -2
  111. package/dist/functions/index.js +6 -5
  112. package/dist/functions/saves-utility.cjs +80 -14
  113. package/dist/functions/saves-utility.d.cts +2 -2
  114. package/dist/functions/saves-utility.d.ts +2 -2
  115. package/dist/functions/saves-utility.js +6 -5
  116. package/dist/functions/texture-utility.cjs +82 -14
  117. package/dist/functions/texture-utility.d.cts +2 -2
  118. package/dist/functions/texture-utility.d.ts +2 -2
  119. package/dist/functions/texture-utility.js +6 -5
  120. package/dist/index.cjs +80 -14
  121. package/dist/index.d.cts +1 -1
  122. package/dist/index.d.ts +1 -1
  123. package/dist/index.js +10 -9
  124. package/dist/interface/HistoryStep.d.cts +2 -2
  125. package/dist/interface/HistoryStep.d.ts +2 -2
  126. package/dist/interface/SaveData.d.cts +2 -2
  127. package/dist/interface/SaveData.d.ts +2 -2
  128. package/dist/interface/canvas/canvas-memory.d.cts +2 -2
  129. package/dist/interface/canvas/canvas-memory.d.ts +2 -2
  130. package/dist/interface/canvas/canvas-options.d.cts +1 -1
  131. package/dist/interface/canvas/canvas-options.d.ts +1 -1
  132. package/dist/interface/export/ExportedCanvas.d.cts +2 -2
  133. package/dist/interface/export/ExportedCanvas.d.ts +2 -2
  134. package/dist/interface/export/ExportedStep.d.cts +2 -2
  135. package/dist/interface/export/ExportedStep.d.ts +2 -2
  136. package/dist/interface/index.d.cts +1 -1
  137. package/dist/interface/index.d.ts +1 -1
  138. package/dist/labels/BaseCanvasElementTestLabel.cjs +82 -14
  139. package/dist/labels/BaseCanvasElementTestLabel.js +6 -5
  140. package/dist/labels/CanvasEventsTestLabel.cjs +82 -14
  141. package/dist/labels/CanvasEventsTestLabel.d.cts +2 -2
  142. package/dist/labels/CanvasEventsTestLabel.d.ts +2 -2
  143. package/dist/labels/CanvasEventsTestLabel.js +6 -5
  144. package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +80 -14
  145. package/dist/labels/CustomTickerCanvasElementTestLabel.js +6 -5
  146. package/dist/labels/ImagesAnimationsTestLabel.cjs +82 -14
  147. package/dist/labels/ImagesAnimationsTestLabel.js +6 -5
  148. package/dist/labels/InputTestLabel.cjs +82 -14
  149. package/dist/labels/InputTestLabel.js +6 -5
  150. package/dist/labels/MarkdownTest.cjs +82 -14
  151. package/dist/labels/MarkdownTest.js +6 -5
  152. package/dist/labels/SoundTestLabel.cjs +82 -14
  153. package/dist/labels/SoundTestLabel.js +6 -5
  154. package/dist/labels/StartLabel.cjs +82 -14
  155. package/dist/labels/StartLabel.js +6 -5
  156. package/dist/labels/StepLabelTest.cjs +82 -14
  157. package/dist/labels/StepLabelTest.js +6 -5
  158. package/dist/labels/VideoTestLabel.cjs +82 -14
  159. package/dist/labels/VideoTestLabel.js +6 -5
  160. package/dist/labels/index.cjs +82 -14
  161. package/dist/labels/index.js +6 -5
  162. package/dist/managers/CanvasManager.cjs +80 -14
  163. package/dist/managers/CanvasManager.d.cts +2 -2
  164. package/dist/managers/CanvasManager.d.ts +2 -2
  165. package/dist/managers/CanvasManager.js +6 -5
  166. package/dist/managers/CanvasManagerStatic.d.cts +2 -2
  167. package/dist/managers/CanvasManagerStatic.d.ts +2 -2
  168. package/dist/managers/NarrationManager.cjs +80 -14
  169. package/dist/managers/NarrationManager.d.cts +2 -2
  170. package/dist/managers/NarrationManager.d.ts +2 -2
  171. package/dist/managers/NarrationManager.js +6 -5
  172. package/dist/managers/NarrationManagerStatic.cjs +80 -14
  173. package/dist/managers/NarrationManagerStatic.d.cts +2 -2
  174. package/dist/managers/NarrationManagerStatic.d.ts +2 -2
  175. package/dist/managers/NarrationManagerStatic.js +6 -5
  176. package/dist/managers/SoundManager.cjs +80 -14
  177. package/dist/managers/SoundManager.js +6 -5
  178. package/dist/managers/StorageManager.cjs +80 -14
  179. package/dist/managers/StorageManager.js +6 -5
  180. package/dist/managers/index.cjs +80 -14
  181. package/dist/managers/index.d.cts +2 -2
  182. package/dist/managers/index.d.ts +2 -2
  183. package/dist/managers/index.js +6 -5
  184. package/dist/types/ContainerChild.d.cts +2 -2
  185. package/dist/types/ContainerChild.d.ts +2 -2
  186. package/dist/types/index.d.cts +2 -2
  187. package/dist/types/index.d.ts +2 -2
  188. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { ContainerOptions, PointData, SpriteOptions, TextOptions, Container, Sprite as Sprite$1, Texture, ContainerEvents, ContainerChild as ContainerChild$1, EventEmitter, TextureSourceLike, TextureSource, ObservablePoint } from 'pixi.js';
2
- import TextureMemory from './interface/canvas/TextureMemory.js';
3
2
  import AdditionalPositionsExtension, { AdditionalPositionsExtensionProps } from './classes/canvas/AdditionalPositions.js';
3
+ import TextureMemory from './interface/canvas/TextureMemory.js';
4
4
  import { AnchorExtensionProps } from './classes/canvas/AnchorExtension.js';
5
5
  import CanvasEventNamesType from './types/CanvasEventNamesType.js';
6
6
  import CanvasEvent from './classes/CanvasEvent.js';
@@ -21,11 +21,9 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
21
21
  /**
22
22
  * Interface for the canvas container memory
23
23
  */
24
- interface ImageContainerMemory extends ContainerMemory<ImageSprite> {
24
+ interface ImageContainerMemory extends ContainerMemory<ImageSprite>, AdditionalPositionsExtensionProps {
25
25
  elements: ImageSpriteMemory[];
26
26
  anchor?: PointData;
27
- align?: Partial<PointData>;
28
- percentagePosition?: Partial<PointData>;
29
27
  loadIsStarted: boolean;
30
28
  }
31
29
  interface SpriteBaseMemory extends SpriteOptions, CanvasBaseItemMemory {
@@ -54,13 +52,11 @@ interface TextMemory extends TextOptions, CanvasBaseItemMemory {
54
52
  /**
55
53
  * The memory of the image. It uses for save the state of the image.
56
54
  */
57
- interface ImageSpriteMemory extends SpriteBaseMemory {
55
+ interface ImageSpriteMemory extends SpriteBaseMemory, AdditionalPositionsExtensionProps {
58
56
  /**
59
57
  * @deprecated use SpriteBaseMemory.textureAlias
60
58
  */
61
59
  imageLink?: string;
62
- align?: Partial<PointData>;
63
- percentagePosition?: Partial<PointData>;
64
60
  loadIsStarted: boolean;
65
61
  }
66
62
  /**
@@ -1,6 +1,6 @@
1
1
  import { ContainerOptions, PointData, SpriteOptions, TextOptions, Container, Sprite as Sprite$1, Texture, ContainerEvents, ContainerChild as ContainerChild$1, EventEmitter, TextureSourceLike, TextureSource, ObservablePoint } from 'pixi.js';
2
- import TextureMemory from './interface/canvas/TextureMemory.cjs';
3
2
  import AdditionalPositionsExtension, { AdditionalPositionsExtensionProps } from './classes/canvas/AdditionalPositions.cjs';
3
+ import TextureMemory from './interface/canvas/TextureMemory.cjs';
4
4
  import { AnchorExtensionProps } from './classes/canvas/AnchorExtension.cjs';
5
5
  import CanvasEventNamesType from './types/CanvasEventNamesType.cjs';
6
6
  import CanvasEvent from './classes/CanvasEvent.cjs';
@@ -21,11 +21,9 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
21
21
  /**
22
22
  * Interface for the canvas container memory
23
23
  */
24
- interface ImageContainerMemory extends ContainerMemory<ImageSprite> {
24
+ interface ImageContainerMemory extends ContainerMemory<ImageSprite>, AdditionalPositionsExtensionProps {
25
25
  elements: ImageSpriteMemory[];
26
26
  anchor?: PointData;
27
- align?: Partial<PointData>;
28
- percentagePosition?: Partial<PointData>;
29
27
  loadIsStarted: boolean;
30
28
  }
31
29
  interface SpriteBaseMemory extends SpriteOptions, CanvasBaseItemMemory {
@@ -54,13 +52,11 @@ interface TextMemory extends TextOptions, CanvasBaseItemMemory {
54
52
  /**
55
53
  * The memory of the image. It uses for save the state of the image.
56
54
  */
57
- interface ImageSpriteMemory extends SpriteBaseMemory {
55
+ interface ImageSpriteMemory extends SpriteBaseMemory, AdditionalPositionsExtensionProps {
58
56
  /**
59
57
  * @deprecated use SpriteBaseMemory.textureAlias
60
58
  */
61
59
  imageLink?: string;
62
- align?: Partial<PointData>;
63
- percentagePosition?: Partial<PointData>;
64
60
  loadIsStarted: boolean;
65
61
  }
66
62
  /**
@@ -0,0 +1,130 @@
1
+ import {
2
+ Container
3
+ } from "./chunk-PP3SBC3C.js";
4
+
5
+ // src/classes/canvas/AdditionalPositions.ts
6
+ var AdditionalPositionsExtension = class extends Container {
7
+ /**
8
+ * is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
9
+ * For example:
10
+ * - if you set align to 0.5, the element will be in the center of the canvas.
11
+ * - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
12
+ * - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
13
+ *
14
+ * **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
15
+ */
16
+ set align(_value) {
17
+ throw new Error("Method not implemented.");
18
+ }
19
+ /**
20
+ * is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
21
+ * For example:
22
+ * - if you set align to 0.5, the element will be in the center of the canvas.
23
+ * - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
24
+ * - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
25
+ *
26
+ * **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
27
+ */
28
+ set xAlign(_value) {
29
+ throw new Error("Method not implemented.");
30
+ }
31
+ /**
32
+ * is a way to set the position of the element in the canvas. compared to position, align, it is a percentage used to determine the proximity from the edges of the canvas.
33
+ * For example:
34
+ * - if you set align to 0.5, the element will be in the center of the canvas.
35
+ * - if you set align to 0, the left end and a top end of the element will be in the left end and top end of the canvas.
36
+ * - if you set align to 1, the right end and a bottom end of the element will be in the right end and bottom end of the canvas.
37
+ *
38
+ * **Important:** The {@link PixiContainer.pivot} field does not affect the alignment.
39
+ */
40
+ set yAlign(_value) {
41
+ throw new Error("Method not implemented.");
42
+ }
43
+ /**
44
+ * is a way to set the position of the element in the canvas calculated in percentage.
45
+ * For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
46
+ * - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
47
+ * - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
48
+ * - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
49
+ *
50
+ * **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
51
+ */
52
+ set percentagePosition(_value) {
53
+ throw new Error("Method not implemented.");
54
+ }
55
+ /**
56
+ * is a way to set the position of the element in the canvas calculated in percentage.
57
+ * For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
58
+ * - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
59
+ * - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
60
+ * - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
61
+ *
62
+ * **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
63
+ */
64
+ set xPercentagePosition(_value) {
65
+ throw new Error("Method not implemented.");
66
+ }
67
+ /**
68
+ * is a way to set the position of the element in the canvas calculated in percentage.
69
+ * For example, if you set the {@link PixiContainer.pivot} to 0.5, and:
70
+ * - if you set percentagePosition to 0.5, the element will be in the center of the canvas.
71
+ * - If you set percentagePosition to 0, the center of the element will be in the left end and top end of the canvas.
72
+ * - If you set percentagePosition to 1, the center of the element will be in the right end and bottom end of the canvas.
73
+ *
74
+ * **Important:** The {@link PixiContainer.pivot} field does affect the percentagePosition.
75
+ */
76
+ set yPercentagePosition(_value) {
77
+ throw new Error("Method not implemented.");
78
+ }
79
+ };
80
+ function analizePositionsExtensionProps(props) {
81
+ if (!props) {
82
+ return props;
83
+ }
84
+ if (typeof props.align !== "number") {
85
+ if (props.xAlign != void 0) {
86
+ if (props.align === void 0) {
87
+ props.align = { x: props.xAlign };
88
+ delete props.xAlign;
89
+ } else {
90
+ props.align.x = props.xAlign;
91
+ delete props.xAlign;
92
+ }
93
+ }
94
+ if (props.yAlign != void 0) {
95
+ if (props.align === void 0) {
96
+ props.align = { y: props.yAlign };
97
+ delete props.yAlign;
98
+ } else {
99
+ props.align.y = props.yAlign;
100
+ delete props.yAlign;
101
+ }
102
+ }
103
+ }
104
+ if (typeof props.percentagePosition !== "number") {
105
+ if (props.xPercentagePosition != void 0) {
106
+ if (props.percentagePosition === void 0) {
107
+ props.percentagePosition = { x: props.xPercentagePosition };
108
+ delete props.xPercentagePosition;
109
+ } else {
110
+ props.percentagePosition.x = props.xPercentagePosition;
111
+ delete props.xPercentagePosition;
112
+ }
113
+ }
114
+ if (props.yPercentagePosition != void 0) {
115
+ if (props.percentagePosition === void 0) {
116
+ props.percentagePosition = { y: props.yPercentagePosition };
117
+ delete props.yPercentagePosition;
118
+ } else {
119
+ props.percentagePosition.y = props.yPercentagePosition;
120
+ delete props.yPercentagePosition;
121
+ }
122
+ }
123
+ }
124
+ return props;
125
+ }
126
+
127
+ export {
128
+ AdditionalPositionsExtension,
129
+ analizePositionsExtensionProps
130
+ };
@@ -1,6 +1,12 @@
1
1
  import {
2
2
  aliasToRemoveAfter
3
3
  } from "./chunk-OMPJ74CO.js";
4
+ import {
5
+ analizePositionsExtensionProps
6
+ } from "./chunk-IRUKNG2Y.js";
7
+ import {
8
+ Close
9
+ } from "./chunk-I6TNJEE3.js";
4
10
  import {
5
11
  StorageManagerStatic
6
12
  } from "./chunk-DPUSONJ3.js";
@@ -10,9 +16,6 @@ import {
10
16
  import {
11
17
  SoundManagerStatic
12
18
  } from "./chunk-6FAGAUDR.js";
13
- import {
14
- Close
15
- } from "./chunk-I6TNJEE3.js";
16
19
  import {
17
20
  bunnyImage,
18
21
  bunnyName,
@@ -69,7 +72,7 @@ import {
69
72
  filters,
70
73
  version,
71
74
  videoFormats
72
- } from "./chunk-K7XIRQGF.js";
75
+ } from "./chunk-TOG67Z7Q.js";
73
76
  import {
74
77
  Sound,
75
78
  SoundLibrary,
@@ -684,12 +687,15 @@ var Container2 = class extends Container {
684
687
  this.setMemory(value);
685
688
  }
686
689
  async setMemory(value) {
690
+ await this.importChildren(value);
691
+ return await setMemoryContainer(this, value);
692
+ }
693
+ async importChildren(value) {
687
694
  for (let i = 0; i < value.elements.length; i++) {
688
695
  let child = value.elements[i];
689
696
  let element = await importCanvasElement(child);
690
697
  this.addChild(element);
691
698
  }
692
- return await setMemoryContainer(this, value);
693
699
  }
694
700
  };
695
701
  function getMemoryContainer(element) {
@@ -772,6 +778,7 @@ async function setMemoryContainer(element, memory, opstions) {
772
778
  var ImageContainer = class extends Container2 {
773
779
  constructor(options, textureAliases = []) {
774
780
  super(options);
781
+ options = analizePositionsExtensionProps(options);
775
782
  if (textureAliases) {
776
783
  textureAliases.forEach((textureAlias) => {
777
784
  this.addChild(new ImageSprite(void 0, textureAlias));
@@ -780,10 +787,10 @@ var ImageContainer = class extends Container2 {
780
787
  if (options?.anchor !== void 0) {
781
788
  this.anchor = options.anchor;
782
789
  }
783
- if (options?.align !== void 0) {
790
+ if (options && "align" in options && options?.align !== void 0) {
784
791
  this.align = options.align;
785
792
  }
786
- if (options?.percentagePosition !== void 0) {
793
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
787
794
  this.percentagePosition = options.percentagePosition;
788
795
  }
789
796
  }
@@ -801,7 +808,8 @@ var ImageContainer = class extends Container2 {
801
808
  this.setMemory(value);
802
809
  }
803
810
  async setMemory(value) {
804
- await super.setMemory(value);
811
+ await this.importChildren(value);
812
+ await setMemoryImageContainer(this, value);
805
813
  this.reloadAnchor();
806
814
  this.reloadPosition();
807
815
  }
@@ -888,13 +896,17 @@ var ImageContainer = class extends Container2 {
888
896
  this.reloadPosition();
889
897
  }
890
898
  set xAlign(value) {
891
- this._percentagePosition = void 0;
899
+ if (this._percentagePosition) {
900
+ this._percentagePosition.x = void 0;
901
+ }
892
902
  this._align === void 0 && (this._align = {});
893
903
  this._align.x = value;
894
904
  this.reloadPosition();
895
905
  }
896
906
  set yAlign(value) {
897
- this._percentagePosition = void 0;
907
+ if (this._percentagePosition) {
908
+ this._percentagePosition.y = void 0;
909
+ }
898
910
  this._align === void 0 && (this._align = {});
899
911
  this._align.y = value;
900
912
  this.reloadPosition();
@@ -913,13 +925,17 @@ var ImageContainer = class extends Container2 {
913
925
  this.reloadPosition();
914
926
  }
915
927
  set xPercentagePosition(_value) {
916
- this._align = void 0;
928
+ if (this._align) {
929
+ this._align.x = void 0;
930
+ }
917
931
  this._percentagePosition === void 0 && (this._percentagePosition = {});
918
932
  this._percentagePosition.x = _value;
919
933
  this.reloadPosition();
920
934
  }
921
935
  set yPercentagePosition(_value) {
922
- this._align = void 0;
936
+ if (this._align) {
937
+ this._align.y = void 0;
938
+ }
923
939
  this._percentagePosition === void 0 && (this._percentagePosition = {});
924
940
  this._percentagePosition.y = _value;
925
941
  this.reloadPosition();
@@ -967,11 +983,13 @@ var ImageContainer = class extends Container2 {
967
983
  }
968
984
  };
969
985
  async function setMemoryImageContainer(element, memory, opstions) {
986
+ memory = analizePositionsExtensionProps(memory);
970
987
  setMemoryContainer(element, memory, {
971
988
  ...opstions,
972
989
  end: async () => {
973
990
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
974
991
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
992
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
975
993
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
976
994
  await element.load();
977
995
  }
@@ -2803,7 +2821,6 @@ var CanvasManager = class {
2803
2821
  * @param data The object.
2804
2822
  */
2805
2823
  async import(data) {
2806
- this.clear();
2807
2824
  try {
2808
2825
  let tickersOnPause = data["tickersOnPause"] || {};
2809
2826
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -2811,6 +2828,7 @@ var CanvasManager = class {
2811
2828
  let elementAliasesOrder = data["elementAliasesOrder"];
2812
2829
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
2813
2830
  let list = await Promise.all(promises);
2831
+ this.clear();
2814
2832
  list.forEach((element, i) => {
2815
2833
  let alias = elementAliasesOrder[i];
2816
2834
  this.add(alias, element);
@@ -5788,9 +5806,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
5788
5806
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
5789
5807
  };
5790
5808
  canvas.removeAll();
5791
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
5792
- container.anchor = 0.5;
5793
- container.align = 0.5;
5809
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
5810
+ canvas.add("container", container);
5794
5811
  let helmlok = addImage("helmlok", helmlokImage);
5795
5812
  helmlok.anchor = 0.5;
5796
5813
  helmlok.xAlign = 1;
@@ -6101,6 +6118,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
6101
6118
  pixivnId = CANVAS_IMAGE_ID;
6102
6119
  constructor(options, textureAlias) {
6103
6120
  super(options);
6121
+ options = analizePositionsExtensionProps(options);
6104
6122
  if (textureAlias) {
6105
6123
  this.textureAlias = textureAlias;
6106
6124
  }
@@ -6124,7 +6142,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
6124
6142
  this.setMemory(value);
6125
6143
  }
6126
6144
  async setMemory(value) {
6127
- await super.setMemory(value);
6145
+ await setMemoryImageSprite(this, value);
6128
6146
  this.reloadPosition();
6129
6147
  }
6130
6148
  static from(source, skipCache) {
@@ -6261,9 +6279,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
6261
6279
  }
6262
6280
  };
6263
6281
  async function setMemoryImageSprite(element, memory) {
6282
+ memory = analizePositionsExtensionProps(memory);
6264
6283
  return await setMemorySprite(element, memory, {
6265
6284
  half: async () => {
6266
6285
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
6286
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
6267
6287
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
6268
6288
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
6269
6289
  await element.load();
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-WS3FY4Q6.js";
4
4
 
5
5
  // package.json
6
- var version = "0.9.5";
6
+ var version = "0.9.7";
7
7
 
8
8
  // src/constants.ts
9
9
  var Repeat = "repeat";
@@ -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.5";
57726
+ var version = "0.9.7";
57727
57727
 
57728
57728
  // src/constants.ts
57729
57729
  var Repeat = "repeat";
@@ -58618,6 +58618,55 @@ async function shakeEffect(alias, props = {}, priority) {
58618
58618
  // src/classes/canvas/ImageContainer.ts
58619
58619
  init_lib();
58620
58620
 
58621
+ // src/classes/canvas/AdditionalPositions.ts
58622
+ init_lib();
58623
+ function analizePositionsExtensionProps(props) {
58624
+ if (!props) {
58625
+ return props;
58626
+ }
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;
58635
+ }
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;
58644
+ }
58645
+ }
58646
+ }
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;
58655
+ }
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;
58664
+ }
58665
+ }
58666
+ }
58667
+ return props;
58668
+ }
58669
+
58621
58670
  // src/classes/canvas/Container.ts
58622
58671
  init_lib();
58623
58672
 
@@ -58653,12 +58702,15 @@ var Container2 = class extends Container {
58653
58702
  this.setMemory(value);
58654
58703
  }
58655
58704
  async setMemory(value) {
58705
+ await this.importChildren(value);
58706
+ return await setMemoryContainer(this, value);
58707
+ }
58708
+ async importChildren(value) {
58656
58709
  for (let i3 = 0; i3 < value.elements.length; i3++) {
58657
58710
  let child = value.elements[i3];
58658
58711
  let element = await importCanvasElement(child);
58659
58712
  this.addChild(element);
58660
58713
  }
58661
- return await setMemoryContainer(this, value);
58662
58714
  }
58663
58715
  };
58664
58716
  function getMemoryContainer(element) {
@@ -58741,6 +58793,7 @@ async function setMemoryContainer(element, memory, opstions) {
58741
58793
  var ImageContainer = class extends Container2 {
58742
58794
  constructor(options, textureAliases = []) {
58743
58795
  super(options);
58796
+ options = analizePositionsExtensionProps(options);
58744
58797
  if (textureAliases) {
58745
58798
  textureAliases.forEach((textureAlias) => {
58746
58799
  this.addChild(new ImageSprite(void 0, textureAlias));
@@ -58749,10 +58802,10 @@ var ImageContainer = class extends Container2 {
58749
58802
  if (options?.anchor !== void 0) {
58750
58803
  this.anchor = options.anchor;
58751
58804
  }
58752
- if (options?.align !== void 0) {
58805
+ if (options && "align" in options && options?.align !== void 0) {
58753
58806
  this.align = options.align;
58754
58807
  }
58755
- if (options?.percentagePosition !== void 0) {
58808
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
58756
58809
  this.percentagePosition = options.percentagePosition;
58757
58810
  }
58758
58811
  }
@@ -58770,7 +58823,8 @@ var ImageContainer = class extends Container2 {
58770
58823
  this.setMemory(value);
58771
58824
  }
58772
58825
  async setMemory(value) {
58773
- await super.setMemory(value);
58826
+ await this.importChildren(value);
58827
+ await setMemoryImageContainer(this, value);
58774
58828
  this.reloadAnchor();
58775
58829
  this.reloadPosition();
58776
58830
  }
@@ -58857,13 +58911,17 @@ var ImageContainer = class extends Container2 {
58857
58911
  this.reloadPosition();
58858
58912
  }
58859
58913
  set xAlign(value) {
58860
- this._percentagePosition = void 0;
58914
+ if (this._percentagePosition) {
58915
+ this._percentagePosition.x = void 0;
58916
+ }
58861
58917
  this._align === void 0 && (this._align = {});
58862
58918
  this._align.x = value;
58863
58919
  this.reloadPosition();
58864
58920
  }
58865
58921
  set yAlign(value) {
58866
- this._percentagePosition = void 0;
58922
+ if (this._percentagePosition) {
58923
+ this._percentagePosition.y = void 0;
58924
+ }
58867
58925
  this._align === void 0 && (this._align = {});
58868
58926
  this._align.y = value;
58869
58927
  this.reloadPosition();
@@ -58882,13 +58940,17 @@ var ImageContainer = class extends Container2 {
58882
58940
  this.reloadPosition();
58883
58941
  }
58884
58942
  set xPercentagePosition(_value) {
58885
- this._align = void 0;
58943
+ if (this._align) {
58944
+ this._align.x = void 0;
58945
+ }
58886
58946
  this._percentagePosition === void 0 && (this._percentagePosition = {});
58887
58947
  this._percentagePosition.x = _value;
58888
58948
  this.reloadPosition();
58889
58949
  }
58890
58950
  set yPercentagePosition(_value) {
58891
- this._align = void 0;
58951
+ if (this._align) {
58952
+ this._align.y = void 0;
58953
+ }
58892
58954
  this._percentagePosition === void 0 && (this._percentagePosition = {});
58893
58955
  this._percentagePosition.y = _value;
58894
58956
  this.reloadPosition();
@@ -58936,11 +58998,13 @@ var ImageContainer = class extends Container2 {
58936
58998
  }
58937
58999
  };
58938
59000
  async function setMemoryImageContainer(element, memory, opstions) {
59001
+ memory = analizePositionsExtensionProps(memory);
58939
59002
  setMemoryContainer(element, memory, {
58940
59003
  ...opstions,
58941
59004
  end: async () => {
58942
59005
  "anchor" in memory && memory.anchor !== void 0 && (element.anchor = memory.anchor);
58943
59006
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
59007
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
58944
59008
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
58945
59009
  await element.load();
58946
59010
  }
@@ -60305,9 +60369,8 @@ var customPositionTest = newLabel("___pixi_vn_images_custom_position_test___", [
60305
60369
  - ${skullyName} will be added with the anchor set to 0.5 and align set to 0.25.`
60306
60370
  };
60307
60371
  canvas.removeAll();
60308
- let container = addImageCointainer("container", [eggHeadImage, flowerTopImage]);
60309
- container.anchor = 0.5;
60310
- container.align = 0.5;
60372
+ let container = new ImageContainer({ anchor: 0.5, align: 0.5 }, [eggHeadImage, flowerTopImage]);
60373
+ canvas.add("container", container);
60311
60374
  let helmlok = addImage("helmlok", helmlokImage);
60312
60375
  helmlok.anchor = 0.5;
60313
60376
  helmlok.xAlign = 1;
@@ -60767,6 +60830,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60767
60830
  pixivnId = CANVAS_IMAGE_ID;
60768
60831
  constructor(options, textureAlias) {
60769
60832
  super(options);
60833
+ options = analizePositionsExtensionProps(options);
60770
60834
  if (textureAlias) {
60771
60835
  this.textureAlias = textureAlias;
60772
60836
  }
@@ -60790,7 +60854,7 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60790
60854
  this.setMemory(value);
60791
60855
  }
60792
60856
  async setMemory(value) {
60793
- await super.setMemory(value);
60857
+ await setMemoryImageSprite(this, value);
60794
60858
  this.reloadPosition();
60795
60859
  }
60796
60860
  static from(source7, skipCache) {
@@ -60927,9 +60991,11 @@ var ImageSprite = class _ImageSprite extends Sprite2 {
60927
60991
  }
60928
60992
  };
60929
60993
  async function setMemoryImageSprite(element, memory) {
60994
+ memory = analizePositionsExtensionProps(memory);
60930
60995
  return await setMemorySprite(element, memory, {
60931
60996
  half: async () => {
60932
60997
  "align" in memory && memory.align !== void 0 && (element.align = memory.align);
60998
+ "percentagePosition" in memory && memory.percentagePosition !== void 0 && (element.percentagePosition = memory.percentagePosition);
60933
60999
  "imageLink" in memory && memory.imageLink !== void 0 && (element.textureAlias = memory.imageLink);
60934
61000
  if ("loadIsStarted" in memory && memory.loadIsStarted) {
60935
61001
  await element.load();
@@ -62662,7 +62728,6 @@ var CanvasManager = class {
62662
62728
  * @param data The object.
62663
62729
  */
62664
62730
  async import(data) {
62665
- this.clear();
62666
62731
  try {
62667
62732
  let tickersOnPause = data["tickersOnPause"] || {};
62668
62733
  if (data.hasOwnProperty("elementAliasesOrder") && data.hasOwnProperty("elements")) {
@@ -62670,6 +62735,7 @@ var CanvasManager = class {
62670
62735
  let elementAliasesOrder = data["elementAliasesOrder"];
62671
62736
  let promises = elementAliasesOrder.filter((alias) => currentElements[alias]).map((alias) => importCanvasElement(currentElements[alias]));
62672
62737
  let list = await Promise.all(promises);
62738
+ this.clear();
62673
62739
  list.forEach((element, i3) => {
62674
62740
  let alias = elementAliasesOrder[i3];
62675
62741
  this.add(alias, element);
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  CharacterBaseModel
3
- } from "../chunk-RFNGGK7X.js";
3
+ } from "../chunk-NB4Q3GFK.js";
4
4
  import "../chunk-OMPJ74CO.js";
5
5
  import "../chunk-2JGQWY5I.js";
6
- import "../chunk-DPUSONJ3.js";
7
- import "../chunk-6GJXIPNB.js";
8
6
  import "../chunk-2BUPSB7O.js";
7
+ import "../chunk-IRUKNG2Y.js";
8
+ import "../chunk-6GJXIPNB.js";
9
+ import "../chunk-I6TNJEE3.js";
10
+ import "../chunk-DPUSONJ3.js";
9
11
  import "../chunk-WNOARCWH.js";
10
12
  import "../chunk-6FAGAUDR.js";
11
- import "../chunk-I6TNJEE3.js";
12
13
  import "../chunk-RI37WOHP.js";
13
14
  import "../chunk-ETZISN54.js";
14
15
  import "../chunk-VXCA724Z.js";
@@ -20,7 +21,7 @@ import "../chunk-ZBUW3MBH.js";
20
21
  import "../chunk-PIYIZHZL.js";
21
22
  import "../chunk-B7XQM2BB.js";
22
23
  import "../chunk-LEMOIFSV.js";
23
- import "../chunk-K7XIRQGF.js";
24
+ import "../chunk-TOG67Z7Q.js";
24
25
  import "../chunk-WS3FY4Q6.js";
25
26
  import "../chunk-Z3NBKYVU.js";
26
27
  import "../chunk-SAUNZQHZ.js";