@drincs/pixi-vn 0.9.7 → 0.9.8

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 (219) hide show
  1. package/dist/{ContainerChild-B5yD0BI8.d.ts → ContainerChild-AjuVp3wW.d.ts} +4 -1
  2. package/dist/{ContainerChild-WzyxEjAc.d.cts → ContainerChild-BUFxM6Ya.d.cts} +4 -1
  3. package/dist/WebGLRenderer-EFHDNV22.js +9 -0
  4. package/dist/WebGPURenderer-LEKL575M.js +10 -0
  5. package/dist/{browserAll-2HD5EH7K.js → browserAll-S4EPEXZD.js} +5 -5
  6. package/dist/{chunk-WNOARCWH.js → chunk-3XKVLXKN.js} +2 -2
  7. package/dist/{chunk-PP5T5HEO.js → chunk-52ZSR3AN.js} +1 -1
  8. package/dist/{chunk-SAUNZQHZ.js → chunk-D753T42C.js} +1 -1
  9. package/dist/{chunk-TOG67Z7Q.js → chunk-DQ47ST7G.js} +2 -2
  10. package/dist/{chunk-73ID6GAW.js → chunk-DWJGQ2A5.js} +2 -2
  11. package/dist/{chunk-5VX2VTDZ.js → chunk-DXOIIOAQ.js} +81 -27
  12. package/dist/{chunk-Z3NBKYVU.js → chunk-DZMWRZUL.js} +10 -9
  13. package/dist/{chunk-NB4Q3GFK.js → chunk-FXH7A6UR.js} +224 -53
  14. package/dist/{chunk-6GJXIPNB.js → chunk-GEY6RTYO.js} +1 -1
  15. package/dist/{chunk-CAWOWL3P.js → chunk-IG7HSAEJ.js} +75 -34
  16. package/dist/{chunk-PP3SBC3C.js → chunk-KAHX5SKO.js} +18 -15
  17. package/dist/{chunk-ODIEVSQX.js → chunk-OPLBQKS2.js} +3 -3
  18. package/dist/{chunk-Y3WNBACN.js → chunk-R4J2U4HN.js} +2 -2
  19. package/dist/{chunk-WS3FY4Q6.js → chunk-X55ALTH7.js} +2 -2
  20. package/dist/{chunk-5JREOVCG.js → chunk-XGGTEP7V.js} +1 -1
  21. package/dist/classes/CharacterBaseModel.cjs +397 -248
  22. package/dist/classes/CharacterBaseModel.js +14 -15
  23. package/dist/classes/CharacterStoredClass.cjs +397 -248
  24. package/dist/classes/CharacterStoredClass.js +14 -15
  25. package/dist/classes/ChoiceMenuOption.cjs +325 -178
  26. package/dist/classes/ChoiceMenuOption.js +14 -15
  27. package/dist/classes/Sound.cjs +397 -248
  28. package/dist/classes/Sound.js +14 -15
  29. package/dist/classes/StoredClassModel.cjs +397 -248
  30. package/dist/classes/StoredClassModel.js +14 -15
  31. package/dist/classes/canvas/AdditionalPositions.cjs +39323 -963
  32. package/dist/classes/canvas/AdditionalPositions.d.cts +3 -1
  33. package/dist/classes/canvas/AdditionalPositions.d.ts +3 -1
  34. package/dist/classes/canvas/AdditionalPositions.js +41 -10
  35. package/dist/classes/canvas/AnchorExtension.cjs +92 -48
  36. package/dist/classes/canvas/AnchorExtension.js +8 -8
  37. package/dist/classes/canvas/CanvasBaseItem.cjs +92 -48
  38. package/dist/classes/canvas/CanvasBaseItem.d.cts +1 -1
  39. package/dist/classes/canvas/CanvasBaseItem.d.ts +1 -1
  40. package/dist/classes/canvas/CanvasBaseItem.js +9 -9
  41. package/dist/classes/canvas/Container.cjs +389 -242
  42. package/dist/classes/canvas/Container.d.cts +1 -1
  43. package/dist/classes/canvas/Container.d.ts +1 -1
  44. package/dist/classes/canvas/Container.js +14 -15
  45. package/dist/classes/canvas/ImageContainer.cjs +325 -176
  46. package/dist/classes/canvas/ImageContainer.d.cts +1 -1
  47. package/dist/classes/canvas/ImageContainer.d.ts +1 -1
  48. package/dist/classes/canvas/ImageContainer.js +14 -15
  49. package/dist/classes/canvas/ImageSprite.cjs +3041 -2892
  50. package/dist/classes/canvas/ImageSprite.d.cts +1 -1
  51. package/dist/classes/canvas/ImageSprite.d.ts +1 -1
  52. package/dist/classes/canvas/ImageSprite.js +14 -15
  53. package/dist/classes/canvas/Sprite.cjs +397 -252
  54. package/dist/classes/canvas/Sprite.d.cts +1 -1
  55. package/dist/classes/canvas/Sprite.d.ts +1 -1
  56. package/dist/classes/canvas/Sprite.js +14 -15
  57. package/dist/classes/canvas/Text.cjs +319 -172
  58. package/dist/classes/canvas/Text.d.cts +1 -1
  59. package/dist/classes/canvas/Text.d.ts +1 -1
  60. package/dist/classes/canvas/Text.js +14 -15
  61. package/dist/classes/canvas/VideoSprite.cjs +3038 -2887
  62. package/dist/classes/canvas/VideoSprite.d.cts +4 -2
  63. package/dist/classes/canvas/VideoSprite.d.ts +4 -2
  64. package/dist/classes/canvas/VideoSprite.js +14 -15
  65. package/dist/classes/index.cjs +399 -252
  66. package/dist/classes/index.d.cts +1 -1
  67. package/dist/classes/index.d.ts +1 -1
  68. package/dist/classes/index.js +14 -15
  69. package/dist/classes/ticker/FadeAlphaTicker.cjs +325 -178
  70. package/dist/classes/ticker/FadeAlphaTicker.js +14 -15
  71. package/dist/classes/ticker/MoveTicker.cjs +3563 -3418
  72. package/dist/classes/ticker/MoveTicker.js +14 -15
  73. package/dist/classes/ticker/RotateTicker.cjs +325 -178
  74. package/dist/classes/ticker/RotateTicker.js +14 -15
  75. package/dist/classes/ticker/TickerBase.cjs +397 -248
  76. package/dist/classes/ticker/TickerBase.js +14 -15
  77. package/dist/classes/ticker/ZoomTicker.cjs +325 -178
  78. package/dist/classes/ticker/ZoomTicker.js +14 -15
  79. package/dist/classes/ticker/index.cjs +397 -252
  80. package/dist/classes/ticker/index.js +14 -15
  81. package/dist/constants.cjs +93 -49
  82. package/dist/constants.d.cts +1 -1
  83. package/dist/constants.d.ts +1 -1
  84. package/dist/constants.js +10 -10
  85. package/dist/decorators/canvas-element-decorator.cjs +389 -242
  86. package/dist/decorators/canvas-element-decorator.d.cts +1 -1
  87. package/dist/decorators/canvas-element-decorator.d.ts +1 -1
  88. package/dist/decorators/canvas-element-decorator.js +14 -15
  89. package/dist/decorators/event-decorator.d.cts +1 -1
  90. package/dist/decorators/event-decorator.d.ts +1 -1
  91. package/dist/decorators/index.cjs +325 -178
  92. package/dist/decorators/index.d.cts +1 -1
  93. package/dist/decorators/index.d.ts +1 -1
  94. package/dist/decorators/index.js +14 -15
  95. package/dist/decorators/label-decorator.cjs +397 -250
  96. package/dist/decorators/label-decorator.js +14 -15
  97. package/dist/functions/canvas/canvas-effect.cjs +394 -247
  98. package/dist/functions/canvas/canvas-effect.js +14 -15
  99. package/dist/functions/canvas/canvas-memory-utility.cjs +389 -242
  100. package/dist/functions/canvas/canvas-memory-utility.d.cts +1 -1
  101. package/dist/functions/canvas/canvas-memory-utility.d.ts +1 -1
  102. package/dist/functions/canvas/canvas-memory-utility.js +14 -15
  103. package/dist/functions/canvas/canvas-transition.cjs +397 -250
  104. package/dist/functions/canvas/canvas-transition.d.cts +1 -1
  105. package/dist/functions/canvas/canvas-transition.d.ts +1 -1
  106. package/dist/functions/canvas/canvas-transition.js +14 -15
  107. package/dist/functions/canvas/canvas-utility.cjs +397 -248
  108. package/dist/functions/canvas/canvas-utility.js +14 -15
  109. package/dist/functions/canvas/image-container-utility.cjs +397 -250
  110. package/dist/functions/canvas/image-container-utility.d.cts +1 -1
  111. package/dist/functions/canvas/image-container-utility.d.ts +1 -1
  112. package/dist/functions/canvas/image-container-utility.js +14 -15
  113. package/dist/functions/canvas/image-utility.cjs +397 -250
  114. package/dist/functions/canvas/image-utility.d.cts +1 -1
  115. package/dist/functions/canvas/image-utility.d.ts +1 -1
  116. package/dist/functions/canvas/image-utility.js +14 -15
  117. package/dist/functions/canvas/video-utility.cjs +4682 -4531
  118. package/dist/functions/canvas/video-utility.d.cts +1 -1
  119. package/dist/functions/canvas/video-utility.d.ts +1 -1
  120. package/dist/functions/canvas/video-utility.js +14 -15
  121. package/dist/functions/dialogue-utility.cjs +397 -248
  122. package/dist/functions/dialogue-utility.js +14 -15
  123. package/dist/functions/flags-utility.cjs +397 -248
  124. package/dist/functions/flags-utility.js +14 -15
  125. package/dist/functions/game-utility.cjs +397 -248
  126. package/dist/functions/game-utility.js +14 -15
  127. package/dist/functions/index.cjs +397 -252
  128. package/dist/functions/index.d.cts +1 -1
  129. package/dist/functions/index.d.ts +1 -1
  130. package/dist/functions/index.js +14 -15
  131. package/dist/functions/saves-utility.cjs +397 -248
  132. package/dist/functions/saves-utility.d.cts +1 -1
  133. package/dist/functions/saves-utility.d.ts +1 -1
  134. package/dist/functions/saves-utility.js +14 -15
  135. package/dist/functions/sound-utility.cjs +92 -48
  136. package/dist/functions/sound-utility.js +10 -10
  137. package/dist/functions/texture-utility.cjs +319 -172
  138. package/dist/functions/texture-utility.d.cts +1 -1
  139. package/dist/functions/texture-utility.d.ts +1 -1
  140. package/dist/functions/texture-utility.js +14 -15
  141. package/dist/index.cjs +268 -121
  142. package/dist/index.d.cts +1 -1
  143. package/dist/index.d.ts +1 -1
  144. package/dist/index.js +14 -15
  145. package/dist/interface/HistoryStep.d.cts +1 -1
  146. package/dist/interface/HistoryStep.d.ts +1 -1
  147. package/dist/interface/SaveData.d.cts +1 -1
  148. package/dist/interface/SaveData.d.ts +1 -1
  149. package/dist/interface/canvas/canvas-memory.d.cts +1 -1
  150. package/dist/interface/canvas/canvas-memory.d.ts +1 -1
  151. package/dist/interface/canvas/canvas-options.d.cts +1 -1
  152. package/dist/interface/canvas/canvas-options.d.ts +1 -1
  153. package/dist/interface/export/ExportedCanvas.d.cts +1 -1
  154. package/dist/interface/export/ExportedCanvas.d.ts +1 -1
  155. package/dist/interface/export/ExportedStep.d.cts +1 -1
  156. package/dist/interface/export/ExportedStep.d.ts +1 -1
  157. package/dist/interface/index.d.cts +1 -1
  158. package/dist/interface/index.d.ts +1 -1
  159. package/dist/labels/BaseCanvasElementTestLabel.cjs +397 -250
  160. package/dist/labels/BaseCanvasElementTestLabel.js +14 -15
  161. package/dist/labels/CanvasEventsTestLabel.cjs +397 -250
  162. package/dist/labels/CanvasEventsTestLabel.d.cts +1 -1
  163. package/dist/labels/CanvasEventsTestLabel.d.ts +1 -1
  164. package/dist/labels/CanvasEventsTestLabel.js +14 -15
  165. package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +268 -121
  166. package/dist/labels/CustomTickerCanvasElementTestLabel.js +14 -15
  167. package/dist/labels/ImagesAnimationsTestLabel.cjs +397 -250
  168. package/dist/labels/ImagesAnimationsTestLabel.js +14 -15
  169. package/dist/labels/InputTestLabel.cjs +325 -178
  170. package/dist/labels/InputTestLabel.js +14 -15
  171. package/dist/labels/MarkdownTest.cjs +325 -178
  172. package/dist/labels/MarkdownTest.js +14 -15
  173. package/dist/labels/SoundTestLabel.cjs +325 -178
  174. package/dist/labels/SoundTestLabel.js +14 -15
  175. package/dist/labels/StartLabel.cjs +397 -250
  176. package/dist/labels/StartLabel.js +14 -15
  177. package/dist/labels/StepLabelTest.cjs +325 -178
  178. package/dist/labels/StepLabelTest.js +14 -15
  179. package/dist/labels/VideoTestLabel.cjs +325 -178
  180. package/dist/labels/VideoTestLabel.js +14 -15
  181. package/dist/labels/index.cjs +397 -250
  182. package/dist/labels/index.js +14 -15
  183. package/dist/{lib-6FCVILMQ.js → lib-5KZOZFFM.js} +8 -8
  184. package/dist/managers/CanvasManager.cjs +397 -248
  185. package/dist/managers/CanvasManager.d.cts +1 -1
  186. package/dist/managers/CanvasManager.d.ts +1 -1
  187. package/dist/managers/CanvasManager.js +14 -15
  188. package/dist/managers/CanvasManagerStatic.cjs +176 -77
  189. package/dist/managers/CanvasManagerStatic.d.cts +1 -1
  190. package/dist/managers/CanvasManagerStatic.d.ts +1 -1
  191. package/dist/managers/CanvasManagerStatic.js +9 -9
  192. package/dist/managers/NarrationManager.cjs +397 -248
  193. package/dist/managers/NarrationManager.d.cts +2 -1
  194. package/dist/managers/NarrationManager.d.ts +2 -1
  195. package/dist/managers/NarrationManager.js +14 -15
  196. package/dist/managers/NarrationManagerStatic.cjs +397 -248
  197. package/dist/managers/NarrationManagerStatic.d.cts +1 -1
  198. package/dist/managers/NarrationManagerStatic.d.ts +1 -1
  199. package/dist/managers/NarrationManagerStatic.js +14 -15
  200. package/dist/managers/SoundManager.cjs +397 -248
  201. package/dist/managers/SoundManager.js +14 -15
  202. package/dist/managers/StorageManager.cjs +397 -248
  203. package/dist/managers/StorageManager.js +14 -15
  204. package/dist/managers/index.cjs +397 -248
  205. package/dist/managers/index.d.cts +1 -1
  206. package/dist/managers/index.d.ts +1 -1
  207. package/dist/managers/index.js +14 -15
  208. package/dist/types/ContainerChild.d.cts +1 -1
  209. package/dist/types/ContainerChild.d.ts +1 -1
  210. package/dist/types/index.d.cts +1 -1
  211. package/dist/types/index.d.ts +1 -1
  212. package/dist/types/ticker/MoveTickerProps.d.cts +8 -0
  213. package/dist/types/ticker/MoveTickerProps.d.ts +8 -0
  214. package/dist/webworkerAll-XFBJBJMM.js +5 -0
  215. package/package.json +1 -1
  216. package/dist/WebGLRenderer-U57ZOBH6.js +0 -9
  217. package/dist/WebGPURenderer-EYIZ7IXV.js +0 -10
  218. package/dist/chunk-IRUKNG2Y.js +0 -130
  219. package/dist/webworkerAll-GSRT3S6X.js +0 -5
@@ -1,7 +1,7 @@
1
1
  import SaveData from '../interface/SaveData.cjs';
2
2
  import '../interface/export/ExportedCanvas.cjs';
3
3
  import '../types/PauseTickerType.cjs';
4
- import '../ContainerChild-WzyxEjAc.cjs';
4
+ import '../ContainerChild-BUFxM6Ya.cjs';
5
5
  import 'pixi.js';
6
6
  import '../classes/canvas/AdditionalPositions.cjs';
7
7
  import '../interface/canvas/TextureMemory.cjs';
@@ -1,7 +1,7 @@
1
1
  import SaveData from '../interface/SaveData.js';
2
2
  import '../interface/export/ExportedCanvas.js';
3
3
  import '../types/PauseTickerType.js';
4
- import '../ContainerChild-B5yD0BI8.js';
4
+ import '../ContainerChild-AjuVp3wW.js';
5
5
  import 'pixi.js';
6
6
  import '../classes/canvas/AdditionalPositions.js';
7
7
  import '../interface/canvas/TextureMemory.js';
@@ -4,20 +4,19 @@ import {
4
4
  jsonToSaveData,
5
5
  loadSaveData,
6
6
  loadSaveJson
7
- } from "../chunk-NB4Q3GFK.js";
7
+ } from "../chunk-FXH7A6UR.js";
8
8
  import "../chunk-OMPJ74CO.js";
9
9
  import "../chunk-2JGQWY5I.js";
10
10
  import "../chunk-2BUPSB7O.js";
11
- import "../chunk-IRUKNG2Y.js";
12
- import "../chunk-6GJXIPNB.js";
11
+ import "../chunk-GEY6RTYO.js";
13
12
  import "../chunk-I6TNJEE3.js";
14
13
  import "../chunk-DPUSONJ3.js";
15
- import "../chunk-WNOARCWH.js";
14
+ import "../chunk-3XKVLXKN.js";
16
15
  import "../chunk-6FAGAUDR.js";
17
16
  import "../chunk-RI37WOHP.js";
18
17
  import "../chunk-ETZISN54.js";
19
18
  import "../chunk-VXCA724Z.js";
20
- import "../chunk-PP5T5HEO.js";
19
+ import "../chunk-52ZSR3AN.js";
21
20
  import "../chunk-ZZLQ3ILH.js";
22
21
  import "../chunk-JTQGULTR.js";
23
22
  import "../chunk-FHNQBWIZ.js";
@@ -25,16 +24,16 @@ import "../chunk-ZBUW3MBH.js";
25
24
  import "../chunk-PIYIZHZL.js";
26
25
  import "../chunk-B7XQM2BB.js";
27
26
  import "../chunk-LEMOIFSV.js";
28
- import "../chunk-TOG67Z7Q.js";
29
- import "../chunk-WS3FY4Q6.js";
30
- import "../chunk-Z3NBKYVU.js";
31
- import "../chunk-SAUNZQHZ.js";
32
- import "../chunk-CAWOWL3P.js";
33
- import "../chunk-ODIEVSQX.js";
34
- import "../chunk-5JREOVCG.js";
35
- import "../chunk-73ID6GAW.js";
36
- import "../chunk-5VX2VTDZ.js";
37
- import "../chunk-PP3SBC3C.js";
27
+ import "../chunk-DQ47ST7G.js";
28
+ import "../chunk-X55ALTH7.js";
29
+ import "../chunk-DZMWRZUL.js";
30
+ import "../chunk-D753T42C.js";
31
+ import "../chunk-IG7HSAEJ.js";
32
+ import "../chunk-OPLBQKS2.js";
33
+ import "../chunk-XGGTEP7V.js";
34
+ import "../chunk-DWJGQ2A5.js";
35
+ import "../chunk-DXOIIOAQ.js";
36
+ import "../chunk-KAHX5SKO.js";
38
37
  import "../chunk-HKAY3U4R.js";
39
38
  import "../chunk-SJIEQTBV.js";
40
39
  import "../chunk-CBG6JWY4.js";
@@ -2491,22 +2491,25 @@ var init_Rectangle = __esm({
2491
2491
  * @param x - The X coordinate of the point to test
2492
2492
  * @param y - The Y coordinate of the point to test
2493
2493
  * @param strokeWidth - The width of the line to check
2494
+ * @param alignment - The alignment of the stroke, 0.5 by default
2494
2495
  * @returns Whether the x/y coordinates are within this rectangle
2495
2496
  */
2496
- strokeContains(x2, y2, strokeWidth) {
2497
+ strokeContains(x2, y2, strokeWidth, alignment = 0.5) {
2497
2498
  const { width, height } = this;
2498
2499
  if (width <= 0 || height <= 0)
2499
2500
  return false;
2500
2501
  const _x = this.x;
2501
2502
  const _y = this.y;
2502
- const outerLeft = _x - strokeWidth / 2;
2503
- const outerRight = _x + width + strokeWidth / 2;
2504
- const outerTop = _y - strokeWidth / 2;
2505
- const outerBottom = _y + height + strokeWidth / 2;
2506
- const innerLeft = _x + strokeWidth / 2;
2507
- const innerRight = _x + width - strokeWidth / 2;
2508
- const innerTop = _y + strokeWidth / 2;
2509
- const innerBottom = _y + height - strokeWidth / 2;
2503
+ const strokeWidthOuter = strokeWidth * (1 - alignment);
2504
+ const strokeWidthInner = strokeWidth - strokeWidthOuter;
2505
+ const outerLeft = _x - strokeWidthOuter;
2506
+ const outerRight = _x + width + strokeWidthOuter;
2507
+ const outerTop = _y - strokeWidthOuter;
2508
+ const outerBottom = _y + height + strokeWidthOuter;
2509
+ const innerLeft = _x + strokeWidthInner;
2510
+ const innerRight = _x + width - strokeWidthInner;
2511
+ const innerTop = _y + strokeWidthInner;
2512
+ const innerBottom = _y + height - strokeWidthInner;
2510
2513
  return x2 >= outerLeft && x2 <= outerRight && y2 >= outerTop && y2 <= outerBottom && !(x2 > innerLeft && x2 < innerRight && y2 > innerTop && y2 < innerBottom);
2511
2514
  }
2512
2515
  /**
@@ -3627,24 +3630,22 @@ var init_toLocalGlobalMixin = __esm({
3627
3630
  });
3628
3631
 
3629
3632
  // node_modules/pixi.js/lib/rendering/renderers/shared/instructions/InstructionSet.mjs
3630
- var _tick, InstructionSet;
3633
+ var InstructionSet;
3631
3634
  var init_InstructionSet = __esm({
3632
3635
  "node_modules/pixi.js/lib/rendering/renderers/shared/instructions/InstructionSet.mjs"() {
3633
3636
  "use strict";
3634
3637
  init_uid();
3635
- _tick = 0;
3636
3638
  InstructionSet = class {
3637
3639
  constructor() {
3638
3640
  this.uid = uid("instructionSet");
3639
3641
  this.instructions = [];
3640
3642
  this.instructionSize = 0;
3641
3643
  this.renderables = [];
3642
- this.tick = 0;
3644
+ this.gcTick = 0;
3643
3645
  }
3644
3646
  /** reset the instruction set so it can be reused set size back to 0 */
3645
3647
  reset() {
3646
3648
  this.instructionSize = 0;
3647
- this.tick = _tick++;
3648
3649
  }
3649
3650
  /**
3650
3651
  * Add an instruction to the set
@@ -4803,6 +4804,7 @@ var init_RenderGroup = __esm({
4803
4804
  this.worldAlpha = 1;
4804
4805
  this.childrenToUpdate = /* @__PURE__ */ Object.create(null);
4805
4806
  this.updateTick = 0;
4807
+ this.gcTick = 0;
4806
4808
  this.childrenRenderablesToUpdate = { list: [], index: 0 };
4807
4809
  this.structureDidChange = true;
4808
4810
  this.instructionSet = new InstructionSet();
@@ -4818,7 +4820,9 @@ var init_RenderGroup = __esm({
4818
4820
  root.didChange = true;
4819
4821
  const children = root.children;
4820
4822
  for (let i2 = 0; i2 < children.length; i2++) {
4821
- this.addChild(children[i2]);
4823
+ const child = children[i2];
4824
+ child._updateFlags = 15;
4825
+ this.addChild(child);
4822
4826
  }
4823
4827
  }
4824
4828
  enableCacheAsTexture(options = {}) {
@@ -10752,8 +10756,7 @@ var init_ViewContainer = __esm({
10752
10756
  this.canBundle = true;
10753
10757
  this.allowChildren = false;
10754
10758
  this._roundPixels = 0;
10755
- this._lastUsed = 0;
10756
- this._lastInstructionTick = -1;
10759
+ this._lastUsed = -1;
10757
10760
  this._bounds = new Bounds(0, 1, 0, 0);
10758
10761
  this._boundsDirty = true;
10759
10762
  }
@@ -18050,17 +18053,18 @@ var init_Circle = __esm({
18050
18053
  * @param x - The X coordinate of the point to test
18051
18054
  * @param y - The Y coordinate of the point to test
18052
18055
  * @param width - The width of the line to check
18056
+ * @param alignment - The alignment of the stroke, 0.5 by default
18053
18057
  * @returns Whether the x/y coordinates are within this Circle
18054
18058
  */
18055
- strokeContains(x2, y2, width) {
18059
+ strokeContains(x2, y2, width, alignment = 0.5) {
18056
18060
  if (this.radius === 0)
18057
18061
  return false;
18058
18062
  const dx = this.x - x2;
18059
18063
  const dy = this.y - y2;
18060
- const r2 = this.radius;
18061
- const w2 = width / 2;
18064
+ const radius = this.radius;
18065
+ const outerWidth = (1 - alignment) * width;
18062
18066
  const distance = Math.sqrt(dx * dx + dy * dy);
18063
- return distance < r2 + w2 && distance > r2 - w2;
18067
+ return distance <= radius + outerWidth && distance > radius - (width - outerWidth);
18064
18068
  }
18065
18069
  /**
18066
18070
  * Returns the framing rectangle of the circle as a Rectangle object
@@ -18149,23 +18153,25 @@ var init_Ellipse = __esm({
18149
18153
  * Checks whether the x and y coordinates given are contained within this ellipse including stroke
18150
18154
  * @param x - The X coordinate of the point to test
18151
18155
  * @param y - The Y coordinate of the point to test
18152
- * @param width
18156
+ * @param strokeWidth - The width of the line to check
18157
+ * @param alignment - The alignment of the stroke
18153
18158
  * @returns Whether the x/y coords are within this ellipse
18154
18159
  */
18155
- strokeContains(x2, y2, width) {
18160
+ strokeContains(x2, y2, strokeWidth, alignment = 0.5) {
18156
18161
  const { halfWidth, halfHeight } = this;
18157
18162
  if (halfWidth <= 0 || halfHeight <= 0) {
18158
18163
  return false;
18159
18164
  }
18160
- const halfStrokeWidth = width / 2;
18161
- const innerA = halfWidth - halfStrokeWidth;
18162
- const innerB = halfHeight - halfStrokeWidth;
18163
- const outerA = halfWidth + halfStrokeWidth;
18164
- const outerB = halfHeight + halfStrokeWidth;
18165
+ const strokeOuterWidth = strokeWidth * (1 - alignment);
18166
+ const strokeInnerWidth = strokeWidth - strokeOuterWidth;
18167
+ const innerHorizontal = halfWidth - strokeInnerWidth;
18168
+ const innerVertical = halfHeight - strokeInnerWidth;
18169
+ const outerHorizontal = halfWidth + strokeOuterWidth;
18170
+ const outerVertical = halfHeight + strokeOuterWidth;
18165
18171
  const normalizedX = x2 - this.x;
18166
18172
  const normalizedY = y2 - this.y;
18167
- const innerEllipse = normalizedX * normalizedX / (innerA * innerA) + normalizedY * normalizedY / (innerB * innerB);
18168
- const outerEllipse = normalizedX * normalizedX / (outerA * outerA) + normalizedY * normalizedY / (outerB * outerB);
18173
+ const innerEllipse = normalizedX * normalizedX / (innerHorizontal * innerHorizontal) + normalizedY * normalizedY / (innerVertical * innerVertical);
18174
+ const outerEllipse = normalizedX * normalizedX / (outerHorizontal * outerHorizontal) + normalizedY * normalizedY / (outerVertical * outerVertical);
18169
18175
  return innerEllipse > 1 && outerEllipse <= 1;
18170
18176
  }
18171
18177
  /**
@@ -18307,11 +18313,13 @@ var init_Polygon = __esm({
18307
18313
  * @param x - The X coordinate of the point to test
18308
18314
  * @param y - The Y coordinate of the point to test
18309
18315
  * @param strokeWidth - The width of the line to check
18316
+ * @param alignment - The alignment of the stroke, 0.5 by default
18310
18317
  * @returns Whether the x/y coordinates are within this polygon
18311
18318
  */
18312
- strokeContains(x2, y2, strokeWidth) {
18313
- const halfStrokeWidth = strokeWidth / 2;
18314
- const halfStrokeWidthSqrd = halfStrokeWidth * halfStrokeWidth;
18319
+ strokeContains(x2, y2, strokeWidth, alignment = 0.5) {
18320
+ const strokeWidthSquared = strokeWidth * strokeWidth;
18321
+ const rightWidthSquared = strokeWidthSquared * (1 - alignment);
18322
+ const leftWidthSquared = strokeWidthSquared - rightWidthSquared;
18315
18323
  const { points } = this;
18316
18324
  const iterationLength = points.length - (this.closePath ? 0 : 2);
18317
18325
  for (let i2 = 0; i2 < iterationLength; i2 += 2) {
@@ -18319,8 +18327,9 @@ var init_Polygon = __esm({
18319
18327
  const y1 = points[i2 + 1];
18320
18328
  const x22 = points[(i2 + 2) % points.length];
18321
18329
  const y22 = points[(i2 + 3) % points.length];
18322
- const distanceSqrd = squaredDistanceToLineSegment(x2, y2, x1, y1, x22, y22);
18323
- if (distanceSqrd <= halfStrokeWidthSqrd) {
18330
+ const distanceSquared = squaredDistanceToLineSegment(x2, y2, x1, y1, x22, y22);
18331
+ const sign = Math.sign((x22 - x1) * (y2 - y1) - (y22 - y1) * (x2 - x1));
18332
+ if (distanceSquared <= (sign < 0 ? leftWidthSquared : rightWidthSquared)) {
18324
18333
  return true;
18325
18334
  }
18326
18335
  }
@@ -18412,11 +18421,11 @@ var init_RoundedRectangle = __esm({
18412
18421
  "node_modules/pixi.js/lib/maths/shapes/RoundedRectangle.mjs"() {
18413
18422
  "use strict";
18414
18423
  init_Rectangle();
18415
- isCornerWithinStroke = (pX, pY, cornerX, cornerY, radius, halfStrokeWidth) => {
18424
+ isCornerWithinStroke = (pX, pY, cornerX, cornerY, radius, strokeWidthInner, strokeWidthOuter) => {
18416
18425
  const dx = pX - cornerX;
18417
18426
  const dy = pY - cornerY;
18418
18427
  const distance = Math.sqrt(dx * dx + dy * dy);
18419
- return distance >= radius - halfStrokeWidth && distance <= radius + halfStrokeWidth;
18428
+ return distance >= radius - strokeWidthInner && distance <= radius + strokeWidthOuter;
18420
18429
  };
18421
18430
  RoundedRectangle = class _RoundedRectangle {
18422
18431
  /**
@@ -18518,26 +18527,60 @@ var init_RoundedRectangle = __esm({
18518
18527
  * @param pX - The X coordinate of the point to test
18519
18528
  * @param pY - The Y coordinate of the point to test
18520
18529
  * @param strokeWidth - The width of the line to check
18530
+ * @param alignment - The alignment of the stroke, 0.5 by default
18521
18531
  * @returns Whether the x/y coordinates are within this rectangle
18522
18532
  */
18523
- strokeContains(pX, pY, strokeWidth) {
18533
+ strokeContains(pX, pY, strokeWidth, alignment = 0.5) {
18524
18534
  const { x: x2, y: y2, width, height, radius } = this;
18525
- const halfStrokeWidth = strokeWidth / 2;
18535
+ const strokeWidthOuter = strokeWidth * (1 - alignment);
18536
+ const strokeWidthInner = strokeWidth - strokeWidthOuter;
18526
18537
  const innerX = x2 + radius;
18527
18538
  const innerY = y2 + radius;
18528
18539
  const innerWidth = width - radius * 2;
18529
18540
  const innerHeight = height - radius * 2;
18530
18541
  const rightBound = x2 + width;
18531
18542
  const bottomBound = y2 + height;
18532
- if ((pX >= x2 - halfStrokeWidth && pX <= x2 + halfStrokeWidth || pX >= rightBound - halfStrokeWidth && pX <= rightBound + halfStrokeWidth) && pY >= innerY && pY <= innerY + innerHeight) {
18543
+ if ((pX >= x2 - strokeWidthOuter && pX <= x2 + strokeWidthInner || pX >= rightBound - strokeWidthInner && pX <= rightBound + strokeWidthOuter) && pY >= innerY && pY <= innerY + innerHeight) {
18533
18544
  return true;
18534
18545
  }
18535
- if ((pY >= y2 - halfStrokeWidth && pY <= y2 + halfStrokeWidth || pY >= bottomBound - halfStrokeWidth && pY <= bottomBound + halfStrokeWidth) && pX >= innerX && pX <= innerX + innerWidth) {
18546
+ if ((pY >= y2 - strokeWidthOuter && pY <= y2 + strokeWidthInner || pY >= bottomBound - strokeWidthInner && pY <= bottomBound + strokeWidthOuter) && pX >= innerX && pX <= innerX + innerWidth) {
18536
18547
  return true;
18537
18548
  }
18538
18549
  return (
18539
18550
  // Top-left
18540
- pX < innerX && pY < innerY && isCornerWithinStroke(pX, pY, innerX, innerY, radius, halfStrokeWidth) || pX > rightBound - radius && pY < innerY && isCornerWithinStroke(pX, pY, rightBound - radius, innerY, radius, halfStrokeWidth) || pX > rightBound - radius && pY > bottomBound - radius && isCornerWithinStroke(pX, pY, rightBound - radius, bottomBound - radius, radius, halfStrokeWidth) || pX < innerX && pY > bottomBound - radius && isCornerWithinStroke(pX, pY, innerX, bottomBound - radius, radius, halfStrokeWidth)
18551
+ pX < innerX && pY < innerY && isCornerWithinStroke(
18552
+ pX,
18553
+ pY,
18554
+ innerX,
18555
+ innerY,
18556
+ radius,
18557
+ strokeWidthInner,
18558
+ strokeWidthOuter
18559
+ ) || pX > rightBound - radius && pY < innerY && isCornerWithinStroke(
18560
+ pX,
18561
+ pY,
18562
+ rightBound - radius,
18563
+ innerY,
18564
+ radius,
18565
+ strokeWidthInner,
18566
+ strokeWidthOuter
18567
+ ) || pX > rightBound - radius && pY > bottomBound - radius && isCornerWithinStroke(
18568
+ pX,
18569
+ pY,
18570
+ rightBound - radius,
18571
+ bottomBound - radius,
18572
+ radius,
18573
+ strokeWidthInner,
18574
+ strokeWidthOuter
18575
+ ) || pX < innerX && pY > bottomBound - radius && isCornerWithinStroke(
18576
+ pX,
18577
+ pY,
18578
+ innerX,
18579
+ bottomBound - radius,
18580
+ radius,
18581
+ strokeWidthInner,
18582
+ strokeWidthOuter
18583
+ )
18541
18584
  );
18542
18585
  }
18543
18586
  toString() {
@@ -19371,7 +19414,7 @@ var init_ShapePath = __esm({
19371
19414
  const delta = Math.PI * 2 / sides;
19372
19415
  const polygon = [];
19373
19416
  for (let i2 = 0; i2 < sides; i2++) {
19374
- const angle = i2 * delta + startAngle;
19417
+ const angle = startAngle - i2 * delta;
19375
19418
  polygon.push(
19376
19419
  x2 + radius * Math.cos(angle),
19377
19420
  y2 + radius * Math.sin(angle)
@@ -21071,13 +21114,13 @@ var init_GraphicsContext = __esm({
21071
21114
  if (action === "stroke") {
21072
21115
  const data = instruction.data;
21073
21116
  const alignment = data.style.alignment;
21074
- const padding = data.style.width * (1 - alignment);
21117
+ const outerPadding = data.style.width * (1 - alignment);
21075
21118
  const _bounds = data.path.bounds;
21076
21119
  bounds.addFrame(
21077
- _bounds.minX - padding,
21078
- _bounds.minY - padding,
21079
- _bounds.maxX + padding,
21080
- _bounds.maxY + padding
21120
+ _bounds.minX - outerPadding,
21121
+ _bounds.minY - outerPadding,
21122
+ _bounds.maxX + outerPadding,
21123
+ _bounds.maxY + outerPadding
21081
21124
  );
21082
21125
  }
21083
21126
  }
@@ -21110,7 +21153,8 @@ var init_GraphicsContext = __esm({
21110
21153
  if (instruction.action === "fill") {
21111
21154
  hasHit = shape.contains(transformedPoint.x, transformedPoint.y);
21112
21155
  } else {
21113
- hasHit = shape.strokeContains(transformedPoint.x, transformedPoint.y, style.width);
21156
+ const strokeStyle = style;
21157
+ hasHit = shape.strokeContains(transformedPoint.x, transformedPoint.y, strokeStyle.width, strokeStyle.alignment);
21114
21158
  }
21115
21159
  const holes = data.hole;
21116
21160
  if (holes) {
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  FilterMemoryToFilter,
3
3
  FilterToFilterMemory
4
- } from "../chunk-PP5T5HEO.js";
5
- import "../chunk-WS3FY4Q6.js";
6
- import "../chunk-Z3NBKYVU.js";
7
- import "../chunk-SAUNZQHZ.js";
8
- import "../chunk-CAWOWL3P.js";
9
- import "../chunk-ODIEVSQX.js";
10
- import "../chunk-5JREOVCG.js";
11
- import "../chunk-73ID6GAW.js";
12
- import "../chunk-5VX2VTDZ.js";
13
- import "../chunk-PP3SBC3C.js";
4
+ } from "../chunk-52ZSR3AN.js";
5
+ import "../chunk-X55ALTH7.js";
6
+ import "../chunk-DZMWRZUL.js";
7
+ import "../chunk-D753T42C.js";
8
+ import "../chunk-IG7HSAEJ.js";
9
+ import "../chunk-OPLBQKS2.js";
10
+ import "../chunk-XGGTEP7V.js";
11
+ import "../chunk-DWJGQ2A5.js";
12
+ import "../chunk-DXOIIOAQ.js";
13
+ import "../chunk-KAHX5SKO.js";
14
14
  import "../chunk-N342G4HO.js";
15
15
  export {
16
16
  FilterMemoryToFilter,