// Cloned by Terry D on 20 Feb 2019 from World "One Cube World (P5)" by Starter user
// Please leave this clone trail here.
var angle = 0;
var angle_speed = 0.01;
var background_img;
var love;
function preload() {
background_img = loadImage("/uploads/9dots/rainbow_background.jpg");
}
function setup() {
createCanvas(ABWorld.fullwidth(), ABWorld.fullheight(), WEBGL);
love = createGraphics(300, 300);
love.fill('navy');
love.textAlign(CENTER);
love.textSize(150);
love.text('love', 150, 150);
}
function draw() {
// background - doesn't rotate if rotate commands are below it
background(240, 0, 240);
translate(0, 0, -500);
texture(background_img);
rect(-600, -600, 1200, 1200);
// love box
texture(love);
angle += angle_speed;
rotateX(angle);
rotateY(angle);
box(300);
}