Insert the following code at the top of the program:
var img;
function preload()
{
img = loadImage ( '/uploads/starter/earth.1.jpg' );
}
Put the following code inside the "draw" function. Remove the line that makes the cube a solid color, and insert this line instead:
texture(img);
You will now get something like the following: