Explorar o código

Examples: Clean up. (#24118)

Michael Herzog %!s(int64=3) %!d(string=hai) anos
pai
achega
86f51a6a91

+ 4 - 2
examples/jsm/loaders/LWOLoader.js

@@ -350,6 +350,8 @@ class MaterialParser {
 
 		const materialType = this.getMaterialType( connections.attributes );
 
+		if ( materialType !== MeshPhongMaterial ) delete params.refractionRatio; // PBR materials do not support "refractionRatio"
+
 		return new materialType( params );
 
 	}
@@ -591,8 +593,6 @@ class MaterialParser {
 
 		if ( attributes[ 'Bump Height' ] ) params.bumpScale = attributes[ 'Bump Height' ].value * 0.1;
 
-		if ( attributes[ 'Refraction Index' ] ) params.refractionRatio = 0.98 / attributes[ 'Refraction Index' ].value;
-
 		this.parsePhysicalAttributes( params, attributes, maps );
 		this.parseStandardAttributes( params, attributes, maps );
 		this.parsePhongAttributes( params, attributes, maps );
@@ -643,6 +643,8 @@ class MaterialParser {
 
 	parsePhongAttributes( params, attributes, maps ) {
 
+		if ( attributes[ 'Refraction Index' ] ) params.refractionRatio = 0.98 / attributes[ 'Refraction Index' ].value;
+
 		if ( attributes.Diffuse ) params.color.multiplyScalar( attributes.Diffuse.value );
 
 		if ( attributes.Reflection ) {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
examples/models/json/lightmap/lightmap.json


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio