瀏覽代碼

Merge pull request #13344 from Astrak/TransformControls-vs-transparency

Transform controls vs transparency vs fog
Mr.doob 7 年之前
父節點
當前提交
588719770b
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      examples/js/controls/TransformControls.js

+ 5 - 0
examples/js/controls/TransformControls.js

@@ -12,6 +12,7 @@
 
 		this.depthTest = false;
 		this.depthWrite = false;
+		this.fog = false;
 		this.side = THREE.FrontSide;
 		this.transparent = true;
 
@@ -48,6 +49,7 @@
 
 		this.depthTest = false;
 		this.depthWrite = false;
+		this.fog = false;
 		this.transparent = true;
 		this.linewidth = 1;
 
@@ -134,6 +136,9 @@
 
 						object.name = name;
 
+						//avoid being hidden by other transparent objects
+						object.renderOrder = Infinity;
+
 						if ( position ) object.position.set( position[ 0 ], position[ 1 ], position[ 2 ] );
 						if ( rotation ) object.rotation.set( rotation[ 0 ], rotation[ 1 ], rotation[ 2 ] );