Explorar o código

Merge pull request #12566 from makc/patch-5

support opacity in assimp2json loader
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
cb66e88253
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      examples/js/loaders/AssimpJSONLoader.js

+ 7 - 0
examples/js/loaders/AssimpJSONLoader.js

@@ -219,6 +219,13 @@ THREE.AssimpJSONLoader.prototype = {
 						material.flatShading = ( value === 1 ) ? true : false;
 						break;
 
+					case '$mat.opacity':
+						if ( value < 1 ) {
+							material.opacity = value;
+							material.transparent = true;
+						}
+						break;
+
 				}
 
 			}