createAmbientLight method

dynamic createAmbientLight()

Implementation

createAmbientLight() {
  if (fbxTree.globalSettings != null && fbxTree.globalSettings!["AmbientColor"] != null) {
    var ambientColor = fbxTree.globalSettings!["AmbientColor"]["value"];
    var r = ambientColor[0];
    var g = ambientColor[1];
    var b = ambientColor[2];

    if (r != 0 || g != 0 || b != 0) {
      var color = Color(r, g, b);
      sceneGraph.add(AmbientLight(color, 1));
    }
  }
}