Ruff Engine DC-1
This is my latest project. A 3D engine created from scratch. Written in vanilla Javascript. It differs from SC-1 in that it features a dynamic camera, so there are much more features to implement instead of just a simple rotation matrix.
Since this is my first time building a 3D engine and I'm splitting the mechanics up into smaller mini projects to work out the math for each function, I thought it would be good idea to build some kind of a learning/experimentation workspace in the program that gives me visual guidance as I build it. That way I can see if a function is behaving as it should
So instead of just having the camera's viewpoint in the program, I have created multiple panels that visualize the 3D space from different angles. And the natural coordinates (i.e. their inherent coordinates in the 3D space) of all the elements, vectors and points are fed through functions that draw them on the various viewports. This way I can see how everything is moving and verify. In addition I have written some projection visualization functions that display how the projection rays are travelling to the camera and how it transforms as the camera moves.
There is also a documentation page I've added that details out all the functions in the program and the concepts I've used.
Current status:
After lots of grinding and trial and error, I have created a rotation system for the camera that combines horizontal and vertical rotations. The camera is able to successfully rotate in 2 axis within the engine and all the vectors are transforming perfectly
I have set the program to initialize a few cubes (composed of triangles) to demonstrate this.
My next project on this engine is to build some camera lens functions. Where the projection rays enter the camera and then emulate the way real light rays behave in the real world. Namely refraction. I am currently working on this inner mini project.
Please feel free to play around with the engine. And I have also added in a lore and theory page over here that details out how everything in the engine works
I am currently creating an interactive diagram page which acts as an encyclopedia with expandable sections. A nice concise way of exploring the program's inner workings.