未验证 提交 97f61ed8 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #13957 from WestLangley/dev-orbit_aspect

OrbitControls: prevent aspect from affecting rotate speed
......@@ -461,10 +461,8 @@ THREE.OrbitControls = function ( object, domElement ) {
var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
// rotating across whole screen goes 360 degrees around
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth );
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height
// rotating up and down along whole screen attempts to go 360, but limited to 180
rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );
rotateStart.copy( rotateEnd );
......@@ -611,10 +609,8 @@ THREE.OrbitControls = function ( object, domElement ) {
var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
// rotating across whole screen goes 360 degrees around
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth );
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height
// rotating up and down along whole screen attempts to go 360, but limited to 180
rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );
rotateStart.copy( rotateEnd );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册