Przeglądaj źródła

Fixed decals example order.

Mr.doob 11 lat temu
rodzic
commit
7ceb151d5d
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      examples/webgl_decals.html

+ 1 - 0
examples/webgl_decals.html

@@ -289,6 +289,7 @@
 			material.color.setHex( Math.random() * 0xffffff );
 
 			var m = new THREE.Mesh( new THREE.DecalGeometry( mesh, p, r, s, check ), material );
+			m.renderDepth = - scene.children.length;
 			decals.push( m );
 			scene.add( m );