Browse Source

Added emissive color to standard material

Kacey Coley 7 years ago
parent
commit
13a73c53d9
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;