Re:Show HN: A visual HTML5 animation editor in your browser
by squared9 on Friday March 07, 2014 @02:53PM
(#7362353)
The original Java code for bucket fill is very fast, sub-second fills in most cases however after converting the code to JavaScript the performance gets worse in some specific cases (Bezier offsetting/flattening combined with Boolean operations for non-closed or transparent shapes). There are some advanced math and algorithmic tricks used in the Lasso tool to speed up exactly the same class of problematic cases in JavaScript. Bucket fill is however more complex which doesn't allow straightforward reuse of these algorithms; additional algorithms are currently being developed to deal with it.
Good luck with your nice paint app! ;-)
Re:Show HN: A visual HTML5 animation editor in your browser
by skavish on Friday March 07, 2014 @12:09PM
(#7361363)
thanks! you have made a nice tool yourself!
yes, the bucket sometimes could be slow/freezy. mostly because there are still some problems in the algo. our editor works with vector, so all operations including bucket basically create new vector shapes based on current geometry. it does not do bitmap fill.
Your fill-bucket tool is a little freezy, as I'm sure you are aware. I made an HTML5 static image editor http://yangcanvas.com/paint and I found a good fill-bucket tool hard to implement too. Your tools does fill ranges perfectly, which is really nice. Good luck making that work more efficiently without sacrificing precision as I did.