File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,13 @@ class BuildingPart {
458458 }
459459 const material = BuildingPart . getBaseMaterial ( materialName ) ;
460460 if ( color !== '' ) {
461- material . color = new Color ( color ) ;
461+ if ( material instanceof MeshPhysicalMaterial ) {
462+ material . emissive = new Color ( color ) ;
463+ material . emissiveIntensity = 0.5 ;
464+ material . roughness = 0.5 ;
465+ } else {
466+ material . color = new Color ( color ) ;
467+ }
462468 } else if ( materialName === '' ) {
463469 material . color = new Color ( 'white' ) ;
464470 }
@@ -488,7 +494,11 @@ class BuildingPart {
488494 material = BuildingPart . getBaseMaterial ( materialName ) ;
489495 }
490496 if ( color !== '' ) {
491- material . color = new Color ( color ) ;
497+ if ( material instanceof MeshPhysicalMaterial ) {
498+ material . emissive = new Color ( color ) ;
499+ } else {
500+ material . color = new Color ( color ) ;
501+ }
492502 }
493503 return material ;
494504 }
You can’t perform that action at this time.
0 commit comments