I did it
@@ -6,6 +6,7 @@ class Scene
6
6
position = null;
7
7
size = null;
8
8
real_position = null;
9
px = 0; py = 0;
9
10
real_size = null;
10
11
cameraPosition = null;
11
12
parentScene = null;
@@ -156,6 +157,18 @@ class Scene
156
157
if (this.canvas.height != this.real_size.y)
157
158
this.canvas.height = this.real_size.y;
158
159
160
if (px != this.real_position.x)
161
{
162
px = this.real_position.x;
163
this.canvas.style.left = this.real_position.x;
164
}
165
166
if (px != this.real_position.y)
167
{
168
px = this.real_position.y;
169
this.canvas.style.top = this.real_position.y;
170
}
171
159
172
if (this.renderBackground)
160
173
{
161
174
this.context.fillStyle = "rgb(" + this.backgroundColor.r + "," + this.backgroundColor.g + "," + this.backgroundColor.b + ")"; // sets the color to fill in the rectangle with
@@ -6,6 +6,7 @@ class Scene6
position = null;6
position = null;7
size = null;7
size = null;8
real_position = null;8
real_position = null;9
px = 0; py = 0;9
real_size = null;10
real_size = null;10
cameraPosition = null;11
cameraPosition = null;11
parentScene = null;12
parentScene = null;@@ -156,6 +157,18 @@ class Scene156
if (this.canvas.height != this.real_size.y)157
if (this.canvas.height != this.real_size.y)157
this.canvas.height = this.real_size.y;158
this.canvas.height = this.real_size.y;158
159
160
if (px != this.real_position.x)161
{162
px = this.real_position.x;163
this.canvas.style.left = this.real_position.x;164
}165
166
if (px != this.real_position.y)167
{168
px = this.real_position.y;169
this.canvas.style.top = this.real_position.y;170
}171
159
if (this.renderBackground)172
if (this.renderBackground)160
{173
{161
this.context.fillStyle = "rgb(" + this.backgroundColor.r + "," + this.backgroundColor.g + "," + this.backgroundColor.b + ")"; // sets the color to fill in the rectangle with174
this.context.fillStyle = "rgb(" + this.backgroundColor.r + "," + this.backgroundColor.g + "," + this.backgroundColor.b + ")"; // sets the color to fill in the rectangle with