@@ -547,7 +547,7 @@ class GLTFLightsExtension {
547547
548548 const color = new Color ( 0xffffff ) ;
549549
550- if ( lightDef . color !== undefined ) color . setRGB ( ... lightDef . color , LinearSRGBColorSpace ) ;
550+ if ( lightDef . color !== undefined ) color . setRGB ( lightDef . color [ 0 ] , lightDef . color [ 1 ] , lightDef . color [ 2 ] , LinearSRGBColorSpace ) ;
551551
552552 const range = lightDef . range !== undefined ? lightDef . range : 0 ;
553553
@@ -665,7 +665,7 @@ class GLTFMaterialsUnlitExtension {
665665
666666 const array = metallicRoughness . baseColorFactor ;
667667
668- materialParams . color . setRGB ( ... array , LinearSRGBColorSpace ) ;
668+ materialParams . color . setRGB ( array [ 0 ] , array [ 1 ] , array [ 2 ] , LinearSRGBColorSpace ) ;
669669 materialParams . opacity = array [ 3 ] ;
670670
671671 }
@@ -941,7 +941,8 @@ class GLTFMaterialsSheenExtension {
941941
942942 if ( extension . sheenColorFactor !== undefined ) {
943943
944- materialParams . sheenColor . setRGB ( ...extension . sheenColorFactor , LinearSRGBColorSpace ) ;
944+ const colorFactor = extension . sheenColorFactor ;
945+ materialParams . sheenColor . setRGB ( colorFactor [ 0 ] , colorFactor [ 1 ] , colorFactor [ 2 ] , LinearSRGBColorSpace ) ;
945946
946947 }
947948
@@ -1079,7 +1080,7 @@ class GLTFMaterialsVolumeExtension {
10791080 materialParams . attenuationDistance = extension . attenuationDistance || Infinity ;
10801081
10811082 const colorArray = extension . attenuationColor || [ 1 , 1 , 1 ] ;
1082- materialParams . attenuationColor = new Color ( ) . setRGB ( ... colorArray , LinearSRGBColorSpace ) ;
1083+ materialParams . attenuationColor = new Color ( ) . setRGB ( colorArray [ 0 ] , colorArray [ 1 ] , colorArray [ 2 ] , LinearSRGBColorSpace ) ;
10831084
10841085 return Promise . all ( pending ) ;
10851086
@@ -1182,7 +1183,7 @@ class GLTFMaterialsSpecularExtension {
11821183 }
11831184
11841185 const colorArray = extension . specularColorFactor || [ 1 , 1 , 1 ] ;
1185- materialParams . specularColor = new Color ( ) . setRGB ( ... colorArray , LinearSRGBColorSpace ) ;
1186+ materialParams . specularColor = new Color ( ) . setRGB ( colorArray [ 0 ] , colorArray [ 1 ] , colorArray [ 2 ] , LinearSRGBColorSpace ) ;
11861187
11871188 if ( extension . specularColorTexture !== undefined ) {
11881189
@@ -3480,7 +3481,8 @@ class GLTFParser {
34803481
34813482 if ( materialDef . emissiveFactor !== undefined && materialType !== MeshBasicMaterial ) {
34823483
3483- materialParams . emissive = new Color ( ) . setRGB ( ...materialDef . emissiveFactor , LinearSRGBColorSpace ) ;
3484+ const emissiveFactor = materialDef . emissiveFactor ;
3485+ materialParams . emissive = new Color ( ) . setRGB ( emissiveFactor [ 0 ] , emissiveFactor [ 1 ] , emissiveFactor [ 2 ] , LinearSRGBColorSpace ) ;
34843486
34853487 }
34863488
0 commit comments