resize bullshit

beta.r3js.org
-=yb4f310 2018-03-09 12:45:57 +01:00
parent af41443981
commit fb539ea10a
2 changed files with 7 additions and 4 deletions

View File

@ -417,11 +417,14 @@ GameLib.Renderer.D3.prototype.clear = function() {
* @param height
*/
GameLib.Renderer.D3.prototype.setSize = function(width, height) {
this.instance.setSize(
this.width * data.width,
this.height * data.height,
this.width * width,
this.height * height,
false
);
this.instance.setPixelRatio(window.devicePixelRatio);
};
/**

View File

@ -58,7 +58,7 @@ GameLib.System.Render.prototype.start = function() {
this.renderConfigurations = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.RENDER_CONFIGURATION);
this.renderers = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.RENDERER);
this.renderers = GameLib.EntityManager.Instance.queryComponentsByConstructor(GameLib.Renderer);
this.composers = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.COMPOSER);
@ -235,7 +235,7 @@ GameLib.System.Render.prototype.windowResize = function(data) {
}
);
GameLib.EntityManager.Instance.queryComponents(GameLib.Component.RENDERER).map(
GameLib.EntityManager.Instance.queryComponentsByConstructor(GameLib.Renderer).map(
function(renderer) {
renderer.setSize(data.width, data.height);
}