Learn to build a simple O3D 3D web application with this free tutorial.
If you are a developer on a budget O3D is one of the best ways to get a high end 3D application onto a web browser. It’s free, open source, and gives web developers the opportunity to utilize the underlying 3D hardware of a PC using a familiar language – JavaScript.
That said, if you are looking at the O3D sample applications for the first time it can be pretty daunting. O3D is a low level API and doesn’t try to hide it, and even though there is a utility JavaScript library to automate a lot of the more common procedures the code can still be hard to follow. Using O3D is like getting a new piece of furniture from Ikea, losing the instructions, and then having to work out how things were done by looking at photos of other Ikea products – once you understand the logic everything falls into place, but things won’t snap together straight away.
It was always the intention of the O3D developers that higher level APIs would be built on top of O3D, but since it is still such a young product these 3rd party libraries are hard to come by. Over the next few years (assuming Google keeps supporting the O3D project) I would expect to see a lot more 3rd party support, but for now we will have to make own.
In this tutorial series we will build up a simple JavaScript library that extends O3D and its utility JavaScript library with the intension of creating an interface that exposes the power of O3D in a more logical and beginner friendly fashion.
The library will use JavaScript as an object oriented language. You can find an excellent article on JavaScript Object Oriented Programming principals, hosted on the Mozilla developer centre, here. It steps you through the basic principles of Object Oriented Programming, and then gives some simple examples of how they are implemented using JavaScript prototype based design.