added mona-lisa picture to the canvas
This commit is contained in:
BIN
assets/mona-lisa.jpg
Normal file
BIN
assets/mona-lisa.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 470 KiB |
17
sketch.js
17
sketch.js
@ -1,7 +1,16 @@
|
|||||||
function setup() {
|
let img;
|
||||||
createCanvas(400, 400);
|
|
||||||
|
// Load the image.
|
||||||
|
function preload() {
|
||||||
|
img = loadImage('/assets/mona-lisa.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw() {
|
function setup() {
|
||||||
background(220);
|
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