dojox.gfx3d.Viewport (Viewport in the following4) is the container for all 3D objects, created by the exported static function, createViewport:
dojox.gfx3d.createViewport(parentNode, width, height)
Viewport would expose the following interfaces to create basic 3D objects:
dojox.gfx3d.Viewport.createLine(start, end) dojox.gfx3d.Viewport.createPath(path) dojox.gfx3d.Viewport.createTriangle(a, b, c)
and some high level objects as well:
dojox.gfx3d.Viewport.createCube(upper, lower) dojox.gfx3d.Viewport.createCylinder(top, bottom, r) dojox.gfx3d.Viewport.createPipe(path, r) dojox.gfx3d.Viewport.createCone(top, bottom, r)
Viewport is the container of 3D objects, and also the environment and viewport.
dojox.gfx3d.Viewport.setCamera(camera) dojox.gfx3d.Viewport.addLighting(lighting)
We may steal more ideas from Pov-Ray5
Viewport is also our home-brewed 3D engine, with the folowing services exported:
dojox.gfx3d.Viewport.applyCameraTransform(point) dojox.gfx3d.Viewport.renderLighting(surface, texture)