« 13-Minute Overview of IE9 Pinned Sites for Developers | Main | "How Ink Is Made" by The Printing Ink Company »
Thursday
May262011

Fun with Arcs and Canvas in HTML5

Earlier today, I spent a few minutes playing around with the 2D drawing context for the HTML5 canvas element and came up with the following simple example:

This example (above) shows how to animate a series of arcs (i.e. circles) over time on the HTML5 canvas. The blending of arcs that occurs is accomplished by applying a decreasing alpha value to each arc for each pass the drawing code executes over time. Alternatively, these arcs are removed if they hit the top of the context boundary.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>