- GPU program
- geometry (mesh)
as well as few functions to create and initialize the WebGL context.
GX3D.JS is based on the same 3D programming principles than GeeXLab.
Here is a code snippet that shows how to create a perspective camera:
To use the camera, just bind it:
camera = new GX3D.camera("camera1"); camera.set_viewport(0, 0, width, height); camera.set_perspective(60.0, width, height, 1.0, 1000.0); camera.set_position(2, 2, 3); camera.set_lookat(0, 0, 0);
An code sample of GX3D.js can be found in the WebGL Caps Viewer.