提交 7757590f 编写于 作者: V Vladimir Jigouline

Change formatting for TransformControl zoom fix

上级 a0535a3e
......@@ -1165,11 +1165,8 @@ THREE.TransformControlsGizmo = function () {
handle.rotation.set( 0, 0, 0 );
handle.position.copy( this.worldPosition );
var eyeDistance = this.worldPosition.distanceTo( this.cameraPosition );
// Orthographic camera zoom doesn't depend on eyeDistance, but on camera zoom factor.
if (this.camera.type == "OrthographicCamera") {
eyeDistance = 1000 / this.camera.zoom;
}
var eyeDistance = this.camera.isOrthographicCamera ? 1000 / this.camera.zoom :
this.worldPosition.distanceTo( this.cameraPosition );
handle.scale.set( 1, 1, 1 ).multiplyScalar( eyeDistance * this.size / 7 );
// TODO: simplify helpers and consider decoupling from gizmo
......
......@@ -1188,11 +1188,8 @@ var TransformControlsGizmo = function () {
handle.rotation.set( 0, 0, 0 );
handle.position.copy( this.worldPosition );
var eyeDistance = this.worldPosition.distanceTo( this.cameraPosition );
// Orthographic camera zoom doesn't depend on eyeDistance, but on camera zoom factor.
if (this.camera.type == "OrthographicCamera") {
eyeDistance = 1000 / this.camera.zoom;
}
var eyeDistance = this.camera.isOrthographicCamera ? 1000 / this.camera.zoom :
this.worldPosition.distanceTo( this.cameraPosition );
handle.scale.set( 1, 1, 1 ).multiplyScalar( eyeDistance * this.size / 7 );
// TODO: simplify helpers and consider decoupling from gizmo
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册