浏览代码

Added emissive color to standard material

Kacey Coley 7 年之前
父节点
当前提交
13a73c53d9
共有 1 个文件被更改,包括 3 次插入0 次删除
  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;