Are you fading out images in the HTML5 canvas by painting a transparent black rectangle over the top? Did you test your animation in different browsers? You may be unaware that ugly gray remnants are being left behind. I discuss the problem, how to predict the color of these remnants, and some workarounds.
Archives for Beginner Tutorial
Smooth dragging – extending our simple dragging example
A new HTML5 Canvas and JavaScript tutorial. We extend our earlier simple example of dragging objects in the canvas with the mouse. Here, we use a timer-based animation technique with smooth motion, show how to change the layering order of the dislpay objects, and fill the objects with a nice gradient.