v / examples / js_dom_draw / README.md
27 lines · 18 sloc · 496 bytes · 8dcb9f9fcac38a51d0e2514fbf2b63e23d2b7ef0
Raw

JS DOM Draw

Drawing with mouse events using the DOM API. Adopted from MDN examples.

Run with veb

cd examples/js_dom_draw
v run main.v

This starts a veb server at http://localhost:3001/ and compiles draw.js.v to draw.js before serving index.html.

You can also run it from the repository root:

v run examples/js_dom_draw/main.v

Compile manually

v -b js_browser examples/js_dom_draw/draw.js.v

Then open index.html in your favorite browser.