I love HTML Canvas. I even wrote a book
about it once. Canvas is good drawing API and it runs everywhere. However, despite the magic that is the
Canvas API, it can still be tricky to use when it interacts with CSS. I often have people ask me how to make
their canvas fill the screen, or resize with the window, or to have a fixed aspect
ratio but still scale to fit inside the window without overlap. All of these require understanding some
internal details about how Canvas works. So let’s dive in.
I love HTML Canvas. I even wrote a book about it once. Canvas is good drawing API and it runs everywhere. However, despite the magic that is the Canvas API, it can still be tricky to use when it interacts with CSS. I often have people ask me how to make their canvas fill the screen, or resize with the window, or to have a fixed aspect ratio but still scale to fit inside the window without overlap. All of these require understanding some internal details about how Canvas works. So let’s dive in.
In the last couple of years I’ve seen a lot of lamenting about the browser mono-culture. I even wrote about it myself. Some complains focus on how complicated the web specs have become. So big that only a few companies can implement a browser from scratch. I think these complaints are misplaced. Even if the web platform didn’t have such a large API surface it still wouldn’t matter. You can’t build a large scale browser with large marketshare. The browser market would still be a monoculture. You can't solve a business problem with a technology solution. I also don't think that replacing the web with something smaller like Gemini is the answer.
When you think of a book you probably think of prose. A bunch of paragraphs with section headers and chapter names, and perhaps a few illustrations. In short, you are thinking of a paper book. When I first wrote the HTML Canvas Deep Dive I was thinking along those lines as well, but I also wanted interactivity. What’s the point of having an educational book on the web if we can’t push the envelope a bit.
Some years ago I wrote a book called the HTML Canvas Deep Dive. To be truthful the writing was an accident. I taught a workshop four years in a row at OSCON, back when it was in Portland. Whenever I teach a workshop I want the students to have something to take away with them in case they don't finished, so I structure it as a series of lessons with hands on activities. Eventually I realized that if I simply called these chapters instead of lessons then I'd have a book on my hands. So that became the first release of HTML Canvas Deep Dive.
I've done a major refactoring which will make Amino easier to install, easier to maintain and, eventually, better performance and portability. Part of this work involved moving the platform specific parts to their own node modules. This means you should no longer install aminogfx directly. Instead, install the appropriate platform specific module. Currently there is one for GL and one for Canvas. I've also added stage transparency support to Raspberry Pi!
I love symbol fonts. My new favorite is Font Awesome, an
open source font with over 300 icons. Symbol fonts are great because
they are pure vectors. They scale with everything else in your page
and look pixel perfect on any DPI display, retina or otherwise.
The call for proposals for OSCON 2013 just went out. OSCON is the one conference I try to speak at every year because the topics are so diverse and interesting. And being just up the road in Portland doesn't hurt either. However, I'm having trouble deciding what to submit. Too many things interest me. So I thought I'd consult the wisdom of the crowd. What do you want to see?
I mentioned a few days ago that I updated my Canvas Deep Dive ebook and dropped the price to free. But wait, there's more! I've also completely open sourced the book. My goal with Deep Dive was always to disseminate information as widely as possible. There is no better way to do that than giving it to the world.
This week at OSCON gave an updated version of my 3 hour Canvas tutorial. I think the session was well received. It was one of only a few tutorials that was completely sold out, 200 seats taken. But if you couldn't be one of those two hundred I don't want you to miss out.
I'm happy to announce that my new book Building Mobile Applications with Java Using GWT and PhoneGap has been published in both print and ebook editions. While I love having a print edition, the ebook Kindle version, at $9.99 is half the price for the exact same content. Sure, you can't write on it with a marker, but the convenience and price is well worth it.
Thanks to my HTML Canvas Deep Dive at OSCON, .net Magazine asked me to write a tutorial for them. The topic was just something interesting with Canvas. I'm a huge fan of infographics, as well as .net Magazine, so I jumped at the chance to write for them. I recently discovered an amazing treasure trove of data at the World dataBank, so that formed the core of the article.
I'm very happy to announce that my interactive book, HTML Canvas: A Travelogue, is now available for the iPad. It includes the same great content as the webOS version: a complete introduction to HTML Canvas with interactive examples, for just $4.99. Several bugs have been fixed in this build, which are coming soon to webOS as well.