A Pen by 0gust1

Thumbnail
This awesome code was written by 0gust1, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 0gust1 ©
  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  0gust1</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <img id="planes" src="http://i42.tinypic.com/1zz48sn.jpg">
<hr/>
<canvas id="cnvs"></canvas>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/0gust1/a-pen-by-0gust1-LGjbzX */
#planes{display:none;}
#cnvs{width:500px;height:500px;}

/*Downloaded from https://www.codeseek.co/0gust1/a-pen-by-0gust1-LGjbzX */
var image = document.getElementById('planes');

function draw() {
    var ctx = document.getElementById('cnvs').getContext('2d');
    var img = new Image(image);
    ctx.drawImage(image, 0, 0, 500, 500);
}

draw();

Comments