From 856e972a214d586348664b407fb106433ca3ca75 Mon Sep 17 00:00:00 2001 From: polygonboutique Date: Thu, 24 Nov 2016 12:24:42 +0100 Subject: [PATCH] fixed scene cameras --- src/game-lib-scene.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game-lib-scene.js b/src/game-lib-scene.js index 63c9468..eb5b115 100644 --- a/src/game-lib-scene.js +++ b/src/game-lib-scene.js @@ -52,6 +52,8 @@ GameLib.D3.Scene = function Scene( * @param entities GameLib.D3.Entity.API[] * @param components GameLib.D3.Component.API[] * @param shapes GameLib.D3.Shape.API[] + * @param cameras + * @param activeCameraIndex * @constructor */ GameLib.D3.Scene.API = function( @@ -648,9 +650,7 @@ GameLib.D3.Scene.prototype.render = function( deltaTime, renderer ) { - if(this.sceneCamera) { - renderer.render(this.instance, this.sceneCamera); - } + renderer.render(this.instance, this.cameras[this.activeCameraIndex].instance); }; /**