1
0
Fork 0

Fix and improve path intersection methods

- Add path.intersectsBeam() method
- Add utils.beamIntersectsLine() method
- Simplify calculation and improve precision on beam intersections
- Document return types properly
- beamIntersectsCurve now uses the proper function from Bezier library instead of emulating it by constructing a huge line
- docs: path.intersect... methods never return false, they simply return an empty array in case of no intersection
This commit is contained in:
Jonathan Haas 2024-09-25 14:06:17 +02:00
parent adf83eda8c
commit 4b83212f41
10 changed files with 262 additions and 39 deletions

View file

@ -17,7 +17,7 @@ for more information.
## Signature
```js
array|false path.intersectsY(float y)
array path.intersectsY(float y)
```
## Example