Browse Source

Updated GUI to the new material setup.
There seems to be some bug in the picking code, will investigate.

Mr.doob 14 năm trước cách đây
mục cha
commit
60f70df2d2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      gui/js/Code.js

+ 1 - 1
gui/js/Code.js

@@ -153,7 +153,7 @@ var Code = function () {
 
 				var string = '';
 				string += '\n\tvar geometry = ' + object.geometry.gui.getCode() + ';';
-				string += '\n\tvar material = ' + object.materials[ 0 ].gui.getCode() + ';';
+				string += '\n\tvar material = ' + object.material.gui.getCode() + ';';
 				string += '\n\tvar mesh = new THREE.Mesh( geometry, material );';
 
 				if ( object.position.x != 0 ) string += '\n\tmesh.position.x = ' + object.position.x + ';';