update instance color
parent
3b18b59852
commit
37d670022d
|
@ -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;
|
||||
};
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue