@flighthq/interaction 0.3.0-next.1593.a47f94a → 0.3.0-next.1595.4d49b41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/interaction",
3
- "version": "0.3.0-next.1593.a47f94a",
3
+ "version": "0.3.0-next.1595.4d49b41",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/flighthq/flight.git",
@@ -36,18 +36,18 @@
36
36
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@flighthq/geometry": "0.3.0-next.1593.a47f94a",
40
- "@flighthq/node": "0.3.0-next.1593.a47f94a",
41
- "@flighthq/scene2d": "0.3.0-next.1593.a47f94a",
42
- "@flighthq/log": "0.3.0-next.1593.a47f94a",
43
- "@flighthq/path": "0.3.0-next.1593.a47f94a",
44
- "@flighthq/shape": "0.3.0-next.1593.a47f94a",
45
- "@flighthq/spatial": "0.3.0-next.1593.a47f94a",
46
- "@flighthq/signals": "0.3.0-next.1593.a47f94a",
47
- "@flighthq/bitmap": "0.3.0-next.1593.a47f94a",
48
- "@flighthq/text": "0.3.0-next.1593.a47f94a",
49
- "@flighthq/textlayout": "0.3.0-next.1593.a47f94a",
50
- "@flighthq/types": "0.3.0-next.1593.a47f94a"
39
+ "@flighthq/geometry": "0.3.0-next.1595.4d49b41",
40
+ "@flighthq/node": "0.3.0-next.1595.4d49b41",
41
+ "@flighthq/scene2d": "0.3.0-next.1595.4d49b41",
42
+ "@flighthq/log": "0.3.0-next.1595.4d49b41",
43
+ "@flighthq/path": "0.3.0-next.1595.4d49b41",
44
+ "@flighthq/shape": "0.3.0-next.1595.4d49b41",
45
+ "@flighthq/spatial": "0.3.0-next.1595.4d49b41",
46
+ "@flighthq/signals": "0.3.0-next.1595.4d49b41",
47
+ "@flighthq/bitmap": "0.3.0-next.1595.4d49b41",
48
+ "@flighthq/text": "0.3.0-next.1595.4d49b41",
49
+ "@flighthq/textlayout": "0.3.0-next.1595.4d49b41",
50
+ "@flighthq/types": "0.3.0-next.1595.4d49b41"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@flighthq/quadbatch": "*",
@@ -25,15 +25,24 @@ describe('registerShapeHitTest', () => {
25
25
  const end = createPath();
26
26
  appendPathRectangle(end, 10, 10, 80, 80);
27
27
  const shape = createMorphShape(createPathMorph(start, end)!);
28
+ const secondStart = createPath();
29
+ appendPathCircle(secondStart, 150, 150, 40);
30
+ const secondEnd = createPath();
31
+ appendPathRectangle(secondEnd, 110, 110, 80, 80);
28
32
  appendShapeBeginFill(shape, 0xff0000ff, 1);
29
33
  appendMorphShapePath(shape);
30
34
  appendShapeEndFill(shape);
31
- setRectangle(getNodeLocalBoundsRectangle(shape), 10, 10, 80, 80);
35
+ appendShapeBeginFill(shape, 0x0000ffff, 1);
36
+ appendMorphShapePath(shape, createPathMorph(secondStart, secondEnd)!);
37
+ appendShapeEndFill(shape);
38
+ setRectangle(getNodeLocalBoundsRectangle(shape), 10, 10, 180, 180);
32
39
  setNodeHitTestEnabled(shape, true);
33
40
 
34
41
  expect(findGraphHitTargetPrecise(shape, 85, 85)).toBeNull();
42
+ expect(findGraphHitTargetPrecise(shape, 185, 185)).toBeNull();
35
43
  setMorphShapeProgress(shape, 1);
36
44
  expect(findGraphHitTargetPrecise(shape, 85, 85)).toBe(shape);
45
+ expect(findGraphHitTargetPrecise(shape, 185, 185)).toBe(shape);
37
46
  });
38
47
 
39
48
  it('winding-tests the actual fill for precise queries, so a bbox corner outside the circle misses', () => {