Skip to content

Instantly share code, notes, and snippets.

View thecomputergirl's full-sized avatar

Computergirl thecomputergirl

View GitHub Profile
@thecomputergirl
thecomputergirl / .block
Created January 8, 2017 11:37 — forked from mbostock/.block
Line Drawing
license: gpl-3.0
@thecomputergirl
thecomputergirl / README.md
Last active March 12, 2017 01:30 — forked from nitaku/README.md
Freehand Doodles

A simple freehand drawing application, based on Bostock's Line Drawing gist and Matteo Abrate’s BlockFreehand Drawing gist. Adapted with Computergirl's DoodleDoo gist

Use your stylus, fingers or mouse to draw. The color of the line can be changed by interacting with the color palette, and the canvas can be cleared by clicking the trash in the upper-right corner of the UI.

The application uses two stacked SVG elements, one for the UI and one for the canvas. This is used to disable drawing when interacting with UI elements.

Unlike Bostock's example, this application maintains a DOM-independent object to store all the drawing's data (just look at the JavaScript console each time you complete a line).

There is also an option for opacity in the line path. Looking to add a button for this function.

@thecomputergirl
thecomputergirl / .block
Last active January 11, 2017 03:36
DoodleDoo
license: gpl-3.0
border: no