Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
1a12cc81
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1a12cc81
编写于
3月 29, 2018
作者:
M
Mr.doob
提交者:
GitHub
3月 29, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13720 from WestLangley/dev-panning_mode
OrbitControls: remove HorizontalPanning nomenclature
上级
7af60e62
a9cf263f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
23 deletion
+13
-23
docs/examples/controls/OrbitControls.html
docs/examples/controls/OrbitControls.html
+6
-8
examples/js/controls/OrbitControls.js
examples/js/controls/OrbitControls.js
+6
-13
examples/misc_controls_orbit.html
examples/misc_controls_orbit.html
+1
-1
examples/webgl_shaders_ocean.html
examples/webgl_shaders_ocean.html
+0
-1
未找到文件。
docs/examples/controls/OrbitControls.html
浏览文件 @
1a12cc81
...
...
@@ -202,14 +202,6 @@ controls.mouseButtons = {
The camera being controlled.
</div>
<h3>
[property:Integer panningMode]
</h3>
<div>
Panning mode. Defines how the camera's position is translated when panning.
The options are THREE.ScreenSpacePanning, in which the camera pans in screen space,
and THREE.HorizontalPanning, in which the camera pans in the plane orthogonal to the camera's up direction.
Default is THREE.ScreenSpacePanning.
</div>
<h3>
[property:Float panSpeed]
</h3>
<div>
Speed of panning. Default is 1.
...
...
@@ -225,6 +217,12 @@ controls.mouseButtons = {
Speed of rotation. Default is 1.
</div>
<h3>
[property:Boolean screenSpacePanning]
</h3>
<div>
Defines how the camera's position is translated when panning. If true, the camera pans in screen space.
Otherwise, the camera pans in the plane orthogonal to the camera's up direction. Default is false.
</div>
<h3>
[property:Vector3 target0]
</h3>
<div>
Used internally by the [method:saveState] and [method:reset] methods.
...
...
examples/js/controls/OrbitControls.js
浏览文件 @
1a12cc81
...
...
@@ -60,7 +60,7 @@ THREE.OrbitControls = function ( object, domElement ) {
// Set to false to disable panning
this
.
enablePan
=
true
;
this
.
panSpeed
=
1.0
;
this
.
panningMode
=
THREE
.
ScreenSpacePanning
;
// alternate THREE.HorizontalPanning
this
.
screenSpacePanning
=
false
;
// if true, pan in screen-space
this
.
keyPanSpeed
=
7.0
;
// pixels moved per arrow key push
// Set to true to automatically rotate around the target
...
...
@@ -321,18 +321,14 @@ THREE.OrbitControls = function ( object, domElement ) {
return
function
panUp
(
distance
,
objectMatrix
)
{
switch
(
scope
.
panningMod
e
)
{
if
(
scope
.
screenSpacePanning
===
tru
e
)
{
case
THREE
.
ScreenSpacePanning
:
v
.
setFromMatrixColumn
(
objectMatrix
,
1
);
v
.
setFromMatrixColumn
(
objectMatrix
,
1
);
break
;
case
THREE
.
HorizontalPanning
:
}
else
{
v
.
setFromMatrixColumn
(
objectMatrix
,
0
);
v
.
crossVectors
(
scope
.
object
.
up
,
v
);
break
;
v
.
setFromMatrixColumn
(
objectMatrix
,
0
);
v
.
crossVectors
(
scope
.
object
.
up
,
v
);
}
...
...
@@ -1045,6 +1041,3 @@ Object.defineProperties( THREE.OrbitControls.prototype, {
}
}
);
THREE
.
ScreenSpacePanning
=
0
;
THREE
.
HorizontalPanning
=
1
;
examples/misc_controls_orbit.html
浏览文件 @
1a12cc81
...
...
@@ -76,7 +76,7 @@
controls
.
enableDamping
=
true
;
// an animation loop is required when either damping or auto-rotation are enabled
controls
.
dampingFactor
=
0.25
;
controls
.
panningMode
=
THREE
.
HorizontalPanning
;
// default is THREE.ScreenSpacePanning
controls
.
screenSpacePanning
=
false
;
controls
.
minDistance
=
100
;
controls
.
maxDistance
=
500
...
...
examples/webgl_shaders_ocean.html
浏览文件 @
1a12cc81
...
...
@@ -168,7 +168,6 @@
controls
=
new
THREE
.
OrbitControls
(
camera
,
renderer
.
domElement
);
controls
.
maxPolarAngle
=
Math
.
PI
*
0.495
;
controls
.
target
.
set
(
0
,
10
,
0
);
controls
.
panningMode
=
THREE
.
HorizontalPanning
;
controls
.
minDistance
=
40.0
;
controls
.
maxDistance
=
200.0
;
camera
.
lookAt
(
controls
.
target
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录