Selaa lähdekoodia

LDrawLoader: Make lines honor material opacity

yomboprime 6 vuotta sitten
vanhempi
commit
51a9f30c4a
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      examples/js/loaders/LDrawLoader.js

+ 5 - 1
examples/js/loaders/LDrawLoader.js

@@ -1288,7 +1288,11 @@ THREE.LDrawLoader = ( function () {
 			if ( ! edgeMaterial ) {
 
 				// This is the material used for edges
-				edgeMaterial = new THREE.LineBasicMaterial( { color: edgeColour } );
+				edgeMaterial = new THREE.LineBasicMaterial( {
+					color: edgeColour,
+					transparent: isTransparent,
+					opacity: alpha
+				} );
 				edgeMaterial.userData.code = code;
 				edgeMaterial.name = name + " - Edge";
 				edgeMaterial.userData.canHaveEnvMap = false;