Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, we built our own little wrapper, basically doing the same thing as we did for audio. A few JSNI methods, more than anything. It does almost the same thing as GWTCanvas, only with far less functionality, and more toned to our needs. We did this for two reasons:

1. We didn't need 80% of the functionality that's in GWTCanvas (and canvas in general), and the 20% that we did need was a little buggy. We thought it'd simply be quicker and more efficient to build our own rather than modify or fix GWTCanvas.

2. <canvas> is, to paraphrase Tim Schafer, slower than molasses going uphill in january, on crutches. Might as well be using Flash, really. It also doesn't work on some browsers (we're unofficially, quietly, don't-tell-anyone-I-said-this, going for mobile device support as well), and doesn't work the same way across all browsers either.

What we've done is use a graphics abstraction layer, so that when the time comes that we implement it with the DOM (which we're slowly working on, but canvas will do for the moment), we need to change virtually nothing in the rest of the code.

Afaik the other half of the Flax project is writing a blog post as we speak about how we implement Canvas. I'll be sure to submit it to HN. ;)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: