tldraw/packages
Steve Ruiz 8892176b1a
[improvement] Scope getShapeAtPoint to rendering shapes only (#2043)
This PR:

1. Adds a `renderingOnly` option to the `Editor.getShapeAtPoint` method.
When true, the method will only hit test against rendering shapes
(shapes that are inside of the current `renderingBounds`) rather than
all shapes on the canvas.
2. Includes some low level improvements to the way that edges find their
nearest point.
3. Includes a fix to circle geometry that could produce NaN values
 
### Change Type

- [x] `minor` — New feature

### Test Plan

1. Check whether hovering shapes still works as you would expect.

- [x] Unit Tests

### Release Notes

- Improve perf for hovering shapes / shape hit tests
2023-10-09 14:18:42 +00:00
..
assets Update CHANGELOG.md [skip ci] 2023-10-06 15:18:15 +00:00
editor [improvement] Scope getShapeAtPoint to rendering shapes only (#2043) 2023-10-09 14:18:42 +00:00
file-format/api fix standalone examples (#2042) 2023-10-09 10:55:16 +00:00
indices/api fix standalone examples (#2042) 2023-10-09 10:55:16 +00:00
polyfills/api fix standalone examples (#2042) 2023-10-09 10:55:16 +00:00
primitives/api fix standalone examples (#2042) 2023-10-09 10:55:16 +00:00
state Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
store Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
tldraw [improvement] Scope getShapeAtPoint to rendering shapes only (#2043) 2023-10-09 14:18:42 +00:00
tlschema Remove fixup script (#2041) 2023-10-09 10:23:01 +00:00
ui/api fix standalone examples (#2042) 2023-10-09 10:55:16 +00:00
utils Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
validate Publish api.json (#2034) 2023-10-08 15:00:58 +00:00