19 - A Star Is Born/script.js
//Prevents objects to float away from the canvas

Prevents objects to float away from the canvas
Prevents objects to float away from the canvas
function putWallsAroundCanvas(){
    let edge1 = new Wall(0, 0, canvas.clientWidth, 0);
    let edge2 = new Wall(canvas.clientWidth, 0, canvas.clientWidth, canvas.clientHeight);
    let edge3 = new Wall(canvas.clientWidth, canvas.clientHeight, 0, canvas.clientHeight);
    let edge4 = new Wall(0, canvas.clientHeight, 0, 0);
}
function putWallsAroundCanvas ( ) { let edge1 = new Wall ( 0 , 0 , canvas . clientWidth , 0 ) ; let edge2 = new Wall ( canvas . clientWidth , 0 , canvas . clientWidth , canvas . clientHeight ) ; let edge3 = new Wall ( canvas . clientWidth , canvas . clientHeight , 0 , canvas . clientHeight ) ; let edge4 = new Wall ( 0 , canvas . clientHeight , 0 , 0 ) ; }
Prevents objects to float away from the canvas
Prevents objects to float away from the canvas