update instance color

beta.r3js.org
-=yb4f310 2018-02-14 16:08:19 +01:00
parent 3b18b59852
commit 37d670022d
2 changed files with 9 additions and 0 deletions

View File

@ -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;
};

View File

@ -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;
}