trying to resize!
parent
d717c22c03
commit
a32037a826
|
@ -448,10 +448,26 @@ GameLib.D3.Editor.prototype.deSelectObject = function(object) {
|
|||
}
|
||||
);
|
||||
|
||||
this.selectedObjects = results.rest;
|
||||
|
||||
if (this.onDeSelectObject) {
|
||||
this.onDeSelectObject(results);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
GameLib.D3.Editor.prototype.setSize = function(width, height) {
|
||||
|
||||
this.viewports.map(
|
||||
function(viewport){
|
||||
viewport.width = width;
|
||||
viewport.height = height;
|
||||
viewport.updateInstance();
|
||||
}
|
||||
);
|
||||
|
||||
this.renderers.map(
|
||||
function(renderer) {
|
||||
renderer.setSize(width, height);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
@ -417,3 +417,11 @@ GameLib.D3.Game.LoadGameFromApi = function(
|
|||
|
||||
xhr.send();
|
||||
};
|
||||
|
||||
GameLib.D3.Game.prototype.setSize = function(width, height) {
|
||||
this.renderers.map(
|
||||
function(renderer) {
|
||||
renderer.setSize(width, height);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
@ -64,6 +64,9 @@ GameLib.D3.Renderer.prototype.createInstance = function(update) {
|
|||
this.height
|
||||
);
|
||||
|
||||
instance.domElement.width = this.width;
|
||||
instance.domElement.height = this.height;
|
||||
|
||||
instance.autoClear = this.autoClear;
|
||||
instance.preserveDrawingBuffer = this.preserveDrawingBuffer;
|
||||
|
||||
|
@ -112,3 +115,10 @@ GameLib.D3.Renderer.prototype.render = function() {
|
|||
this.instance.render(this.scene.instance, this.camera.instance);
|
||||
};
|
||||
|
||||
GameLib.D3.Renderer.prototype.setSize = function(width, height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
||||
this.updateInstance();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue