14 lines
385 B
JavaScript
14 lines
385 B
JavaScript
|
"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);
|