Browse Source

Editor: Handle old app.json.

Mr.doob 9 năm trước cách đây
mục cha
commit
a976b1352b
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      editor/js/Editor.js

+ 6 - 2
editor/js/Editor.js

@@ -447,8 +447,12 @@ Editor.prototype = {
 
 		// TODO: Clean this up somehow
 
-		this.config.setKey( 'project/renderer/shadows', json.project.shadows );
-		this.config.setKey( 'project/vr', json.project.vr );
+		if ( json.project !== undefined ) {
+
+			this.config.setKey( 'project/renderer/shadows', json.project.shadows );
+			this.config.setKey( 'project/vr', json.project.vr );
+
+		}
 
 		var camera = loader.parse( json.camera );