v4.1.0
This month's release introduces a new shader starter kit for WebGL integration, along with API additions for embed control, minimap filtering, and localStorage-backed atoms.
What's new
Shader starter kit (#6847)
A new template demonstrating WebGL shader integration with tldraw for dynamic, interactive backgrounds that respond to canvas interactions. Includes four complete examples:
- Fluid simulation - Navier-Stokes dynamics
- Rainbow - Animated gradients
- Shadows - Raymarching and signed distance fields
- Minimal - Bare-bones template for custom shaders
Features configurable parameters, localStorage persistence, and full TypeScript support.
API changes
- Add
embedOnPasteoption toEmbedDefinitionfor opting out of automatic embed-on-paste behavior. (#6874) - Add
hideInMinimapoption toShapeUtilfor excluding shapes from the minimap. (#6327) - Add
snapType?: 'point' | 'align'toTLHandlefor finer control over handle snapping. ThecanSnapproperty is now deprecated. (#6883) - Expose
Editor#getShapePageBoundsandisRecordsDiffEmptyas public methods. (#6871) - Add
localStorageAtomto@tldraw/statefor atoms backed by localStorage with cross-tab syncing. (#6876) - Add inline style picker component variants. (#6920)
Improvements
- Make bookmark titles clickable. (#6326)
- Optimize mobile top bar rendering. (#6895)
- Add numpad Enter support for entering edit mode. (#6830)
- Consolidate preferences menu items. (#6802)
Bug fixes
- Fix accessibility shortcut typo. (#6811)
- Fix focus mode action missing. (#6812)
- Fix arrow rendering edge case. (#6799)
- Fix empty window opening on anchor click. (#6817)
- Fix missing translation key. (#6826)
- Fix shape index race condition. (#6884)
- Fix zero geometry vertices edge case. (#6885)
- Fix style panel button overflow. (#6920)
Patch releases
v4.1.1
- Update the formatting of the
npm create tldrawcommand in the CLI output.
v4.1.2
- Move
InFrontOfTheCanvascomponent back out of the.tl-canvaselement. (#7021)
Prev
v4.0.0Next
v4.2.0