function World() { this.newRun = function() { // Code for initial graphics drawing of objects. // Canvas setup: // threeworld.init ( arguments ); // To draw on canvas: // var ctx = threeworld.getContext ( type ); // type = "2d" or "webgl" }; this.nextStep = function() { // Code for graphics re-drawing of objects. // To draw on canvas, see threeworld.getContext as above. }; this.endRun = function() { }; }