Initial commit
This commit is contained in:
commit
445d143c13
|
@ -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>
|
||||
|
|
@ -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);
|
Loading…
Reference in New Issue