瀏覽代碼

fix unique node

sunag 8 年之前
父節點
當前提交
52836bac07
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      examples/js/nodes/TempNode.js

+ 6 - 0
examples/js/nodes/TempNode.js

@@ -49,6 +49,12 @@ THREE.TempNode.prototype.build = function( builder, output, uuid, ns ) {
 
 			return THREE.GLNode.prototype.build.call( this, builder, output, uuid );
 
+		} else if ( isUnique ) {
+
+			data.name = data.name || THREE.GLNode.prototype.build.call( this, builder, output, uuid )
+
+			return data.name;
+
 		} else if ( ! builder.optimize || data.deps == 1 ) {
 
 			return THREE.GLNode.prototype.build.call( this, builder, output, uuid );