Browse Source

Merge pull request #3811 from kcoley/kcoley/gltfSerializerEmissiveColor

glTF Serializer: Added emissive color to standard material
David Catuhe 7 năm trước cách đây
mục cha
commit
a1ad38fb54
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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;