fix missing fog

beta.r3js.org
-=yb4f310 2018-02-16 22:09:41 +01:00
parent d534f99f5e
commit b0cb6db4a8
2 changed files with 6 additions and 2 deletions

View File

@ -69,7 +69,7 @@ GameLib.D3.API.Scene = function(
this.images = images; this.images = images;
if (GameLib.Utils.UndefinedOrNull(fog)) { if (GameLib.Utils.UndefinedOrNull(fog)) {
fog = null; fog = new GameLib.D3.API.Fog();
} }
this.fog = fog; this.fog = fog;

View File

@ -330,7 +330,11 @@ GameLib.D3.Geometry.Buffer.prototype.toApiObject = function() {
this.drawRange.toApiObject(), this.drawRange.toApiObject(),
this.groups.map( this.groups.map(
function(group){ function(group){
return group.toApiObject() if (group instanceof GameLib.Group) {
return group.toApiObject();
} else {
return group;
}
} }
), ),
null, //index, null, //index,