Creation of an HTML5 3D Sokoban level with Babylon.js

Babylon.js is a 3D engine based on webgl and javascript which allows you to do a lot of interesting stuff thanks to its enormous list of features you can see in the official site.

To show you some basic concepts, I am going to build a 3D Sokoban level like I did some years ago with Unity and some Flash 3D engines, look at these posts:

* Flash 3D Sokoban prototype with Flare3D
* Flash 3D Sokoban prototype with Away3D
* 3D Sokoban prototype with Unity

During the creation of this little level, we are going to learn these concepts:

* Create a scene
* Create an environmental fog
* Create a Box primitive
* Create a Sphere primitive
* Apply a diffuse color to a primitive (that is, paint it the color you want)
* Create a light
* Modify the size of primitives
* Add and control a camera – touch controls are managed by hands.js

This what we are going to do:

You can move the can along fixed arcs with mouse or arrow keys.

And this is the source code, first the HTML part:

Then, the fully commented javascript part, which is game.js file:

Next time, I am going to add interactivity and textures, meanwhile you can download the source code with all required libraries.