提交 4abbce41 编写于 作者: M Mr.doob

Editor: Fixed camera aspect breakage.

上级 d1f0f8ec
......@@ -458,6 +458,9 @@ Editor.prototype = {
var camera = loader.parse( json.camera );
this.camera.copy( camera );
this.camera.aspect = this.DEFAULT_CAMERA.aspect;
this.camera.updateProjectionMatrix();
this.history.fromJSON( json.history );
this.scripts = json.scripts;
......
......@@ -507,6 +507,11 @@ var Viewport = function ( editor ) {
signals.windowResize.add( function () {
// TODO: Move this out?
editor.DEFAULT_CAMERA.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
editor.DEFAULT_CAMERA.updateProjectionMatrix();
camera.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
camera.updateProjectionMatrix();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册