Ash Blue
Ash Blue

Reputation: 5582

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.

Upvotes: 2

Views: 2103

Answers (1)

Omiod
Omiod

Reputation: 11623

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.

Upvotes: 4

Related Questions