|
@@ -547,7 +547,7 @@ class GLTFLightsExtension {
|
|
|
|
|
|
const color = new Color( 0xffffff );
|
|
const color = new Color( 0xffffff );
|
|
|
|
|
|
- if ( lightDef.color !== undefined ) color.setRGB( ...lightDef.color, LinearSRGBColorSpace );
|
|
|
|
|
|
+ if ( lightDef.color !== undefined ) color.setRGB( lightDef.color[ 0 ], lightDef.color[ 1 ], lightDef.color[ 2 ], LinearSRGBColorSpace );
|
|
|
|
|
|
const range = lightDef.range !== undefined ? lightDef.range : 0;
|
|
const range = lightDef.range !== undefined ? lightDef.range : 0;
|
|
|
|
|
|
@@ -665,7 +665,7 @@ class GLTFMaterialsUnlitExtension {
|
|
|
|
|
|
const array = metallicRoughness.baseColorFactor;
|
|
const array = metallicRoughness.baseColorFactor;
|
|
|
|
|
|
- materialParams.color.setRGB( ...array, LinearSRGBColorSpace );
|
|
|
|
|
|
+ materialParams.color.setRGB( array[ 0 ], array[ 1 ], array[ 2 ], LinearSRGBColorSpace );
|
|
materialParams.opacity = array[ 3 ];
|
|
materialParams.opacity = array[ 3 ];
|
|
|
|
|
|
}
|
|
}
|
|
@@ -941,7 +941,8 @@ class GLTFMaterialsSheenExtension {
|
|
|
|
|
|
if ( extension.sheenColorFactor !== undefined ) {
|
|
if ( extension.sheenColorFactor !== undefined ) {
|
|
|
|
|
|
- materialParams.sheenColor.setRGB( ...extension.sheenColorFactor, LinearSRGBColorSpace );
|
|
|
|
|
|
+ const colorFactor = extension.sheenColorFactor;
|
|
|
|
+ materialParams.sheenColor.setRGB( colorFactor[ 0 ], colorFactor[ 1 ], colorFactor [ 2 ], LinearSRGBColorSpace );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1079,7 +1080,7 @@ class GLTFMaterialsVolumeExtension {
|
|
materialParams.attenuationDistance = extension.attenuationDistance || Infinity;
|
|
materialParams.attenuationDistance = extension.attenuationDistance || Infinity;
|
|
|
|
|
|
const colorArray = extension.attenuationColor || [ 1, 1, 1 ];
|
|
const colorArray = extension.attenuationColor || [ 1, 1, 1 ];
|
|
- materialParams.attenuationColor = new Color().setRGB( ...colorArray, LinearSRGBColorSpace );
|
|
|
|
|
|
+ materialParams.attenuationColor = new Color().setRGB( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ], LinearSRGBColorSpace );
|
|
|
|
|
|
return Promise.all( pending );
|
|
return Promise.all( pending );
|
|
|
|
|
|
@@ -1182,7 +1183,7 @@ class GLTFMaterialsSpecularExtension {
|
|
}
|
|
}
|
|
|
|
|
|
const colorArray = extension.specularColorFactor || [ 1, 1, 1 ];
|
|
const colorArray = extension.specularColorFactor || [ 1, 1, 1 ];
|
|
- materialParams.specularColor = new Color().setRGB( ...colorArray, LinearSRGBColorSpace );
|
|
|
|
|
|
+ materialParams.specularColor = new Color().setRGB( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ], LinearSRGBColorSpace );
|
|
|
|
|
|
if ( extension.specularColorTexture !== undefined ) {
|
|
if ( extension.specularColorTexture !== undefined ) {
|
|
|
|
|
|
@@ -3480,7 +3481,8 @@ class GLTFParser {
|
|
|
|
|
|
if ( materialDef.emissiveFactor !== undefined && materialType !== MeshBasicMaterial ) {
|
|
if ( materialDef.emissiveFactor !== undefined && materialType !== MeshBasicMaterial ) {
|
|
|
|
|
|
- materialParams.emissive = new Color().setRGB( ...materialDef.emissiveFactor, LinearSRGBColorSpace );
|
|
|
|
|
|
+ const emissiveFactor = materialDef.emissiveFactor;
|
|
|
|
+ materialParams.emissive = new Color().setRGB( emissiveFactor[ 0 ], emissiveFactor[ 1 ], emissiveFactor[ 2 ], LinearSRGBColorSpace );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|