function World()
{
this.newRun = function()
{
// Code to execute once at the start.
// Should call:
// ABWorld.init ( COLOR );
};
this.nextStep = function()
{
// Code to execute every step.
// Can put P5 instructions to be executed every step here, or in draw()
};
this.endRun = function()
{
};
}
//---- setup -------------------------------------------------------
// Do NOT make a setup function.
// This is done for you in the API. The API setup just creates a canvas.
// Anything else you want to run at the start should go into the following two functions.
function beforesetup() // Optional
{
// Anything you want to run at the start BEFORE the canvas is created
}
function aftersetup() // Optional
{
// Anything you want to run at the start AFTER the canvas is created
}
//---- draw -------------------------------------------------------
function draw() // Optional
{
// Can put P5 instructions to be executed every step here, or in World.nextStep()
}