User:CannonFizzy/vector.js

/*jshint esversion: 6 */

var canvas = document.createElement("canvas"); document.body.appendChild(canvas); canvas.id = "fizzy-overlay-canvas"; var c = canvas.getContext("2d");

function updateCanvasSize { canvas.width = window.innerWidth; canvas.height = window.innerHeight; }

addEventListener("resize", updateCanvasSize); updateCanvasSize;

function updateCanvas { requestAnimationFrame(updateCanvas); } updateCanvas;

document.addEventListener("click", function(event) {	c.fillStyle = "#F3399A";	// c.fillRect(event.clientX, event.clientY, 5, 5); });