Using WebGL 3D Shapes as 2D Canvas Images

I'm creating a 2D Canvas game with cubes raining down on players. Their goal is to shoot or dodge them. Right now the cubes are just 2D JavaScript OOP entities. What I want to do is replace the 2D cube graphics with WebGL 3D cubes.

My question is, what's the best approach to use WebGL's 3D graphics in a 2D game? I'm looking for something similar to Opera's HTML5 Emberwind. They use 3D graphics in a 2D space to create character animations instead of using image sprites.

Answers


Use three.js ( http://mrdoob.github.com/three.js/ ) to easily handle 3D graphics, and put all the game itemes in the same plane, so you can build a so called 2.5D game.

If you are worried about IE users, stick with the Canvas renderer, otherwise use the high performances WebGL renderer.


Need Your Help

How are variables scoped when calling the same Play template again?

java templates view playframework

I'm writing a tag that keeps track of how many time it was called, in order to generate unique ids for its elements:

Symbolication of Crash Log fails to Symbolicate any Framework Libraries

iphone ios crash-reports symbolicate symbolicatecrash

I'm trying to include some crash reports with a TSI incident, however I can only get the logs to be partially symbolicated. I have tried using the Organizer panel in Xcode 4.2 and using the Perl sc...

Regular expression to find one or more than one substring inside big string

ruby regex

Hi i want regular expression to find one or more than one substrings inside big string match some criteria like.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.