@drincs/pixi-vn 0.9.8 → 0.9.10

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 (200) hide show
  1. package/dist/{ContainerChild-AjuVp3wW.d.ts → ContainerChild-Cnp3QQhi.d.ts} +6 -1
  2. package/dist/{ContainerChild-BUFxM6Ya.d.cts → ContainerChild-DcpXQmd7.d.cts} +6 -1
  3. package/dist/{WebGLRenderer-EFHDNV22.js → WebGLRenderer-CWVLYTYY.js} +2 -2
  4. package/dist/{WebGPURenderer-LEKL575M.js → WebGPURenderer-46NKQGBG.js} +2 -2
  5. package/dist/{chunk-FXH7A6UR.js → chunk-7MKMIPPX.js} +101 -38
  6. package/dist/{chunk-DXOIIOAQ.js → chunk-BJGKFUMU.js} +2 -2
  7. package/dist/{chunk-OPLBQKS2.js → chunk-F74VVSHO.js} +1 -1
  8. package/dist/{chunk-DQ47ST7G.js → chunk-HCINNHUZ.js} +1 -1
  9. package/dist/{chunk-3XKVLXKN.js → chunk-LZNY6NEZ.js} +2 -2
  10. package/dist/{chunk-DZMWRZUL.js → chunk-MQPMJVDR.js} +3 -3
  11. package/dist/{chunk-DWJGQ2A5.js → chunk-UWBWDBB3.js} +1 -1
  12. package/dist/classes/CharacterBaseModel.cjs +87 -52
  13. package/dist/classes/CharacterBaseModel.js +7 -7
  14. package/dist/classes/CharacterStoredClass.cjs +87 -52
  15. package/dist/classes/CharacterStoredClass.js +7 -7
  16. package/dist/classes/ChoiceMenuOption.cjs +87 -52
  17. package/dist/classes/ChoiceMenuOption.js +7 -7
  18. package/dist/classes/Sound.cjs +87 -52
  19. package/dist/classes/Sound.js +7 -7
  20. package/dist/classes/StoredClassModel.cjs +87 -52
  21. package/dist/classes/StoredClassModel.js +7 -7
  22. package/dist/classes/canvas/AdditionalPositions.cjs +87 -52
  23. package/dist/classes/canvas/AdditionalPositions.js +7 -7
  24. package/dist/classes/canvas/AnchorExtension.js +4 -4
  25. package/dist/classes/canvas/CanvasBaseItem.d.cts +1 -1
  26. package/dist/classes/canvas/CanvasBaseItem.d.ts +1 -1
  27. package/dist/classes/canvas/CanvasBaseItem.js +4 -4
  28. package/dist/classes/canvas/Container.cjs +87 -52
  29. package/dist/classes/canvas/Container.d.cts +1 -1
  30. package/dist/classes/canvas/Container.d.ts +1 -1
  31. package/dist/classes/canvas/Container.js +7 -7
  32. package/dist/classes/canvas/ImageContainer.cjs +87 -52
  33. package/dist/classes/canvas/ImageContainer.d.cts +1 -1
  34. package/dist/classes/canvas/ImageContainer.d.ts +1 -1
  35. package/dist/classes/canvas/ImageContainer.js +7 -7
  36. package/dist/classes/canvas/ImageSprite.cjs +87 -52
  37. package/dist/classes/canvas/ImageSprite.d.cts +1 -1
  38. package/dist/classes/canvas/ImageSprite.d.ts +1 -1
  39. package/dist/classes/canvas/ImageSprite.js +7 -7
  40. package/dist/classes/canvas/Sprite.cjs +87 -52
  41. package/dist/classes/canvas/Sprite.d.cts +1 -1
  42. package/dist/classes/canvas/Sprite.d.ts +1 -1
  43. package/dist/classes/canvas/Sprite.js +7 -7
  44. package/dist/classes/canvas/Text.cjs +87 -52
  45. package/dist/classes/canvas/Text.d.cts +1 -1
  46. package/dist/classes/canvas/Text.d.ts +1 -1
  47. package/dist/classes/canvas/Text.js +7 -7
  48. package/dist/classes/canvas/VideoSprite.cjs +87 -52
  49. package/dist/classes/canvas/VideoSprite.d.cts +2 -1
  50. package/dist/classes/canvas/VideoSprite.d.ts +2 -1
  51. package/dist/classes/canvas/VideoSprite.js +7 -7
  52. package/dist/classes/index.cjs +87 -52
  53. package/dist/classes/index.d.cts +1 -1
  54. package/dist/classes/index.d.ts +1 -1
  55. package/dist/classes/index.js +7 -7
  56. package/dist/classes/ticker/FadeAlphaTicker.cjs +87 -52
  57. package/dist/classes/ticker/FadeAlphaTicker.js +7 -7
  58. package/dist/classes/ticker/MoveTicker.cjs +87 -52
  59. package/dist/classes/ticker/MoveTicker.js +7 -7
  60. package/dist/classes/ticker/RotateTicker.cjs +87 -52
  61. package/dist/classes/ticker/RotateTicker.js +7 -7
  62. package/dist/classes/ticker/TickerBase.cjs +87 -52
  63. package/dist/classes/ticker/TickerBase.js +7 -7
  64. package/dist/classes/ticker/ZoomTicker.cjs +87 -52
  65. package/dist/classes/ticker/ZoomTicker.js +7 -7
  66. package/dist/classes/ticker/index.cjs +87 -52
  67. package/dist/classes/ticker/index.js +7 -7
  68. package/dist/constants.cjs +1 -1
  69. package/dist/constants.d.cts +1 -1
  70. package/dist/constants.d.ts +1 -1
  71. package/dist/constants.js +5 -5
  72. package/dist/decorators/canvas-element-decorator.cjs +87 -52
  73. package/dist/decorators/canvas-element-decorator.d.cts +1 -1
  74. package/dist/decorators/canvas-element-decorator.d.ts +1 -1
  75. package/dist/decorators/canvas-element-decorator.js +7 -7
  76. package/dist/decorators/event-decorator.d.cts +1 -1
  77. package/dist/decorators/event-decorator.d.ts +1 -1
  78. package/dist/decorators/index.cjs +87 -52
  79. package/dist/decorators/index.d.cts +1 -1
  80. package/dist/decorators/index.d.ts +1 -1
  81. package/dist/decorators/index.js +7 -7
  82. package/dist/decorators/label-decorator.cjs +87 -52
  83. package/dist/decorators/label-decorator.js +7 -7
  84. package/dist/functions/canvas/canvas-effect.cjs +87 -52
  85. package/dist/functions/canvas/canvas-effect.js +7 -7
  86. package/dist/functions/canvas/canvas-memory-utility.cjs +87 -52
  87. package/dist/functions/canvas/canvas-memory-utility.d.cts +1 -1
  88. package/dist/functions/canvas/canvas-memory-utility.d.ts +1 -1
  89. package/dist/functions/canvas/canvas-memory-utility.js +7 -7
  90. package/dist/functions/canvas/canvas-transition.cjs +87 -52
  91. package/dist/functions/canvas/canvas-transition.d.cts +1 -1
  92. package/dist/functions/canvas/canvas-transition.d.ts +1 -1
  93. package/dist/functions/canvas/canvas-transition.js +7 -7
  94. package/dist/functions/canvas/canvas-utility.cjs +87 -52
  95. package/dist/functions/canvas/canvas-utility.js +7 -7
  96. package/dist/functions/canvas/image-container-utility.cjs +90 -54
  97. package/dist/functions/canvas/image-container-utility.d.cts +5 -3
  98. package/dist/functions/canvas/image-container-utility.d.ts +5 -3
  99. package/dist/functions/canvas/image-container-utility.js +7 -7
  100. package/dist/functions/canvas/image-utility.cjs +88 -34
  101. package/dist/functions/canvas/image-utility.d.cts +5 -3
  102. package/dist/functions/canvas/image-utility.d.ts +5 -3
  103. package/dist/functions/canvas/image-utility.js +7 -7
  104. package/dist/functions/canvas/video-utility.cjs +97 -54
  105. package/dist/functions/canvas/video-utility.d.cts +5 -3
  106. package/dist/functions/canvas/video-utility.d.ts +5 -3
  107. package/dist/functions/canvas/video-utility.js +7 -7
  108. package/dist/functions/dialogue-utility.cjs +87 -52
  109. package/dist/functions/dialogue-utility.js +7 -7
  110. package/dist/functions/flags-utility.cjs +87 -52
  111. package/dist/functions/flags-utility.js +7 -7
  112. package/dist/functions/game-utility.cjs +87 -52
  113. package/dist/functions/game-utility.js +7 -7
  114. package/dist/functions/index.cjs +101 -38
  115. package/dist/functions/index.d.cts +1 -1
  116. package/dist/functions/index.d.ts +1 -1
  117. package/dist/functions/index.js +7 -7
  118. package/dist/functions/saves-utility.cjs +87 -52
  119. package/dist/functions/saves-utility.d.cts +1 -1
  120. package/dist/functions/saves-utility.d.ts +1 -1
  121. package/dist/functions/saves-utility.js +7 -7
  122. package/dist/functions/sound-utility.js +4 -4
  123. package/dist/functions/texture-utility.cjs +87 -52
  124. package/dist/functions/texture-utility.d.cts +1 -1
  125. package/dist/functions/texture-utility.d.ts +1 -1
  126. package/dist/functions/texture-utility.js +7 -7
  127. package/dist/index.cjs +104 -41
  128. package/dist/index.d.cts +1 -1
  129. package/dist/index.d.ts +1 -1
  130. package/dist/index.js +7 -7
  131. package/dist/interface/HistoryStep.d.cts +1 -1
  132. package/dist/interface/HistoryStep.d.ts +1 -1
  133. package/dist/interface/SaveData.d.cts +1 -1
  134. package/dist/interface/SaveData.d.ts +1 -1
  135. package/dist/interface/canvas/canvas-memory.d.cts +1 -1
  136. package/dist/interface/canvas/canvas-memory.d.ts +1 -1
  137. package/dist/interface/canvas/canvas-options.d.cts +1 -1
  138. package/dist/interface/canvas/canvas-options.d.ts +1 -1
  139. package/dist/interface/export/ExportedCanvas.d.cts +1 -1
  140. package/dist/interface/export/ExportedCanvas.d.ts +1 -1
  141. package/dist/interface/export/ExportedStep.d.cts +1 -1
  142. package/dist/interface/export/ExportedStep.d.ts +1 -1
  143. package/dist/interface/index.d.cts +1 -1
  144. package/dist/interface/index.d.ts +1 -1
  145. package/dist/labels/BaseCanvasElementTestLabel.cjs +87 -52
  146. package/dist/labels/BaseCanvasElementTestLabel.js +7 -7
  147. package/dist/labels/CanvasEventsTestLabel.cjs +87 -52
  148. package/dist/labels/CanvasEventsTestLabel.d.cts +1 -1
  149. package/dist/labels/CanvasEventsTestLabel.d.ts +1 -1
  150. package/dist/labels/CanvasEventsTestLabel.js +7 -7
  151. package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +87 -52
  152. package/dist/labels/CustomTickerCanvasElementTestLabel.js +7 -7
  153. package/dist/labels/ImagesAnimationsTestLabel.cjs +87 -52
  154. package/dist/labels/ImagesAnimationsTestLabel.js +7 -7
  155. package/dist/labels/InputTestLabel.cjs +87 -52
  156. package/dist/labels/InputTestLabel.js +7 -7
  157. package/dist/labels/MarkdownTest.cjs +87 -52
  158. package/dist/labels/MarkdownTest.js +7 -7
  159. package/dist/labels/SoundTestLabel.cjs +87 -52
  160. package/dist/labels/SoundTestLabel.js +7 -7
  161. package/dist/labels/StartLabel.cjs +87 -52
  162. package/dist/labels/StartLabel.js +7 -7
  163. package/dist/labels/StepLabelTest.cjs +87 -52
  164. package/dist/labels/StepLabelTest.js +7 -7
  165. package/dist/labels/VideoTestLabel.cjs +87 -52
  166. package/dist/labels/VideoTestLabel.js +7 -7
  167. package/dist/labels/index.cjs +87 -52
  168. package/dist/labels/index.js +7 -7
  169. package/dist/{lib-5KZOZFFM.js → lib-EBGYUC35.js} +4 -4
  170. package/dist/managers/CanvasManager.cjs +87 -52
  171. package/dist/managers/CanvasManager.d.cts +1 -1
  172. package/dist/managers/CanvasManager.d.ts +1 -1
  173. package/dist/managers/CanvasManager.js +7 -7
  174. package/dist/managers/CanvasManagerStatic.cjs +2 -2
  175. package/dist/managers/CanvasManagerStatic.d.cts +1 -1
  176. package/dist/managers/CanvasManagerStatic.d.ts +1 -1
  177. package/dist/managers/CanvasManagerStatic.js +5 -5
  178. package/dist/managers/NarrationManager.cjs +87 -52
  179. package/dist/managers/NarrationManager.d.cts +1 -1
  180. package/dist/managers/NarrationManager.d.ts +1 -1
  181. package/dist/managers/NarrationManager.js +7 -7
  182. package/dist/managers/NarrationManagerStatic.cjs +87 -52
  183. package/dist/managers/NarrationManagerStatic.d.cts +1 -1
  184. package/dist/managers/NarrationManagerStatic.d.ts +1 -1
  185. package/dist/managers/NarrationManagerStatic.js +7 -7
  186. package/dist/managers/SoundManager.cjs +87 -52
  187. package/dist/managers/SoundManager.js +7 -7
  188. package/dist/managers/StorageManager.cjs +87 -52
  189. package/dist/managers/StorageManager.js +7 -7
  190. package/dist/managers/index.cjs +87 -52
  191. package/dist/managers/index.d.cts +1 -1
  192. package/dist/managers/index.d.ts +1 -1
  193. package/dist/managers/index.js +7 -7
  194. package/dist/types/ContainerChild.d.cts +1 -1
  195. package/dist/types/ContainerChild.d.ts +1 -1
  196. package/dist/types/StepLabelType.d.cts +6 -1
  197. package/dist/types/StepLabelType.d.ts +6 -1
  198. package/dist/types/index.d.cts +1 -1
  199. package/dist/types/index.d.ts +1 -1
  200. package/package.json +1 -1
@@ -72,6 +72,11 @@ interface ImageContainerOptions<C extends ContainerChild = ContainerChild> exten
72
72
  }
73
73
  interface ImageSpriteOptions extends SpriteOptions, AdditionalPositionsExtensionProps {
74
74
  }
75
+ interface VideoSpriteOptions extends ImageSpriteOptions {
76
+ loop?: boolean;
77
+ paused?: boolean;
78
+ currentTime?: number;
79
+ }
75
80
 
76
81
  /**
77
82
  * This class is used to create a canvas element to add into a Pixi Application.
@@ -271,4 +276,4 @@ declare function setMemoryImageSprite(element: ImageSprite, memory: ImageSpriteM
271
276
 
272
277
  type ContainerChild = Container & CanvasBaseItem<any>;
273
278
 
274
- export { CanvasBaseItem as C, ImageSprite as I, Sprite as S, type TextMemory as T, type VideoSpriteMemory as V, type CanvasBaseItemMemory as a, type ContainerMemory as b, type ImageSpriteMemory as c, type SpriteBaseMemory as d, type SpriteMemory as e, type ImageContainerMemory as f, type ImageContainerOptions as g, type ImageSpriteOptions as h, type ContainerChild as i, getMemorySprite as j, setMemoryImageSprite as k, setMemorySprite as s };
279
+ export { CanvasBaseItem as C, ImageSprite as I, Sprite as S, type TextMemory as T, type VideoSpriteMemory as V, type CanvasBaseItemMemory as a, type ContainerMemory as b, type ImageSpriteMemory as c, type SpriteBaseMemory as d, type SpriteMemory as e, type ImageContainerMemory as f, type ImageContainerOptions as g, type ImageSpriteOptions as h, type VideoSpriteOptions as i, type ContainerChild as j, getMemorySprite as k, setMemoryImageSprite as l, setMemorySprite as s };
@@ -72,6 +72,11 @@ interface ImageContainerOptions<C extends ContainerChild = ContainerChild> exten
72
72
  }
73
73
  interface ImageSpriteOptions extends SpriteOptions, AdditionalPositionsExtensionProps {
74
74
  }
75
+ interface VideoSpriteOptions extends ImageSpriteOptions {
76
+ loop?: boolean;
77
+ paused?: boolean;
78
+ currentTime?: number;
79
+ }
75
80
 
76
81
  /**
77
82
  * This class is used to create a canvas element to add into a Pixi Application.
@@ -271,4 +276,4 @@ declare function setMemoryImageSprite(element: ImageSprite, memory: ImageSpriteM
271
276
 
272
277
  type ContainerChild = Container & CanvasBaseItem<any>;
273
278
 
274
- export { CanvasBaseItem as C, ImageSprite as I, Sprite as S, type TextMemory as T, type VideoSpriteMemory as V, type CanvasBaseItemMemory as a, type ContainerMemory as b, type ImageSpriteMemory as c, type SpriteBaseMemory as d, type SpriteMemory as e, type ImageContainerMemory as f, type ImageContainerOptions as g, type ImageSpriteOptions as h, type ContainerChild as i, getMemorySprite as j, setMemoryImageSprite as k, setMemorySprite as s };
279
+ export { CanvasBaseItem as C, ImageSprite as I, Sprite as S, type TextMemory as T, type VideoSpriteMemory as V, type CanvasBaseItemMemory as a, type ContainerMemory as b, type ImageSpriteMemory as c, type SpriteBaseMemory as d, type SpriteMemory as e, type ImageContainerMemory as f, type ImageContainerOptions as g, type ImageSpriteOptions as h, type VideoSpriteOptions as i, type ContainerChild as j, getMemorySprite as k, setMemoryImageSprite as l, setMemorySprite as s };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WebGLRenderer
3
- } from "./chunk-DWJGQ2A5.js";
4
- import "./chunk-DXOIIOAQ.js";
3
+ } from "./chunk-UWBWDBB3.js";
4
+ import "./chunk-BJGKFUMU.js";
5
5
  import "./chunk-KAHX5SKO.js";
6
6
  import "./chunk-N342G4HO.js";
7
7
  export {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  WebGPURenderer
3
- } from "./chunk-OPLBQKS2.js";
3
+ } from "./chunk-F74VVSHO.js";
4
4
  import "./chunk-XGGTEP7V.js";
5
- import "./chunk-DXOIIOAQ.js";
5
+ import "./chunk-BJGKFUMU.js";
6
6
  import "./chunk-KAHX5SKO.js";
7
7
  import "./chunk-N342G4HO.js";
8
8
  export {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-DPUSONJ3.js";
10
10
  import {
11
11
  CanvasManagerStatic
12
- } from "./chunk-3XKVLXKN.js";
12
+ } from "./chunk-LZNY6NEZ.js";
13
13
  import {
14
14
  SoundManagerStatic
15
15
  } from "./chunk-6FAGAUDR.js";
@@ -69,7 +69,7 @@ import {
69
69
  filters,
70
70
  version,
71
71
  videoFormats
72
- } from "./chunk-DQ47ST7G.js";
72
+ } from "./chunk-HCINNHUZ.js";
73
73
  import {
74
74
  Sound,
75
75
  SoundLibrary,
@@ -79,7 +79,7 @@ import {
79
79
  import {
80
80
  Assets,
81
81
  Text
82
- } from "./chunk-DZMWRZUL.js";
82
+ } from "./chunk-MQPMJVDR.js";
83
83
  import {
84
84
  FillGradient,
85
85
  TextStyle
@@ -774,6 +774,22 @@ async function setMemoryContainer(element, memory, opstions) {
774
774
  // src/classes/canvas/ImageContainer.ts
775
775
  var ImageContainer = class extends Container2 {
776
776
  constructor(options, textureAliases = []) {
777
+ options = analizePositionsExtensionProps(options);
778
+ let align = void 0;
779
+ let percentagePosition = void 0;
780
+ let anchor = void 0;
781
+ if (options && "anchor" in options && options?.anchor !== void 0) {
782
+ anchor = options.anchor;
783
+ delete options.anchor;
784
+ }
785
+ if (options && "align" in options && options?.align !== void 0) {
786
+ align = options.align;
787
+ delete options.align;
788
+ }
789
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
790
+ percentagePosition = options.percentagePosition;
791
+ delete options.percentagePosition;
792
+ }
777
793
  super(options);
778
794
  options = analizePositionsExtensionProps(options);
779
795
  if (textureAliases) {
@@ -781,14 +797,14 @@ var ImageContainer = class extends Container2 {
781
797
  this.addChild(new ImageSprite(void 0, textureAlias));
782
798
  });
783
799
  }
784
- if (options?.anchor !== void 0) {
785
- this.anchor = options.anchor;
800
+ if (anchor) {
801
+ this.anchor = anchor;
786
802
  }
787
- if (options && "align" in options && options?.align !== void 0) {
788
- this.align = options.align;
803
+ if (align) {
804
+ this.align = align;
789
805
  }
790
- if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
791
- this.percentagePosition = options.percentagePosition;
806
+ if (percentagePosition) {
807
+ this.percentagePosition = percentagePosition;
792
808
  }
793
809
  }
794
810
  get memory() {
@@ -1097,7 +1113,7 @@ function checkIfVideo(imageUrl) {
1097
1113
  }
1098
1114
 
1099
1115
  // src/functions/canvas/image-utility.ts
1100
- function addImage(alias, imageUrl) {
1116
+ function addImage(alias, imageUrl, options) {
1101
1117
  if (!imageUrl) {
1102
1118
  if (Assets.resolver.hasKey(alias)) {
1103
1119
  imageUrl = alias;
@@ -1105,8 +1121,7 @@ function addImage(alias, imageUrl) {
1105
1121
  throw new Error(`The image ${alias} does not exist in the cache.`);
1106
1122
  }
1107
1123
  }
1108
- let image = new ImageSprite();
1109
- image.textureAlias = imageUrl;
1124
+ let image = new ImageSprite(options, imageUrl);
1110
1125
  canvas.add(alias, image);
1111
1126
  return image;
1112
1127
  }
@@ -1129,14 +1144,22 @@ async function loadImage(canvasImages) {
1129
1144
  });
1130
1145
  });
1131
1146
  }
1132
- async function showImage(alias, imageUrl) {
1133
- let image = addImage(alias, imageUrl);
1147
+ async function showImage(alias, imageUrl, options) {
1148
+ if (!imageUrl) {
1149
+ if (Assets.resolver.hasKey(alias)) {
1150
+ imageUrl = alias;
1151
+ } else {
1152
+ throw new Error(`The image ${alias} does not exist in the cache.`);
1153
+ }
1154
+ }
1155
+ let image = new ImageSprite(options, imageUrl);
1134
1156
  await image.load();
1157
+ canvas.add(alias, image);
1135
1158
  return image;
1136
1159
  }
1137
1160
 
1138
1161
  // src/functions/canvas/video-utility.ts
1139
- function addVideo(alias, videoUrl) {
1162
+ function addVideo(alias, videoUrl, options) {
1140
1163
  if (!videoUrl) {
1141
1164
  if (Assets.resolver.hasKey(alias)) {
1142
1165
  videoUrl = alias;
@@ -1144,8 +1167,7 @@ function addVideo(alias, videoUrl) {
1144
1167
  throw new Error(`The video ${alias} does not exist in the cache.`);
1145
1168
  }
1146
1169
  }
1147
- let video = new VideoSprite();
1148
- video.textureAlias = videoUrl;
1170
+ let video = new VideoSprite(options, videoUrl);
1149
1171
  canvas.add(alias, video);
1150
1172
  return video;
1151
1173
  }
@@ -1168,9 +1190,17 @@ async function loadVideo(canvasVideos) {
1168
1190
  });
1169
1191
  });
1170
1192
  }
1171
- async function showVideo(alias, videoUrl) {
1172
- let video = addVideo(alias, videoUrl);
1193
+ async function showVideo(alias, videoUrl, options) {
1194
+ if (!videoUrl) {
1195
+ if (Assets.resolver.hasKey(alias)) {
1196
+ videoUrl = alias;
1197
+ } else {
1198
+ throw new Error(`The video ${alias} does not exist in the cache.`);
1199
+ }
1200
+ }
1201
+ let video = new VideoSprite(options, videoUrl);
1173
1202
  await video.load();
1203
+ canvas.add(alias, video);
1174
1204
  return video;
1175
1205
  }
1176
1206
 
@@ -1591,14 +1621,15 @@ function pushOut(alias, props = { direction: "right" }, priority) {
1591
1621
  }
1592
1622
 
1593
1623
  // src/functions/canvas/image-container-utility.ts
1594
- function addImageCointainer(alias, imageUrls) {
1595
- let container = new ImageContainer(void 0, imageUrls);
1624
+ function addImageCointainer(alias, imageUrls, options) {
1625
+ let container = new ImageContainer(options, imageUrls);
1596
1626
  canvas.add(alias, container);
1597
1627
  return container;
1598
1628
  }
1599
- async function showImageContainer(alias, imageUrls) {
1600
- let container = addImageCointainer(alias, imageUrls);
1629
+ async function showImageContainer(alias, imageUrls, options) {
1630
+ let container = new ImageContainer(options, imageUrls);
1601
1631
  await container.load();
1632
+ canvas.add(alias, container);
1602
1633
  return container;
1603
1634
  }
1604
1635
 
@@ -3679,7 +3710,7 @@ var NarrationManager = class {
3679
3710
  canvas.forceCompletionOfReportedTickers();
3680
3711
  }
3681
3712
  NarrationManagerStatic.stepsRunning++;
3682
- let result = await step(props);
3713
+ let result = await step(props, { labelId: currentLabel.id });
3683
3714
  if (this.choiceMenuOptions?.length === 1 && this.choiceMenuOptions[0].autoSelect) {
3684
3715
  let choice = this.choiceMenuOptions[0];
3685
3716
  result = await this.selectChoice(choice, props);
@@ -3714,14 +3745,14 @@ var NarrationManager = class {
3714
3745
  } else if (this.openedLabels.length === 1) {
3715
3746
  NarrationManagerStatic.restoreLastLabelList();
3716
3747
  if (this.onGameEnd) {
3717
- return await this.onGameEnd(props);
3748
+ return await this.onGameEnd(props, { labelId: "end" });
3718
3749
  }
3719
3750
  return;
3720
3751
  }
3721
3752
  } else if (this.openedLabels.length === 0) {
3722
3753
  NarrationManagerStatic.restoreLastLabelList();
3723
3754
  if (this.onGameEnd) {
3724
- return await this.onGameEnd(props);
3755
+ return await this.onGameEnd(props, { labelId: "end" });
3725
3756
  }
3726
3757
  console.error("[Pixi\u2019VN] The end of the game is not managed, so the game is blocked. Read this documentation to know how to manage the end of the game: https://pixi-vn.web.app/start/other-narrative-features.html#how-manage-the-end-of-the-game");
3727
3758
  return;
@@ -5350,13 +5381,8 @@ var imagesAnimationsTest = newLabel(IMAGE_ANIMAIONS_TEST_LABEL, [
5350
5381
  flowerTop.x = 300;
5351
5382
  flowerTop.y = 100;
5352
5383
  flowerTop.load();
5353
- let helmlok = addImage("helmlok", helmlokImage);
5354
- helmlok.x = 100;
5355
- helmlok.y = 300;
5356
- let skully = addImage("skully", skullyImage);
5357
- skully.x = 300;
5358
- skully.y = 300;
5359
- await loadImage([helmlok, skully]);
5384
+ showImage("helmlok", helmlokImage, { x: 100, y: 300 });
5385
+ showImage("skully", skullyImage, { xAlign: 0.5, yAlign: 0.5 });
5360
5386
  },
5361
5387
  async () => {
5362
5388
  narration.dialogue = { character: juliette, text: "Here's what they can do." };
@@ -6280,16 +6306,26 @@ function calculatePercentagePosition(type, percentage) {
6280
6306
  var ImageSprite = class _ImageSprite extends Sprite2 {
6281
6307
  pixivnId = CANVAS_IMAGE_ID;
6282
6308
  constructor(options, textureAlias) {
6283
- super(options);
6284
6309
  options = analizePositionsExtensionProps(options);
6310
+ let align = void 0;
6311
+ let percentagePosition = void 0;
6312
+ if (options && "align" in options && options?.align !== void 0) {
6313
+ align = options.align;
6314
+ delete options.align;
6315
+ }
6316
+ if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
6317
+ percentagePosition = options.percentagePosition;
6318
+ delete options.percentagePosition;
6319
+ }
6320
+ super(options);
6285
6321
  if (textureAlias) {
6286
6322
  this.textureAlias = textureAlias;
6287
6323
  }
6288
- if (options && "align" in options && options?.align !== void 0) {
6289
- this.align = options.align;
6324
+ if (align) {
6325
+ this.align = align;
6290
6326
  }
6291
- if (options && "percentagePosition" in options && options?.percentagePosition !== void 0) {
6292
- this.percentagePosition = options.percentagePosition;
6327
+ if (percentagePosition) {
6328
+ this.percentagePosition = percentagePosition;
6293
6329
  }
6294
6330
  }
6295
6331
  get memory() {
@@ -6461,6 +6497,33 @@ async function setMemoryImageSprite(element, memory, options) {
6461
6497
 
6462
6498
  // src/classes/canvas/VideoSprite.ts
6463
6499
  var VideoSprite = class _VideoSprite extends ImageSprite {
6500
+ constructor(options, textureAlias) {
6501
+ let loop = void 0;
6502
+ let paused = void 0;
6503
+ let currentTime = void 0;
6504
+ if (options && "loop" in options && options?.loop !== void 0) {
6505
+ loop = options.loop;
6506
+ delete options.loop;
6507
+ }
6508
+ if (options && "paused" in options && options?.paused !== void 0) {
6509
+ paused = options.paused;
6510
+ delete options.paused;
6511
+ }
6512
+ if (options && "currentTime" in options && options?.currentTime !== void 0) {
6513
+ currentTime = options.currentTime;
6514
+ delete options.currentTime;
6515
+ }
6516
+ super(options, textureAlias);
6517
+ if (loop) {
6518
+ this.loop = loop;
6519
+ }
6520
+ if (paused) {
6521
+ this.paused = paused;
6522
+ }
6523
+ if (currentTime) {
6524
+ this.currentTime = currentTime;
6525
+ }
6526
+ }
6464
6527
  pixivnId = CANVAS_VIDEO_ID;
6465
6528
  get memory() {
6466
6529
  return {
@@ -1152,7 +1152,7 @@ SpritePipe.extension = {
1152
1152
 
1153
1153
  // node_modules/pixi.js/lib/utils/const.mjs
1154
1154
  var DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;
1155
- var VERSION = "8.6.5";
1155
+ var VERSION = "8.6.6";
1156
1156
 
1157
1157
  // node_modules/pixi.js/lib/utils/global/globalHooks.mjs
1158
1158
  var ApplicationInitHook = class {
@@ -2538,7 +2538,7 @@ var _RenderableGCSystem = class _RenderableGCSystem2 {
2538
2538
  if (!renderable.destroyed) {
2539
2539
  const rp = renderPipes;
2540
2540
  if (renderGroup)
2541
- renderGroup.structureDidChange = false;
2541
+ renderGroup.structureDidChange = true;
2542
2542
  rp[renderable.renderPipeId].destroyRenderable(renderable);
2543
2543
  }
2544
2544
  renderable._lastUsed = -1;
@@ -15,7 +15,7 @@ import {
15
15
  ensureAttributes,
16
16
  textureBit,
17
17
  uboSyncFunctionsWGSL
18
- } from "./chunk-DXOIIOAQ.js";
18
+ } from "./chunk-BJGKFUMU.js";
19
19
  import {
20
20
  BindGroup,
21
21
  Buffer,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-X55ALTH7.js";
4
4
 
5
5
  // package.json
6
- var version = "0.9.8";
6
+ var version = "0.9.10";
7
7
 
8
8
  // src/constants.ts
9
9
  var Repeat = "repeat";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ZBUW3MBH.js";
4
4
  import {
5
5
  Application
6
- } from "./chunk-DZMWRZUL.js";
6
+ } from "./chunk-MQPMJVDR.js";
7
7
  import {
8
8
  require_sha1
9
9
  } from "./chunk-IILCLBL2.js";
@@ -18,7 +18,7 @@ async function i(p) {
18
18
  importPixi: false,
19
19
  ...p
20
20
  };
21
- e.app && (e.renderer = e.app.renderer, e.stage = e.app.stage), e.importPixi && !e.pixi && (e.pixi = await import("./lib-5KZOZFFM.js")), window.__PIXI_DEVTOOLS__ = {
21
+ e.app && (e.renderer = e.app.renderer, e.stage = e.app.stage), e.importPixi && !e.pixi && (e.pixi = await import("./lib-EBGYUC35.js")), window.__PIXI_DEVTOOLS__ = {
22
22
  ...window.__PIXI_DEVTOOLS__ || {},
23
23
  app: e.app,
24
24
  stage: e.stage,
@@ -37,7 +37,7 @@ import {
37
37
  AbstractRenderer,
38
38
  ApplicationInitHook,
39
39
  Filter
40
- } from "./chunk-DXOIIOAQ.js";
40
+ } from "./chunk-BJGKFUMU.js";
41
41
  import {
42
42
  Bounds,
43
43
  Buffer,
@@ -5988,14 +5988,14 @@ async function autoDetectRenderer(options) {
5988
5988
  for (let i = 0; i < preferredOrder.length; i++) {
5989
5989
  const rendererType = preferredOrder[i];
5990
5990
  if (rendererType === "webgpu" && await isWebGPUSupported()) {
5991
- const { WebGPURenderer: WebGPURenderer2 } = await import("./WebGPURenderer-LEKL575M.js");
5991
+ const { WebGPURenderer: WebGPURenderer2 } = await import("./WebGPURenderer-46NKQGBG.js");
5992
5992
  RendererClass = WebGPURenderer2;
5993
5993
  finalOptions = { ...options, ...options.webgpu };
5994
5994
  break;
5995
5995
  } else if (rendererType === "webgl" && isWebGLSupported(
5996
5996
  options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
5997
5997
  )) {
5998
- const { WebGLRenderer: WebGLRenderer2 } = await import("./WebGLRenderer-EFHDNV22.js");
5998
+ const { WebGLRenderer: WebGLRenderer2 } = await import("./WebGLRenderer-CWVLYTYY.js");
5999
5999
  RendererClass = WebGLRenderer2;
6000
6000
  finalOptions = { ...options, ...options.webgl };
6001
6001
  break;
@@ -12,7 +12,7 @@ import {
12
12
  textureBitGl,
13
13
  uboSyncFunctionsSTD40,
14
14
  uniformParsers
15
- } from "./chunk-DXOIIOAQ.js";
15
+ } from "./chunk-BJGKFUMU.js";
16
16
  import {
17
17
  BufferUsage,
18
18
  CanvasSource,