added mona-lisa picture to the canvas
This commit is contained in:
19
sketch.js
19
sketch.js
@ -1,7 +1,16 @@
|
||||
function setup() {
|
||||
createCanvas(400, 400);
|
||||
let img;
|
||||
|
||||
// Load the image.
|
||||
function preload() {
|
||||
img = loadImage('/assets/mona-lisa.jpg');
|
||||
}
|
||||
|
||||
function draw() {
|
||||
background(220);
|
||||
}
|
||||
function setup() {
|
||||
createCanvas(400, 400);
|
||||
|
||||
// Display the image.
|
||||
img.resize(0, 400);
|
||||
image(img, 0, 0);
|
||||
|
||||
describe('Mona lisa - by Davincci');
|
||||
}
|
||||
Reference in New Issue
Block a user