Selaa lähdekoodia

Merge pull request #3811 from kcoley/kcoley/gltfSerializerEmissiveColor

glTF Serializer: Added emissive color to standard material
David Catuhe 7 vuotta sitten
vanhempi
commit
a1ad38fb54
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      serializers/src/glTF/2.0/babylon.glTFMaterial.ts

+ 3 - 0
serializers/src/glTF/2.0/babylon.glTFMaterial.ts

@@ -221,6 +221,9 @@ module BABYLON.GLTF2 {
                     Tools.Warn(babylonStandardMaterial.name + ": glTF 2.0 does not support alpha mode: " + babylonStandardMaterial.alphaMode.toString());
                 }
             }
+            if (babylonStandardMaterial.emissiveColor) {
+                glTFMaterial.emissiveFactor = babylonStandardMaterial.emissiveColor.asArray();
+            }
 
             glTFMaterial.pbrMetallicRoughness = glTFPbrMetallicRoughness;