TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Drawingboard.js

233 pointsby Leimiover 11 years ago

33 comments

emhartover 11 years ago
Just noticed this comment in the code:<p>*droppable: true or false (false by default). If true, dropping an image on the canvas will include it and allow you to draw on it<p>That&#x27;s awesome! I was thinking that this would make a great coloring book, and being able to just drop lineart into the back of a canvas and have your kid go to town is awesome. Really nice work, Leimi!
olleracover 11 years ago
This is one of the slickest implementation of a sketching app I&#x27;ve seen. The API is nice and the controls are self-explanatory. I&#x27;ve been working on a drawing app for the past few months (journeyship.com) and I&#x27;m considering replacing the main canvas with a sketching pad like this one.<p>For those of you who are curious about other projects out there that offer similar functionality, take a look at these:<p><a href="http://www.createjs.com/#!/EaselJS/demos/drawing" rel="nofollow">http:&#x2F;&#x2F;www.createjs.com&#x2F;#!&#x2F;EaselJS&#x2F;demos&#x2F;drawing</a><p><a href="http://fabricjs.com/freedrawing/" rel="nofollow">http:&#x2F;&#x2F;fabricjs.com&#x2F;freedrawing&#x2F;</a><p><a href="https://github.com/SketchIO/Sketch.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SketchIO&#x2F;Sketch.js</a><p><a href="https://github.com/literallycanvas/literallycanvas" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;literallycanvas&#x2F;literallycanvas</a>
评论 #6445089 未加载
ernestiparkover 11 years ago
Nice! Leimi - you should check out my project xBoard: <a href="https://github.com/eipark/xboard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;eipark&#x2F;xboard</a>. It is somewhat similar, but focuses more on making the drawing canvas &#x27;video&#x27;-like with a scrubber and recording functions. You should fork or pull pieces from it if you&#x27;d like that sort of functionality.
评论 #6447623 未加载
fcholletover 11 years ago
I made something similar for a webapp of mine (demo at <a href="http://www.wysp.ws/practice/course/1057894/" rel="nofollow">http:&#x2F;&#x2F;www.wysp.ws&#x2F;practice&#x2F;course&#x2F;1057894&#x2F;</a> -- it&#x27;s meant for painting so the functionality is a bit different, you control opacity)<p>A difficulty I had was to make the lines smooth whereas the cursor positions are not sampled very fast by the browser. I&#x27;m curious as to what your approach was, since everything seems perfectly smooth. I&#x27;ll be reading your code...
ezlover 11 years ago
Is there any sort of smoothing going on? the rendered curve looks really slick and super nice.<p>I had some trouble with making signatures look nice on a library I used (mouse drawn signatures looked really choppy and jagged) so I had to do a little work to make it smooth itself out.<p><a href="http://demo.rocketlease.com/site_media/signature-pad/examples/draw-smoothed-vs-linear.html" rel="nofollow">http:&#x2F;&#x2F;demo.rocketlease.com&#x2F;site_media&#x2F;signature-pad&#x2F;example...</a>
评论 #6447171 未加载
lukeholderover 11 years ago
Looks great. Would be interesting to add to blogging software to allow a quick sketch to be added to a post.<p>How would you go about persisting the canvas? json encoded output?
评论 #6444350 未加载
Fauntleroyover 11 years ago
This doesn&#x27;t keep track of my cursor when I&#x27;m outside the boundary of the canvas. Are you listening to mousemove on the canvas element? If so, you might want to move that to the window or document, so you can keep track of the user&#x27;s mouse even when its not moving in the canvas.
jonas_bover 11 years ago
I don&#x27;t have my phone with me right now. Can anybody confirm if this works on iOS? I&#x27;m asking because I&#x27;m looking for an HTML5 drawing script which works on mobile browsers.
评论 #6444514 未加载
评论 #6445446 未加载
评论 #6445428 未加载
评论 #6444266 未加载
评论 #6444290 未加载
评论 #6444330 未加载
nekopaover 11 years ago
I did comment to say that it works well on iPad, but I would like to add that there are some interesting &#x27;features&#x27; when using 2 fingers: they don&#x27;t work at the same time,but on one board, it&#x27;s almost like an etchasketch where one finger takes over from where the other left off, on another board it draws between the the fingers, and yet another board the draw point switches between where each finger is. Looks like fun to explore later...
GrinningFoolover 11 years ago
The drawing board logo is a pretty fun easter egg-type-thing.
评论 #6450118 未加载
larrydagover 11 years ago
First thing I thought of with this was creating a mobile app that would be a cloud based instant note taking tool. Preferably used with a stylus.
评论 #6444854 未加载
Daizover 11 years ago
Seems to perform quite well, though the fill tool is a bit useless thanks to the antialiasing on the lines that can&#x27;t be turned off. Considering the simple approach of this, I&#x27;d either remove the AA (or make it togglable) or get rid of the fill tool.<p>Also...<p><pre><code> h1 { font-family: Comic Sans MS; } </code></pre> Seriously?
评论 #6444491 未加载
评论 #6446318 未加载
评论 #6444619 未加载
KenoFischerover 11 years ago
I have a Wacom tablet that I routinely use for sketches. The only problem I always have is that most applications have trouble recognizing the eraser tip. I think Wacom has some sort of web plugin that comes with the driver when you install the table. Any chance of adding that style of tablet input?
hanscover 11 years ago
Remark: The download results in an extension-less format. Which format is it?
评论 #6444370 未加载
saltyknucklesover 11 years ago
Are we really bringing back OekakiBBS? I&#x27;m totally ok with this.
domidover 11 years ago
Nice Leimi! Great API. If anyone is looking for a similar but hosted solution, give vinci.io a try. You can turn off any tools you don&#x27;t need and leave the drawing tools enabled.
websitescenesover 11 years ago
Sweet! I am building an app that can use this to take a customer signature. The app will be using a tablet and stylus to make sales on the floor. Been debating a feature like this.
vvvVVVvvvover 11 years ago
Had quite a laugh at enlargeYourContainer.<p>Any plan to release a way to export the drawing in a json object (or any other data structure) ?<p>Props to you anyway.
debacleover 11 years ago
I like the simplicity and configurability. Excellent job.
评论 #6444539 未加载
davexunitover 11 years ago
If I just click with the brush tool, only a semi-circle appears on the canvas. I would expect it to place a full circle.
rduchnikover 11 years ago
Been there done that:<p><a href="http://wpaint.websanova.com" rel="nofollow">http:&#x2F;&#x2F;wpaint.websanova.com</a>
评论 #6450167 未加载
jhonnycanoover 11 years ago
It would be awesome a tool like this, but with collaboration enabled (multiples drawers in different machines) !!
cbhlover 11 years ago
I just wanted to say that I was pleasantly surprised that this works so well with Chrome on my Android phone.
digitalsushiover 11 years ago
This is a nice app. Is there a way to allow multiple people to work together on the same whiteboard?
therealunrealover 11 years ago
This would be great in etherpad lite!
splatcollisionover 11 years ago
Really really nice, thanks for releasing. Anybody tried it with Zepto yet instead of jQuery?
keyleover 11 years ago
.be is Belgian, not French ;)
评论 #6449435 未加载
evenstoodover 11 years ago
Oh, nice sharing, I hope I try your JS script right know !
jpmatzover 11 years ago
And even working smoothly on touch devices, well done!
tallesover 11 years ago
Simple and working just as fine. Well done.
scriptstarover 11 years ago
Works perfectly in HTC Desire S. Thanks.
Beltirasover 11 years ago
This + WebRTC == win.
goshxover 11 years ago
the real world example using it is priceless.