tldraw/packages
Steve Ruiz 2bbab1a790
Perf: Improve text outline performance (#3429)
We use text shadows to create "outlines" around text shapes. These
shadows are rendered on the GPU. In Chrome (and on computers with a
capable GPU) text shadows work pretty well, however on Safari—and in
particular on iOS—they cause massive frame drops.


https://github.com/tldraw/tldraw/assets/23072548/b65cbcaa-6cc3-46f3-b54d-1f9cc07fc499

This PR:
- adds an LOD to text shadows, removing them at < 35% zoom
- removes text shadows entirely on Safari

If we had a "high performance" or "low-end device" mode, then shadows /
text shadows would be the first to go.

### Change Type

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

### Test Plan

1. Use text shapes on iOS.
2. Use text shapes on Safari.
3. Use text shapes on Chrome.

### Release Notes

- Improves performance of text shapes on iOS / Safari.
2024-04-10 10:20:16 +00:00
..
assets ui: make toasts look more toasty (#2988) 2024-03-27 09:41:13 +00:00
editor Perf: Improve text outline performance (#3429) 2024-04-10 10:20:16 +00:00
namespaced-tldraw use native structuredClone on node, cloudflare workers, and in tests (#3166) 2024-03-18 17:16:09 +00:00
state Add white migration (#3334) 2024-04-04 18:16:17 +00:00
store Perf: (slightly) faster min dist checks (#3401) 2024-04-08 13:31:05 +00:00
tldraw Fix some tests (#3403) 2024-04-09 15:42:54 +00:00
tlschema Display none for culled shapes (#3291) 2024-04-05 13:23:02 +00:00
tlsync Revert "squish sync data events before sending them out" (#3331) 2024-04-03 10:31:28 +01:00
utils Perf: slightly faster getShapeAtPoint (#3416) 2024-04-09 12:57:46 +00:00
validate React-powered SVG exports (#3117) 2024-03-25 14:16:55 +00:00