292 karma · joined September 19, 2021
The core product / pitch is still the same—an SDK for whiteboards and other infinite canvas stuff—and that's what we monetize through licenses. Computer (and our other demos) are basically marketing, R&D, and fun.
We had a bunch of fun putting this together so I'm really happy to see folks enjoying it. I'm not sure where the project is going but I've been waking up for weeks with a fresh "oh christ, we could do ___", so that's exciting.
Ask me anything!
However, we did NOT publish this website! We have no relation it and can’t make any promises about it. The site is using an early access API endpoint from Fal that should be turned off soon. I would prefer this link be removed.
Happy to answer any questions about tldraw/this project. It's definitely not putting anyone out of work, but it's a blast to play with. Here's a more complicated example of what you can get it to do: https://twitter.com/tldraw/status/1725083976392437894
I've added a note next to the input with more info here, but basically: the vision API is so new that its immediately rate limited on any site like this, and because OpenAI doesn't have a way of authorizing a site to use their own API keys (they should!), this was the best we could do. We don't store the API key or send it to our own servers, it just goes to OpenAI via a fetch request.
Putting an API key into a random text input is obviously a bad idea and I hope this doesn't normalize that. However, you can read the source code (https://github.com/tldraw/draw-a-ui) and come to your own conclusions—or else just run it locally instead.
For an svg-style approach to ink (as opposed to a raster / dab-style brush) there’s no other option than recomputing the whole line each time. As a bonus, you can adjust the properties after the fact very easily. (You can try that at perfectfreehand.com.)
I tried to incorporate simplification into the perfect freehand algorithm but eventually gave up because I could not find any “stable” algorithm that would not cause the line to jump around as you drew / added points to the end. As far as I know none exist. Most apps that use simplification solve this problem by simplifying the line only after you’ve finished drawing, however for handwriting or artistic drawing this is especially bad as it “undoes” legitimate decisions you’ve made about where to place detail. In addition, the perfect-freehand algorithm simulates pressure based on density of points, so simplifying the line (ie removing points) without creating a corresponding pressure curve will cause a reduction in line variation, which is part of the fun of using it in the first place!
I’d love to learn more about what the canva team has done here though. Freehand drawing is a fascinating problem space, even without the ml / shape recognition stuff.
Having my work used in a visible way by large companies does make me wish I’d productized it more. Maybe sometime I’ll release a refactored/improved version under a different license. However, I’ve also started a company around a different open source project of mine (tldraw.com) and if there’s a bag to be got, I’m sure I’ll get it there.
We do the base 64 route for tldraw, which is sort of the best of all bad options. I'd like to someday add more export options so that a creator could host the fonts themselves on the same site where the SVG is shown.
There are trade offs for using the DOM vs. a custom <canvas> renderer, however I think they’re worth it for the types of applications that can be built this way.
We’ve also put a ton of thought (and opinions) into the interactions in tldraw. Some of this can sound pretty ridiculous, like rotating your cursor when your rotate a selection, while also counter-rotating the cursor’s shadow to preserve light direction. But especially with this sort of app, you really notice those details when they’re not there. As a product for developers, my hope is that the quality and attention to detail become part of the value proposition! Users certainly notice it.
As far as the select mode, try double-tapping one of the tools! That will keep that tool selected until you manually select a different one.
Double click on the shape in the toolbar to keep it selected!