3 ms·
I believe this is caused by .clip() being "wonky" in Chrome. I think the better alternative to .clip() is: context.closePath(); context.fill(); context.g
by daxterspeed 11y ago
I believe this is caused by .clip() being "wonky" in Chrome. I think the better alternative to .clip() is:
context.closePath();
context.fill();
context.globalCompositeOperation = "source-atop";
In action: http://codepen.io/anon/pen/mJOOxv http://codepen.io/anon/pen/mJOOxv
[1] http://www.w3.org/TR/2015/WD-2dcontext-20150514/#dom-context-2d-globalcompositeoperation http://www.w3.org/TR/2015/WD-2dcontext-20150514/#dom-context...
[2] https://developer.mozilla.org/samples/canvas-tutorial/6_1_canvas_composite.html https://developer.mozilla.org/samples/canvas-tutorial/6_1_ca...