|
@@ -154,10 +154,18 @@ var APP = {
|
|
|
this.width = width;
|
|
|
this.height = height;
|
|
|
|
|
|
- camera.aspect = this.width / this.height;
|
|
|
- camera.updateProjectionMatrix();
|
|
|
+ if ( camera ) {
|
|
|
+
|
|
|
+ camera.aspect = this.width / this.height;
|
|
|
+ camera.updateProjectionMatrix();
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- renderer.setSize( width, height );
|
|
|
+ if ( renderer ) {
|
|
|
+
|
|
|
+ renderer.setSize( width, height );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
};
|
|
|
|
|
@@ -249,6 +257,10 @@ var APP = {
|
|
|
|
|
|
renderer.dispose();
|
|
|
|
|
|
+ camera = undefined;
|
|
|
+ scene = undefined;
|
|
|
+ renderer = undefined;
|
|
|
+
|
|
|
};
|
|
|
|
|
|
//
|