Browse Source

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

Transform controls vs transparency vs fog
Mr.doob 7 years ago
parent
commit
588719770b
1 changed files with 5 additions and 0 deletions
  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 ] );