diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-11-17 18:35:48 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-11-17 18:35:48 -0500 |
| commit | cea5d15cf6a40e0268a49487ee610768366a7362 (patch) | |
| tree | 9083d1d8fb189b8d656054de02e716b90cef5e34 /assets/test/brush/index.html | |
| parent | 313423fe99372a9800c31fc553bc2fc6e8e9a858 (diff) | |
bla
Diffstat (limited to 'assets/test/brush/index.html')
| -rw-r--r-- | assets/test/brush/index.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/assets/test/brush/index.html b/assets/test/brush/index.html index 3e29473..68c81e0 100644 --- a/assets/test/brush/index.html +++ b/assets/test/brush/index.html @@ -60,7 +60,7 @@ function drawLine (u, v) { var d = imagedata.data var i, j, t, dist - var len = dist2(u, v) + var len = sqrt(dist2(u, v)) if (len == 0) return @@ -81,10 +81,12 @@ function drawLine (u, v) { } } } - ctx.putImageData(imagedata, 100, 100) + ctx.putImageData(imagedata, u.a, u.b) } -drawLine( new point( 100, 100 ), new point( 400, 400 ) ) +drawLine( new point( 100, 100 ), new point( 100, 400 ) ) +// drawLine( new point( 100, 100 ), new point( 400, 100 ) ) +// drawLine( new point( 100, 100 ), new point( 400, 400 ) ) function sqr(x) { return x * x } function dist2(v, w) { return sqr(v.b - w.b) + sqr(v.b - w.b) } |
