p5.js Web Editor

Banaanimiehen koodi

Banaanimies

function setup() {

createCanvas(1000, 1000);

}

 

function draw() {

background('rgb(230, 216, 195)');

fill ('yellow');

//banaani

ellipse (500,500, 200,800)

//silmät

fill ('rgb(125,30,49)')

ellipse(550,500,50,70)

ellipse(450,500,50,70)

//hattu

rect(400,100,200,200)

rect(300,250,400,50)

}