Aula 4 - Canvas
15
-
Upload
allyson-souza -
Category
Education
-
view
411 -
download
0
Transcript of Aula 4 - Canvas
var canvas = document.getElementById("game");
var contexto = canvas.getContext("2d");
var image = document.getElementById('boi');
contexto.drawImage(image, 0, 0);
<body>
<canvas id="game" width="800"height="600">
<img id="boi" src="images/boizinho.png"width="481" height="640">
</canvas>
<script type="text/javascript"src="js/game.js"></script>
</body>