Browse Source

Merge pull request #3811 from kcoley/kcoley/gltfSerializerEmissiveColor

glTF Serializer: Added emissive color to standard material
David Catuhe 7 years ago
parent
commit
a1ad38fb54
1 changed files with 3 additions and 0 deletions
  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());
                     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;
             glTFMaterial.pbrMetallicRoughness = glTFPbrMetallicRoughness;