Browsing Posts in Uncategorized

This is a big overhaul of one of my tutorials on making and moving shapes on an HTML5 Canvas. This new tutorial is vastly cleaner than my old one, but if you still want to see that one or are looking for the concept of a “ghost context” you can find that one here. This [...]

I live my life in a state of constant, quiet amazement. Almost everything is impressive to me, from the last book I read to the last soup I ate. I don’t get bored, and am often happy to just sit and think about things, pretty much any thing. It’s just reached midnight in New Hampshire, [...]

There’s a common point of confusion regarding when one can use HTML5 Canvas getImageData() and toDataUrl() methods. Certain operations will cause these methods to throw a security error instead of functioning normally. The rules for what one can and cannot do are laid out in the spec, though the reasoning behind them isn’t so obvious. [...]

The HTML5 Canvas does not have a method for getting the current transformation matrix. For some applications, keeping track of the current transformation matrix would be a nice feature to have. I’ve made this easier by creating a simple Transform class for use with Canvas. You can have a look at it here. It has [...]

This article is one in a series of performance articles I am writing on Canvas. I’m considering writing a small (e-)book on Canvas performance issues, considerations and tips. If you’d be interested in that sort of thing, let me know. Much of the functionality of Canvas comes from its path drawing functions. Unfortunately for game [...]

Friends, HNers, and redditors alike are still complaining that they have yet to be invited to Google+. Initially I thought that Google+ being invite-only was a folly on Google’s part; some silly thing that they didn’t work out beforehand that could be a large blow in its infancy. But after several days of having Google+ [...]

Stop the press! As seen in jsperf, the nightly build of Chrome (14) has optimized the width-setting case and now swings heavily the other way. As with all optimizations, be sure to bench often on the platforms and browser versions you are targeting. I’m considering writing a small (e-)book on Canvas performance issues, considerations and [...]

I have in my possession sufficient evidence for the conviction of Canvas’ drawText(). The charge? Performance murder. drawText() resisting arrest I suspected drawText() of being slow ever since adding blocks of text as interactive objects to a Canvas library I am working on. I’ve also begun writing a canvas performance guidebook, so the sacrament of [...]

Everyone knows Javascript doesn’t have classes. Thankfully most Javascript programmers are very good at playing pretend. Because so many people attempt to introduce a classical structure to their Javscript code, I figure I’ll share some of my findings. Below is one way of allowing a base class function to copy an instance of a subclass [...]

Merely two days after I apply to test drive a Chrome OS notebook, one arrives in the mail! It was packaged inside a very happy box. The contents were minimal: One laptop, one battery, one charger, one single page instruction card and one business card from Intel. Challenge accepted. The exterior of the laptop has [...]