Initial commit

This commit is contained in:
Thibault Blanc Beyne 2018-08-20 15:57:15 +02:00
commit 445d143c13
2 changed files with 35 additions and 0 deletions

22
index.html Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Escalator</title>
<meta charset="utf-8" />
<style>
* {
margin: 0px;
padding: 0px;
}
body {
overflow: hidden;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script src="js/main.js"></script>
</body>
</html>

13
js/main.js Normal file
View File

@ -0,0 +1,13 @@
"use strict";
let canvas = document.getElementById('canvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
console.log(canvas.width, canvas.height);
let context = canvas.getContext("2d");
context.fillStyle = "rgb(0.0, 0.0, 0.0)";
context.rect(canvas.width / 4, canvas.height / 4, canvas.width / 2, canvas.height / 2);
context.stroke();
console.log(canvas);