I am now working on my 0.3 release for my processing.js project. Since my initial release schedule had changed so many times I wanted to reiterate the deliverable. Here is what I am trying to accomplish.
Now before I go on, I wanted to point out that for all of the 3D stuff I am using static vertices. The reason for this is primarily do to the fact that creating vertices on the fly would take too long to render. Getting these static vertices was kind of a project in itself. I thought it would just be as simple as creating the object in 3Ds Max and exporting it into an .obj. But unfortunately the vertices are exported with a sort of legend/index. You have to copy & paste the vertices to fit into the appropriate location specified by this legend. (mambo jumbo I know).
Anyhow, with Andor’s help i got my box() and sphere() working. Well kind of working, the scaling transformation that I apply after the camera transformation is not working. This may fix itself when the camera functions are written.
Check out my rotating box() and sphere(). I added the rotateX to test the other functions. I got the rotation matrix from my “Introduction to 3D Game Programming with DirectX 9.0” book. However, i see that Andor bet me to the punch! Arggggg!.