Show HN: Drawingboard.js
51–60 of 65 posts
Re: Show HN: Drawingboard.js
#52Earlier quoted context omitted.
Thanks! By default the base64 string of the canvas image is stored in session storage to make the canvas persistent.
Leimi, any simple way to use a base64 image as background?
Re: Show HN: Drawingboard.js
#53Nice! Leimi - you should check out my project xBoard: https://github.com/eipark/xboard . It is somewhat similar, but focuses more on making the drawing canvas 'video'-like with a scrubber and recording functions. You should fork or pull pieces from it if you'd like that sort of functionality.
Re: Show HN: Drawingboard.js
#54Re: Show HN: Drawingboard.js
#55Re: Show HN: Drawingboard.js
#56Re: Show HN: Drawingboard.js
#57Seems to perform quite well, though the fill tool is a bit useless thanks to the antialiasing on the lines that can't be turned off. Considering the simple approach of this, I'd either remove the AA (or make it togglable) or get rid of the fill tool. Also... h1 { font-family: Comic Sans MS; } Seriously?
Yeah there's still a bit of work to do on the paint can. Hey, Comic Sans fits perfectly here, don't you think? :)
Re: Show HN: Drawingboard.js
#58Earlier quoted context omitted.
Yeah, there is smoothing of a sort. Most of these kind of drawing boards will take the current mouse position as it moves (x,y), and drop down a pixel or circle onto the canvas at that point. The smoothness you see here is that instead of just dropping down a point at each mouse coordinate, it creates a canvas path and simply adds a new point into the path and uses a quadratic curve between each point to do the smoot…
Thanks, FWIW the link I linked to was an implementation I did a week or so ago. I'm actually using a similar browser based curve implementation (I'm using the bezier rendering thing instead of a quadratic) -- https://github.com/ezl/signature-pad/blob/master/jquery.sign... The first pad is the original that just draws lines between the sampled points. The second 2 actually take points and compute a cubic spline that r…
My current best solution is to use mouse/pen movement as cspline sample points, even when not drawing. The motion as you swing into a curve, even before the pen touches down, often predicts the trajectory of the pen stroke. (This also lets you "swing in" a circle without getting ugly linear segments).
This may be of limited utility on a touch-based device, however.
Re: Show HN: Drawingboard.js
#59Re: Show HN: Drawingboard.js
#60.be is Belgian, not French ;)