The HTML Canvas, an element of the upcoming HTML 5 specification, allows you to efficiently draw arbitrary graphics at the primitive or individual pixel level. Find out how to implement a 3D rendering using the HTML Canvas.
by Greg Travis
August 26, 2008
ector graphics abound on the web, and they come in a variety of formats, including Flash and SVG. HTML Canvas, one of the newer incarnations, occupies a different niche from other vector graphics systems. While SVG is a declarative graphics file format that can be rendered by any kind of program and Flash is built around a complete multimedia system (including browser plug-in libraries, the ActionScript scripting language, and content-creation tools), HTML Canvas is HTML. In fact, HTML Canvas is part of the upcoming HTML 5 specification. As such, the HTML Canvas is integrated into the DOM tree, which means it can be accessed from JavaScript. Thus, the HTML Canvas allows you to do many of the things that Flash and SVG renderers can do.
The HTML Canvas bridges the gap between HTML markup and individual pixels. It allows you to efficiently draw arbitrary graphics at the level of individual drawing primitives or even at the level of individual pixels. And it lets you do it right from JavaScript.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!