From 445d143c13eaf9ec69ebb87e2b94b20865898310 Mon Sep 17 00:00:00 2001 From: Thibault Blanc Beyne Date: Mon, 20 Aug 2018 15:57:15 +0200 Subject: [PATCH] Initial commit --- index.html | 22 ++++++++++++++++++++++ js/main.js | 13 +++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 index.html create mode 100644 js/main.js diff --git a/index.html b/index.html new file mode 100644 index 0000000..5fbda65 --- /dev/null +++ b/index.html @@ -0,0 +1,22 @@ + + + + Escalator + + + + + + + + + diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..1415856 --- /dev/null +++ b/js/main.js @@ -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);