From b0cb6db4a851101df3e3b96b84e91b3f14322202 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 16 Feb 2018 22:09:41 +0100 Subject: [PATCH] fix missing fog --- src/game-lib-d3-api-scene.js | 2 +- src/game-lib-d3-geometry-buffer-a.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game-lib-d3-api-scene.js b/src/game-lib-d3-api-scene.js index c93cb7d..60a6fbb 100644 --- a/src/game-lib-d3-api-scene.js +++ b/src/game-lib-d3-api-scene.js @@ -69,7 +69,7 @@ GameLib.D3.API.Scene = function( this.images = images; if (GameLib.Utils.UndefinedOrNull(fog)) { - fog = null; + fog = new GameLib.D3.API.Fog(); } this.fog = fog; diff --git a/src/game-lib-d3-geometry-buffer-a.js b/src/game-lib-d3-geometry-buffer-a.js index 076a73c..b6e4636 100644 --- a/src/game-lib-d3-geometry-buffer-a.js +++ b/src/game-lib-d3-geometry-buffer-a.js @@ -330,7 +330,11 @@ GameLib.D3.Geometry.Buffer.prototype.toApiObject = function() { this.drawRange.toApiObject(), this.groups.map( function(group){ - return group.toApiObject() + if (group instanceof GameLib.Group) { + return group.toApiObject(); + } else { + return group; + } } ), null, //index,