Git Product home page Git Product logo

draw-fast's Introduction

Draw Fast

Draw Fast is a demo that shows how you can use the tldraw library with realtime image generation. The demo has now finished and we’ve taken it down. But you can still run it on your own machine and try it out.

Here are two ways of doing that.

Run it locally

Here's a video tutorial. Or read below for a written guide.

draw.fast.guide.mp4

1. Clone the repo

Clone this repo!

git clone https://github.com/tldraw/draw-fast

2. Get a Fal key

Go to fal.ai

Login with github, and get a key from the keys page. (You can give it any name you want).

1

Copy your key.

2

3. Setup environment variables

Create a .env file in the root folder of your repo. Paste your key there as FAL_KEY

Your file should something like this:

FAL_KEY=8bf6c68d-8711-426b-90c6-0d9636909fce:b774f2a649cfecbf56dce57db7966a73

4. Run it locally

In your terminal…

npm install
npm run dev

And open localhost:3000

5. Draw fast

Draw something in the rectangle! Double-clicking the prompt to change it. Click the small arrow to enter lens mode.

6. Share!

Record your screen and show us what you draw fast.

We’re @tldraw on twitter.

Troubleshooting

If the generated images don’t appear, try running npm install and npm run dev again, or try waiting a while for your key to activate.

Run it in CodeSandbox

1. Import the repo

Sign in on CodeSandbox. Click on Import repository.

a

Import the repo by pasting in https://github.com/tldraw/draw-fast and clicking Import. b

2. Setup the environment

Click Next until you get to the Set environment variables screen. c

On the Set environment variables screen, click Add variable. d

Name your key FAL_KEY.

You can get a key from fal.ai Instructions on how to do that are here. e

Click Save, then click Next until you get to the end of setup.

f

Finally, click Apply and restart, and wait about 5 minutes. g

3. Draw fast

Draw something in the rectangle! Double-clicking the prompt to change it. Click the small arrow to enter lens mode.

4. Share!

Record your screen and show us what you draw fast.

We’re @tldraw on twitter.

draw-fast's People

Contributors

todepond avatar steveruizok avatar somehats avatar drochetti avatar turbo1912 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.