diff --git a/src/game-lib-renderer-d3.js b/src/game-lib-renderer-d3.js index 23f74dd..c5db8cf 100644 --- a/src/game-lib-renderer-d3.js +++ b/src/game-lib-renderer-d3.js @@ -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); }; /** diff --git a/src/game-lib-system-render.js b/src/game-lib-system-render.js index fda3ea3..878294f 100644 --- a/src/game-lib-system-render.js +++ b/src/game-lib-system-render.js @@ -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); }