2
0
Mr.doob 5 жил өмнө
parent
commit
9c9d05a2b9

+ 4 - 2
editor/js/Editor.js

@@ -643,6 +643,8 @@ Editor.prototype = {
 
 
 	fromJSON: function ( json ) {
 	fromJSON: function ( json ) {
 
 
+		var scope = this;
+
 		var loader = new THREE.ObjectLoader();
 		var loader = new THREE.ObjectLoader();
 		var camera = loader.parse( json.camera );
 		var camera = loader.parse( json.camera );
 
 
@@ -653,9 +655,9 @@ Editor.prototype = {
 		this.history.fromJSON( json.history );
 		this.history.fromJSON( json.history );
 		this.scripts = json.scripts;
 		this.scripts = json.scripts;
 
 
-		loader.parse( json.scene, ( scene ) => {
+		loader.parse( json.scene, function ( scene ) {
 
 
-			this.setScene( scene );
+			scope.setScene( scene );
 
 
 		} );
 		} );