I heard about 3D canvas. It's strange for me. Because I know there's already a industrial standard 3D API WebGL. What's that? How is it different with WebGL?
HTML5 3D Canvas – What is HTML5 3D Canvas and How is it Different from WebGL?
3dhtml5
Related Solutions
HTML 5 is not a replacement for Flash. Its various technologies provide alternative mechanisms for doing many or even all of the things that you can do in a Flash app, but it's not correct to say that it is the 'anything' for Flash.
Both CSS and JavaScript are still extremely important technologies in the HTML 5 toolkit. You still need to style your interfaces, and CSS is how you do it. You still need to provide client-side programmability, and JavaScript is how you do it.
In fact, JavaScript becomes even more important than it already is in HTML 5. The HTML 5 standard defines a very rich and powerful set of services, and they are all exposed and programmed against with JavaScript.
Check out this great HTML 5 demo web site to get a better idea of what it is all about.
It's probably worth mentioning that Google Gears is one product that is very definitely being phased out because it will be replaced by HTML 5. I can't think of anything else that is being made truly obsolete by it.
Generally speaking, 2D and pseudo-3D (such as isometric and other axonometric projections) is much easier than 3D in many regards.
First of all, 3D game logic is way more complex than 2D - many simple techniques for things like collision detection and physics simply don't work in 3D, and even for those that do, wrapping your head around what happens is significantly harder in 3D. (After all, we humans are built for living on a relatively flat surface, so our brains are inherently 2.5D).
Another problem is that 3D artwork is a lot more complex. With 2D graphics, you only have one viewpoint to consider; if your sprite looks good in the editor, it will look good in the game. In 3D, you are typically using mesh models, and they are dynamically shaded, and both the viewpoint and the light direction can be virtually anything. Your models still need to look convincing at all times, which makes creating them much harder than 2D sprites.
And then there are the technical constraints of the web:
- WebGL is not yet universally available; getting it to run at all involves quite some black magic on some platforms, and even if it does work, performance characteristics are quite unreliable. 2D canvas, by contrast, works out-of-the box on any recent browser and OS. Doing 3D graphics on a 2D canvas, while perfectly possible, requires considerable trickery to get partial occlusion right (either clipping polygons against each other yourself, or using the sub-optimal Painter's Algorithm), and textured primitives are pretty much impossible. You'll also have to write all the lighting code yourself. A typical isometric graphics engine, however, is perfectly doable on a 2D canvas.
- Javascript is single-threaded, and wasn't meant to provide accurate low-granularity timing, which you need for smooth graphics. Hickups in animation smoothness are much more tolerable in a 2D game than in 3D, unless the 3D scene is mostly static and doesn't involve a moving camera.
Best Answer
WebGL is rendered onto a
canvas
element with a context acquired from it. So "3D canvas" and WebGL are pretty much synonyms.