tldraw / tldraw

SDK for creating whiteboards and canvas experiences on the web.
https://tldraw.dev
Other
33.04k stars 1.98k forks source link

[Experiment] LOD for images #3684

Open steveruizok opened 2 weeks ago

steveruizok commented 2 weeks ago

This PR adds support for "level of detail" for image shapes. When an image is created, we create multiple versions of that image (each smaller than the last) and display the smallest image for the current zoom level.

Some thoughts here:

For shared rooms / hosted assets

For offline rooms / serialized assets

For the API

Change Type

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
examples ✅ Ready (Inspect) Visit Preview May 13, 2024 1:00pm
1 Ignored Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **tldraw-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/tldraw/tldraw-docs/5UFgq7SisXKVVtK6UEo4QMK8oNrd)) | [Visit Preview](https://tldraw-docs-git-lod-images-tldraw.vercel.app) | May 13, 2024 1:00pm |
SomeHats commented 1 week ago

When I tried a this on a multiplayer room preview i got an error when adding an image: At asset(type = image).props.sources: Expected an array, got undefined.

When I tried creating a room with an image locally and then sharing it, I got a similar error from the server