jsketcher/web/app/viewer2d.js
2014-09-16 22:07:37 -07:00

15 lines
No EOL
335 B
JavaScript

TCAD.Viewer2D = function(canvas) {
function updateSize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
// window.addEventListener( 'resize', updateSize, false );
updateSize();
this.ctx = canvas.getContext("2d");
this.ctx.fillStyle = "#FF0000"
this.ctx.fillRect(400, 500, 100, 100)
}