Browse Source

fix unique node

sunag 8 năm trước cách đây
mục cha
commit
52836bac07
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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 );