Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var ctx = require('fc')(function() {
ctx.fillStyle = "red";
ctx.clear();
ctx.save();
ctx.translate(window.innerWidth/2, window.innerHeight/2);
ctx.scale(scale, scale);
// compute where the mouse is in the scene
var mat = ctx.getTransform();
mat3.invert(m3scratch, mat)
vec2.transformMat3(v2scratch, mouse, m3scratch);
// draw the mouse!
ctx.fillRect(v2scratch[0] - 5, v2scratch[1] - 5, 10, 10);
ctx.restore();
}, true);