// Customise AB run parameters (optional).
// The following 3 parameters can be customised. (They have default values.)
AB.clockTick = int;
// Speed of run: Step every n milliseconds. Default 100.
AB.maxSteps = int;
// Length of run: Maximum length of run in steps. Default 1000.
AB.screenshotStep = int;
// For automatic generation of World images.
// Take screenshot on this step. (All resources should have finished loading.) Default 50.
function World() {
// Optional declaration:
// If endCondition is declared, runs will check for endCondition true and then terminate.
// If not declared, runs will make no such check.
this.endCondition = false;
// Optional functions:
// The following 3 function declarations are optional.
// If not declared, nothing happens and the run continues.
this.newRun = function()
{
// Code for Three.js initial drawing of objects.
// Should include one of:
// threeworld.init2d ( arguments );
// threeworld.init3d ( arguments );
};
this.nextStep = function()
{
// Code for Three.js re-drawing of objects.
if ( some condition ) // Optional: Check for condition that will end the run early.
{
this.endCondition = true; // This will end the run.
}
};
this.endRun = function()
{
};
}