@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.
- package/dist/{ContainerChild-B5yD0BI8.d.ts → ContainerChild-AjuVp3wW.d.ts} +4 -1
- package/dist/{ContainerChild-WzyxEjAc.d.cts → ContainerChild-BUFxM6Ya.d.cts} +4 -1
- package/dist/WebGLRenderer-EFHDNV22.js +9 -0
- package/dist/WebGPURenderer-LEKL575M.js +10 -0
- package/dist/{browserAll-2HD5EH7K.js → browserAll-S4EPEXZD.js} +5 -5
- package/dist/{chunk-WNOARCWH.js → chunk-3XKVLXKN.js} +2 -2
- package/dist/{chunk-PP5T5HEO.js → chunk-52ZSR3AN.js} +1 -1
- package/dist/{chunk-SAUNZQHZ.js → chunk-D753T42C.js} +1 -1
- package/dist/{chunk-TOG67Z7Q.js → chunk-DQ47ST7G.js} +2 -2
- package/dist/{chunk-73ID6GAW.js → chunk-DWJGQ2A5.js} +2 -2
- package/dist/{chunk-5VX2VTDZ.js → chunk-DXOIIOAQ.js} +81 -27
- package/dist/{chunk-Z3NBKYVU.js → chunk-DZMWRZUL.js} +10 -9
- package/dist/{chunk-NB4Q3GFK.js → chunk-FXH7A6UR.js} +224 -53
- package/dist/{chunk-6GJXIPNB.js → chunk-GEY6RTYO.js} +1 -1
- package/dist/{chunk-CAWOWL3P.js → chunk-IG7HSAEJ.js} +75 -34
- package/dist/{chunk-PP3SBC3C.js → chunk-KAHX5SKO.js} +18 -15
- package/dist/{chunk-ODIEVSQX.js → chunk-OPLBQKS2.js} +3 -3
- package/dist/{chunk-Y3WNBACN.js → chunk-R4J2U4HN.js} +2 -2
- package/dist/{chunk-WS3FY4Q6.js → chunk-X55ALTH7.js} +2 -2
- package/dist/{chunk-5JREOVCG.js → chunk-XGGTEP7V.js} +1 -1
- package/dist/classes/CharacterBaseModel.cjs +397 -248
- package/dist/classes/CharacterBaseModel.js +14 -15
- package/dist/classes/CharacterStoredClass.cjs +397 -248
- package/dist/classes/CharacterStoredClass.js +14 -15
- package/dist/classes/ChoiceMenuOption.cjs +325 -178
- package/dist/classes/ChoiceMenuOption.js +14 -15
- package/dist/classes/Sound.cjs +397 -248
- package/dist/classes/Sound.js +14 -15
- package/dist/classes/StoredClassModel.cjs +397 -248
- package/dist/classes/StoredClassModel.js +14 -15
- package/dist/classes/canvas/AdditionalPositions.cjs +39323 -963
- package/dist/classes/canvas/AdditionalPositions.d.cts +3 -1
- package/dist/classes/canvas/AdditionalPositions.d.ts +3 -1
- package/dist/classes/canvas/AdditionalPositions.js +41 -10
- package/dist/classes/canvas/AnchorExtension.cjs +92 -48
- package/dist/classes/canvas/AnchorExtension.js +8 -8
- package/dist/classes/canvas/CanvasBaseItem.cjs +92 -48
- package/dist/classes/canvas/CanvasBaseItem.d.cts +1 -1
- package/dist/classes/canvas/CanvasBaseItem.d.ts +1 -1
- package/dist/classes/canvas/CanvasBaseItem.js +9 -9
- package/dist/classes/canvas/Container.cjs +389 -242
- package/dist/classes/canvas/Container.d.cts +1 -1
- package/dist/classes/canvas/Container.d.ts +1 -1
- package/dist/classes/canvas/Container.js +14 -15
- package/dist/classes/canvas/ImageContainer.cjs +325 -176
- package/dist/classes/canvas/ImageContainer.d.cts +1 -1
- package/dist/classes/canvas/ImageContainer.d.ts +1 -1
- package/dist/classes/canvas/ImageContainer.js +14 -15
- package/dist/classes/canvas/ImageSprite.cjs +3041 -2892
- package/dist/classes/canvas/ImageSprite.d.cts +1 -1
- package/dist/classes/canvas/ImageSprite.d.ts +1 -1
- package/dist/classes/canvas/ImageSprite.js +14 -15
- package/dist/classes/canvas/Sprite.cjs +397 -252
- package/dist/classes/canvas/Sprite.d.cts +1 -1
- package/dist/classes/canvas/Sprite.d.ts +1 -1
- package/dist/classes/canvas/Sprite.js +14 -15
- package/dist/classes/canvas/Text.cjs +319 -172
- package/dist/classes/canvas/Text.d.cts +1 -1
- package/dist/classes/canvas/Text.d.ts +1 -1
- package/dist/classes/canvas/Text.js +14 -15
- package/dist/classes/canvas/VideoSprite.cjs +3038 -2887
- package/dist/classes/canvas/VideoSprite.d.cts +4 -2
- package/dist/classes/canvas/VideoSprite.d.ts +4 -2
- package/dist/classes/canvas/VideoSprite.js +14 -15
- package/dist/classes/index.cjs +399 -252
- package/dist/classes/index.d.cts +1 -1
- package/dist/classes/index.d.ts +1 -1
- package/dist/classes/index.js +14 -15
- package/dist/classes/ticker/FadeAlphaTicker.cjs +325 -178
- package/dist/classes/ticker/FadeAlphaTicker.js +14 -15
- package/dist/classes/ticker/MoveTicker.cjs +3563 -3418
- package/dist/classes/ticker/MoveTicker.js +14 -15
- package/dist/classes/ticker/RotateTicker.cjs +325 -178
- package/dist/classes/ticker/RotateTicker.js +14 -15
- package/dist/classes/ticker/TickerBase.cjs +397 -248
- package/dist/classes/ticker/TickerBase.js +14 -15
- package/dist/classes/ticker/ZoomTicker.cjs +325 -178
- package/dist/classes/ticker/ZoomTicker.js +14 -15
- package/dist/classes/ticker/index.cjs +397 -252
- package/dist/classes/ticker/index.js +14 -15
- package/dist/constants.cjs +93 -49
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +10 -10
- package/dist/decorators/canvas-element-decorator.cjs +389 -242
- package/dist/decorators/canvas-element-decorator.d.cts +1 -1
- package/dist/decorators/canvas-element-decorator.d.ts +1 -1
- package/dist/decorators/canvas-element-decorator.js +14 -15
- package/dist/decorators/event-decorator.d.cts +1 -1
- package/dist/decorators/event-decorator.d.ts +1 -1
- package/dist/decorators/index.cjs +325 -178
- package/dist/decorators/index.d.cts +1 -1
- package/dist/decorators/index.d.ts +1 -1
- package/dist/decorators/index.js +14 -15
- package/dist/decorators/label-decorator.cjs +397 -250
- package/dist/decorators/label-decorator.js +14 -15
- package/dist/functions/canvas/canvas-effect.cjs +394 -247
- package/dist/functions/canvas/canvas-effect.js +14 -15
- package/dist/functions/canvas/canvas-memory-utility.cjs +389 -242
- package/dist/functions/canvas/canvas-memory-utility.d.cts +1 -1
- package/dist/functions/canvas/canvas-memory-utility.d.ts +1 -1
- package/dist/functions/canvas/canvas-memory-utility.js +14 -15
- package/dist/functions/canvas/canvas-transition.cjs +397 -250
- package/dist/functions/canvas/canvas-transition.d.cts +1 -1
- package/dist/functions/canvas/canvas-transition.d.ts +1 -1
- package/dist/functions/canvas/canvas-transition.js +14 -15
- package/dist/functions/canvas/canvas-utility.cjs +397 -248
- package/dist/functions/canvas/canvas-utility.js +14 -15
- package/dist/functions/canvas/image-container-utility.cjs +397 -250
- package/dist/functions/canvas/image-container-utility.d.cts +1 -1
- package/dist/functions/canvas/image-container-utility.d.ts +1 -1
- package/dist/functions/canvas/image-container-utility.js +14 -15
- package/dist/functions/canvas/image-utility.cjs +397 -250
- package/dist/functions/canvas/image-utility.d.cts +1 -1
- package/dist/functions/canvas/image-utility.d.ts +1 -1
- package/dist/functions/canvas/image-utility.js +14 -15
- package/dist/functions/canvas/video-utility.cjs +4682 -4531
- package/dist/functions/canvas/video-utility.d.cts +1 -1
- package/dist/functions/canvas/video-utility.d.ts +1 -1
- package/dist/functions/canvas/video-utility.js +14 -15
- package/dist/functions/dialogue-utility.cjs +397 -248
- package/dist/functions/dialogue-utility.js +14 -15
- package/dist/functions/flags-utility.cjs +397 -248
- package/dist/functions/flags-utility.js +14 -15
- package/dist/functions/game-utility.cjs +397 -248
- package/dist/functions/game-utility.js +14 -15
- package/dist/functions/index.cjs +397 -252
- package/dist/functions/index.d.cts +1 -1
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.js +14 -15
- package/dist/functions/saves-utility.cjs +397 -248
- package/dist/functions/saves-utility.d.cts +1 -1
- package/dist/functions/saves-utility.d.ts +1 -1
- package/dist/functions/saves-utility.js +14 -15
- package/dist/functions/sound-utility.cjs +92 -48
- package/dist/functions/sound-utility.js +10 -10
- package/dist/functions/texture-utility.cjs +319 -172
- package/dist/functions/texture-utility.d.cts +1 -1
- package/dist/functions/texture-utility.d.ts +1 -1
- package/dist/functions/texture-utility.js +14 -15
- package/dist/index.cjs +268 -121
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -15
- package/dist/interface/HistoryStep.d.cts +1 -1
- package/dist/interface/HistoryStep.d.ts +1 -1
- package/dist/interface/SaveData.d.cts +1 -1
- package/dist/interface/SaveData.d.ts +1 -1
- package/dist/interface/canvas/canvas-memory.d.cts +1 -1
- package/dist/interface/canvas/canvas-memory.d.ts +1 -1
- package/dist/interface/canvas/canvas-options.d.cts +1 -1
- package/dist/interface/canvas/canvas-options.d.ts +1 -1
- package/dist/interface/export/ExportedCanvas.d.cts +1 -1
- package/dist/interface/export/ExportedCanvas.d.ts +1 -1
- package/dist/interface/export/ExportedStep.d.cts +1 -1
- package/dist/interface/export/ExportedStep.d.ts +1 -1
- package/dist/interface/index.d.cts +1 -1
- package/dist/interface/index.d.ts +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.cjs +397 -250
- package/dist/labels/BaseCanvasElementTestLabel.js +14 -15
- package/dist/labels/CanvasEventsTestLabel.cjs +397 -250
- package/dist/labels/CanvasEventsTestLabel.d.cts +1 -1
- package/dist/labels/CanvasEventsTestLabel.d.ts +1 -1
- package/dist/labels/CanvasEventsTestLabel.js +14 -15
- package/dist/labels/CustomTickerCanvasElementTestLabel.cjs +268 -121
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +14 -15
- package/dist/labels/ImagesAnimationsTestLabel.cjs +397 -250
- package/dist/labels/ImagesAnimationsTestLabel.js +14 -15
- package/dist/labels/InputTestLabel.cjs +325 -178
- package/dist/labels/InputTestLabel.js +14 -15
- package/dist/labels/MarkdownTest.cjs +325 -178
- package/dist/labels/MarkdownTest.js +14 -15
- package/dist/labels/SoundTestLabel.cjs +325 -178
- package/dist/labels/SoundTestLabel.js +14 -15
- package/dist/labels/StartLabel.cjs +397 -250
- package/dist/labels/StartLabel.js +14 -15
- package/dist/labels/StepLabelTest.cjs +325 -178
- package/dist/labels/StepLabelTest.js +14 -15
- package/dist/labels/VideoTestLabel.cjs +325 -178
- package/dist/labels/VideoTestLabel.js +14 -15
- package/dist/labels/index.cjs +397 -250
- package/dist/labels/index.js +14 -15
- package/dist/{lib-6FCVILMQ.js → lib-5KZOZFFM.js} +8 -8
- package/dist/managers/CanvasManager.cjs +397 -248
- package/dist/managers/CanvasManager.d.cts +1 -1
- package/dist/managers/CanvasManager.d.ts +1 -1
- package/dist/managers/CanvasManager.js +14 -15
- package/dist/managers/CanvasManagerStatic.cjs +176 -77
- package/dist/managers/CanvasManagerStatic.d.cts +1 -1
- package/dist/managers/CanvasManagerStatic.d.ts +1 -1
- package/dist/managers/CanvasManagerStatic.js +9 -9
- package/dist/managers/NarrationManager.cjs +397 -248
- package/dist/managers/NarrationManager.d.cts +2 -1
- package/dist/managers/NarrationManager.d.ts +2 -1
- package/dist/managers/NarrationManager.js +14 -15
- package/dist/managers/NarrationManagerStatic.cjs +397 -248
- package/dist/managers/NarrationManagerStatic.d.cts +1 -1
- package/dist/managers/NarrationManagerStatic.d.ts +1 -1
- package/dist/managers/NarrationManagerStatic.js +14 -15
- package/dist/managers/SoundManager.cjs +397 -248
- package/dist/managers/SoundManager.js +14 -15
- package/dist/managers/StorageManager.cjs +397 -248
- package/dist/managers/StorageManager.js +14 -15
- package/dist/managers/index.cjs +397 -248
- package/dist/managers/index.d.cts +1 -1
- package/dist/managers/index.d.ts +1 -1
- package/dist/managers/index.js +14 -15
- package/dist/types/ContainerChild.d.cts +1 -1
- package/dist/types/ContainerChild.d.ts +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/ticker/MoveTickerProps.d.cts +8 -0
- package/dist/types/ticker/MoveTickerProps.d.ts +8 -0
- package/dist/webworkerAll-XFBJBJMM.js +5 -0
- package/package.json +1 -1
- package/dist/WebGLRenderer-U57ZOBH6.js +0 -9
- package/dist/WebGPURenderer-EYIZ7IXV.js +0 -10
- package/dist/chunk-IRUKNG2Y.js +0 -130
- package/dist/webworkerAll-GSRT3S6X.js +0 -5
|
@@ -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
|
|
2503
|
-
const
|
|
2504
|
-
const
|
|
2505
|
-
const
|
|
2506
|
-
const
|
|
2507
|
-
const
|
|
2508
|
-
const
|
|
2509
|
-
const
|
|
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
|
|
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.
|
|
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
|
-
|
|
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 =
|
|
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
|
|
18061
|
-
const
|
|
18064
|
+
const radius = this.radius;
|
|
18065
|
+
const outerWidth = (1 - alignment) * width;
|
|
18062
18066
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
18063
|
-
return distance
|
|
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,
|
|
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
|
|
18161
|
-
const
|
|
18162
|
-
const
|
|
18163
|
-
const
|
|
18164
|
-
const
|
|
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 / (
|
|
18168
|
-
const outerEllipse = normalizedX * normalizedX / (
|
|
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
|
|
18314
|
-
const
|
|
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
|
|
18323
|
-
|
|
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,
|
|
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 -
|
|
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
|
|
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 -
|
|
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 -
|
|
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(
|
|
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
|
|
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
|
|
21117
|
+
const outerPadding = data.style.width * (1 - alignment);
|
|
21075
21118
|
const _bounds = data.path.bounds;
|
|
21076
21119
|
bounds.addFrame(
|
|
21077
|
-
_bounds.minX -
|
|
21078
|
-
_bounds.minY -
|
|
21079
|
-
_bounds.maxX +
|
|
21080
|
-
_bounds.maxY +
|
|
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
|
-
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import 'pixi.js';
|
|
2
|
-
export { C as default } from '../../ContainerChild-
|
|
2
|
+
export { C as default } from '../../ContainerChild-BUFxM6Ya.cjs';
|
|
3
3
|
import './AdditionalPositions.cjs';
|
|
4
4
|
import '../../interface/canvas/TextureMemory.cjs';
|
|
5
5
|
import './AnchorExtension.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'pixi.js';
|
|
2
|
-
export { C as default } from '../../ContainerChild-
|
|
2
|
+
export { C as default } from '../../ContainerChild-AjuVp3wW.js';
|
|
3
3
|
import './AdditionalPositions.js';
|
|
4
4
|
import '../../interface/canvas/TextureMemory.js';
|
|
5
5
|
import './AnchorExtension.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CanvasBaseItem
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-GEY6RTYO.js";
|
|
4
|
+
import "../../chunk-DZMWRZUL.js";
|
|
5
|
+
import "../../chunk-D753T42C.js";
|
|
6
|
+
import "../../chunk-IG7HSAEJ.js";
|
|
7
|
+
import "../../chunk-OPLBQKS2.js";
|
|
8
|
+
import "../../chunk-XGGTEP7V.js";
|
|
9
|
+
import "../../chunk-DWJGQ2A5.js";
|
|
10
|
+
import "../../chunk-DXOIIOAQ.js";
|
|
11
|
+
import "../../chunk-KAHX5SKO.js";
|
|
12
12
|
import "../../chunk-N342G4HO.js";
|
|
13
13
|
export {
|
|
14
14
|
CanvasBaseItem as default
|