fix this.size.x / y instead of width/height (since this is the vector definition)
@@ -103,17 +103,17 @@ class Scene
103
103
104
104
if(this.fullscreen)
105
105
{
106
this.size.width = window.innerWidth;
107
this.size.height = window.innerHeight;
106
this.size.x = window.innerWidth;
107
this.size.y = window.innerHeight;
108
108
}
109
109
110
this.canvas.width = this.size.width;
111
this.canvas.height = this.size.height;
110
this.canvas.width = this.size.x;
111
this.canvas.height = this.size.y;
112
112
113
113
this.canvas.style = 'position: absolute; left: ' + this.position.x + 'px; top: ' + this.position.y + 'px;'; //todo: only call when changed?
114
114
115
115
this.context.fillStyle = "rgb(" + this.backgroundColor.r + "," + this.backgroundColor.g + "," + this.backgroundColor.b + ")"; // sets the color to fill in the rectangle with
116
this.context.fillRect(0, 0, this.size.width, this.size.height);
116
this.context.fillRect(0, 0, this.size.x, this.size.y);
117
117
118
118
for(var i = 0; i < this.activeObjects.length; i++)
119
119
{
@@ -103,17 +103,17 @@ class Scene103
103
104
if(this.fullscreen)104
if(this.fullscreen)105
{105
{106
this.size.width = window.innerWidth;106
this.size.x = window.innerWidth;107
this.size.height = window.innerHeight;107
this.size.y = window.innerHeight;108
}108
}109
109
110
this.canvas.width = this.size.width;110
this.canvas.width = this.size.x;111
this.canvas.height = this.size.height;111
this.canvas.height = this.size.y;112
112
113
this.canvas.style = 'position: absolute; left: ' + this.position.x + 'px; top: ' + this.position.y + 'px;'; //todo: only call when changed?113
this.canvas.style = 'position: absolute; left: ' + this.position.x + 'px; top: ' + this.position.y + 'px;'; //todo: only call when changed?114
114
115
this.context.fillStyle = "rgb(" + this.backgroundColor.r + "," + this.backgroundColor.g + "," + this.backgroundColor.b + ")"; // sets the color to fill in the rectangle with115
this.context.fillStyle = "rgb(" + this.backgroundColor.r + "," + this.backgroundColor.g + "," + this.backgroundColor.b + ")"; // sets the color to fill in the rectangle with116
this.context.fillRect(0, 0, this.size.width, this.size.height);116
this.context.fillRect(0, 0, this.size.x, this.size.y);117
117
118
for(var i = 0; i < this.activeObjects.length; i++)118
for(var i = 0; i < this.activeObjects.length; i++)119
{119
{