GX3D.js

Simple Javascript WebGL Layer.


GX3D.JS is a very simple Javascript layer over the WebGL API. In its first version, GX3D.JS defines the following objects:

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:

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);
To use the camera, just bind it:
camera.bind();

An code sample of GX3D.js can be found in the WebGL Caps Viewer.