mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 01:13:27 +01:00
15 lines
No EOL
335 B
JavaScript
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)
|
|
|
|
} |