Code viewer for World:
fish
// Cloned by Elva on 13 Dec 2020 from World "x y z World" by test2
// Please leave this clone trail here.
var img;
function preload()
{
img = loadImage ( '/uploads/test2/1606057486.png' );
}
const objectsize = 50; // size of object
const anglechange = 0.005; // how much the rotate angle changes each step
var angle = 0; // rotate angle starts at 0
function setup() // "setup" is called once at start of run
{
createCanvas ( ABWorld.fullwidth(), ABWorld.fullheight(), WEBGL );
}
function draw() // "draw" is called every timestep during run
{
texture(img);
background("cornflowerblue"); // background color
// fill("navy"); // paint box with this color
rotateX(angle); // set each dimension rotation angle to "angle"
rotateY(angle);
rotateZ(angle);
translate ( 0, 0, 0 ); box(objectsize);
translate ( 50, 50, 0 ); box(objectsize);
translate ( 50, 50, 0 ); box(objectsize);
translate ( 50, 50, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( -50, -50, 0 ); box(objectsize);
translate ( -50, -50, 0 ); box(objectsize);
translate ( -50, -50, 0 ); box(objectsize);
translate ( -50, 50, 0 ); box(objectsize);
translate ( -50, 50, 0 ); box(objectsize);
translate ( -50, 50, 0 ); box(objectsize);
translate ( -100, -100, 0 ); box(objectsize);
translate ( -100, -100, 0 ); box(objectsize);
translate ( 50, 50, 0 ); box(objectsize);
translate ( 50, 50, 0 ); box(objectsize);
translate ( 50, 50, 0 ); box(objectsize);
translate ( -100, 100, 0 ); box(objectsize);
translate ( -100, 100, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( 100, -100, 0 ); box(objectsize);
translate ( 100, -100, 0 ); box(objectsize);
translate ( -350, -50, 0 ); box(objectsize);
translate ( 50, -50, 0 ); box(objectsize);
translate ( -50, 50, 0 ); box(objectsize);
angle = angle + anglechange ; // change angle each step to get rotate movement
}