From 37d670022d07436855f72f78aaa4eabfe4e379f5 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Wed, 14 Feb 2018 16:08:19 +0100 Subject: [PATCH] update instance color --- src/game-lib-color.js | 4 ++++ src/game-lib-d3-camera-a.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/game-lib-color.js b/src/game-lib-color.js index 275caab..c976819 100644 --- a/src/game-lib-color.js +++ b/src/game-lib-color.js @@ -145,4 +145,8 @@ GameLib.Color.prototype.fromHex = function(hex) { this.r = parseInt(matches[1], 16) / 255.0; this.g = parseInt(matches[2], 16) / 255.0; this.b = parseInt(matches[3], 16) / 255.0; + + this.instance.r = this.r; + this.instance.g = this.g; + this.instance.b = this.b; }; \ No newline at end of file diff --git a/src/game-lib-d3-camera-a.js b/src/game-lib-d3-camera-a.js index d404331..832b5ff 100644 --- a/src/game-lib-d3-camera-a.js +++ b/src/game-lib-d3-camera-a.js @@ -108,6 +108,11 @@ GameLib.D3.Camera.prototype.createInstance = function() { * Not all implementations of camera has aspect ratio, we, however do have an aspect ratio for all our cameras */ if (GameLib.Utils.Defined(this.instance.aspect)) { + + var size = GameLib.Utils.GetWindowSize(); + + this.aspect = size.width / size.height; + this.instance.aspect = this.aspect; }