Tldraw/packages/editor/src/lib/primitives/geometry
Steve Ruiz 3ceebc82f8
Faster selection / erasing (#3454)
This PR makes a small improvement to the way we measure distances.
(Often we measure distances multiple times per frame per shape on the
screen). In many cases, we compare a minimum distance. This makes those
checks faster by avoiding a square root.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Release Notes

- Improve performance of minimum distance checks.
2024-04-13 13:30:30 +00:00
..
Arc2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Arc2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
Circle2d.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
Circle2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
CubicBezier2d.ts Perf: (slightly) faster min dist checks (#3401) 2024-04-08 13:31:05 +00:00
CubicSpline2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
CubicSpline2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
Edge2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Edge2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
Ellipse2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Ellipse2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
Geometry2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
Group2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Group2d.ts Perf: (slightly) faster min dist checks (#3401) 2024-04-08 13:31:05 +00:00
Point2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Point2d.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
Polygon2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Polygon2d.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
Polyline.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Polyline2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
Rectangle2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Rectangle2d.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
Stadium2d.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
Stadium2d.ts Faster selection / erasing (#3454) 2024-04-13 13:30:30 +00:00
geometry-constants.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00