Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
782e4a83
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,发现更多精彩内容 >>
提交
782e4a83
编写于
11月 29, 2017
作者:
W
WestLangley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove optionalTarget
上级
ed7cafe5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
67 addition
and
43 deletion
+67
-43
docs/api/cameras/Camera.html
docs/api/cameras/Camera.html
+7
-9
docs/api/core/Object3D.html
docs/api/core/Object3D.html
+10
-14
src/cameras/Camera.js
src/cameras/Camera.js
+8
-3
src/core/Object3D.js
src/core/Object3D.js
+42
-17
未找到文件。
docs/api/cameras/Camera.html
浏览文件 @
782e4a83
...
...
@@ -69,16 +69,14 @@
Copy the properties from the source camera into this one.
</div>
<h3>
[method:Vector3 getWorldDirection]( [page:Vector3
optionalT
arget] )
</h3>
<h3>
[method:Vector3 getWorldDirection]( [page:Vector3
t
arget] )
</h3>
<div>
Returns a [page:Vector3] representing the world space direction in which the camera is looking.
<br
/><br
/>
Note: This is not the camera’s positive, but its negative z-axis, in contrast to
[page:Object3D.getWorldDirection getWorldDirection] of the base class (Object3D).
<br
/><br
/>
If an [page:Vector3 optionalTarget] vector is specified, the result will be copied into this vector
(which can be reused in this way), otherwise a new vector will be created.
</div>
[page:Vector3 target] — the result will be copied into this Vector3.
<br
/><br
/>
Returns a [page:Vector3] representing the world space direction in which the camera is looking.
(Note: A camera looks down its local, negative z-axis).
<br
/><br
/>
<h2>
Source
</h2>
...
...
docs/api/core/Object3D.html
浏览文件 @
782e4a83
...
...
@@ -240,41 +240,37 @@
Searches through the object's children and returns the first with a property that matches the value given.
</div>
<h3>
[method:Vector3 getWorldPosition]( [page:Vector3
optionalT
arget] )
</h3>
<h3>
[method:Vector3 getWorldPosition]( [page:Vector3
t
arget] )
</h3>
<div>
optionalTarget — (optional) target to set the result. Otherwise, a new [page:Vector3] is instantiated
.
<br
/><br
/>
[page:Vector3 target] — the result will be copied into this Vector3
.
<br
/><br
/>
Returns a vector representing the position of the object in world space.
</div>
<h3>
[method:Quaternion getWorldQuaternion]( [page:Quaternion
optionalT
arget] )
</h3>
<h3>
[method:Quaternion getWorldQuaternion]( [page:Quaternion
t
arget] )
</h3>
<div>
optionalTarget — (optional) if specified, the result will be copied into this Quaternion,
otherwise a new Quaternion will be created.
<br
/><br
/>
[page:Quaternion target] — the result will be copied into this Quaternion.
<br
/><br
/>
Returns a quaternion representing the rotation of the object in world space.
</div>
<h3>
[method:Euler getWorldRotation]( [page:Euler
optionalT
arget] )
</h3>
<h3>
[method:Euler getWorldRotation]( [page:Euler
t
arget] )
</h3>
<div>
optionalTarget — (optional) if specified, the result will be copied into this Euler,
otherwise a new Euler will be created.
<br
/><br
/>
[page:Euler target] — the result will be copied into this Euler.
<br
/><br
/>
Returns the euler angles representing the rotation of the object in world space.
</div>
<h3>
[method:Vector3 getWorldScale]( [page:Vector3
optionalT
arget] )
</h3>
<h3>
[method:Vector3 getWorldScale]( [page:Vector3
t
arget] )
</h3>
<div>
[page:Vector3 optionalTarget] — (optional) if specified, the result will be copied into this Vector3,
otherwise a new Vector3 will be created.
<br
/><br
/>
[page:Vector3 target] — the result will be copied into this Vector3.
<br
/><br
/>
Returns a vector of the scaling factors applied to the object for each axis in world space.
</div>
<h3>
[method:Vector3 getWorldDirection]( [page:Vector3
optionalT
arget] )
</h3>
<h3>
[method:Vector3 getWorldDirection]( [page:Vector3
t
arget] )
</h3>
<div>
[page:Vector3 optionalTarget] — (optional) if specified, the result will be copied into this Vector3,
otherwise a new Vector3 will be created.
<br
/><br
/>
[page:Vector3 target] — the result will be copied into this Vector3.
<br
/><br
/>
Returns a vector representing the direction of object's positive z-axis in world space.
</div>
...
...
src/cameras/Camera.js
浏览文件 @
782e4a83
...
...
@@ -41,13 +41,18 @@ Camera.prototype = Object.assign( Object.create( Object3D.prototype ), {
var
quaternion
=
new
Quaternion
();
return
function
getWorldDirection
(
optionalT
arget
)
{
return
function
getWorldDirection
(
t
arget
)
{
var
result
=
optionalTarget
||
new
Vector3
();
if
(
target
===
undefined
)
{
console
.
warn
(
'
THREE.Camera: .getWorldDirection() target is now required
'
);
target
=
new
Vector3
();
}
this
.
getWorldQuaternion
(
quaternion
);
return
resul
t
.
set
(
0
,
0
,
-
1
).
applyQuaternion
(
quaternion
);
return
targe
t
.
set
(
0
,
0
,
-
1
).
applyQuaternion
(
quaternion
);
};
...
...
src/core/Object3D.js
浏览文件 @
782e4a83
...
...
@@ -441,13 +441,18 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
},
getWorldPosition
:
function
(
optionalT
arget
)
{
getWorldPosition
:
function
(
t
arget
)
{
var
result
=
optionalTarget
||
new
Vector3
();
if
(
target
===
undefined
)
{
console
.
warn
(
'
THREE.Object3D: .getWorldPosition() target is now required
'
);
target
=
new
Vector3
();
}
this
.
updateMatrixWorld
(
true
);
return
resul
t
.
setFromMatrixPosition
(
this
.
matrixWorld
);
return
targe
t
.
setFromMatrixPosition
(
this
.
matrixWorld
);
},
...
...
@@ -456,15 +461,20 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
var
position
=
new
Vector3
();
var
scale
=
new
Vector3
();
return
function
getWorldQuaternion
(
optionalTarget
)
{
return
function
getWorldQuaternion
(
target
)
{
if
(
target
===
undefined
)
{
var
result
=
optionalTarget
||
new
Quaternion
();
console
.
warn
(
'
THREE.Object3D: .getWorldQuaternion() target is now required
'
);
target
=
new
Quaternion
();
}
this
.
updateMatrixWorld
(
true
);
this
.
matrixWorld
.
decompose
(
position
,
resul
t
,
scale
);
this
.
matrixWorld
.
decompose
(
position
,
targe
t
,
scale
);
return
resul
t
;
return
targe
t
;
};
...
...
@@ -474,13 +484,18 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
var
quaternion
=
new
Quaternion
();
return
function
getWorldRotation
(
optionalT
arget
)
{
return
function
getWorldRotation
(
t
arget
)
{
var
result
=
optionalTarget
||
new
Euler
();
if
(
target
===
undefined
)
{
console
.
warn
(
'
THREE.Object3D: .getWorldRotation() target is now required
'
);
target
=
new
Euler
();
}
this
.
getWorldQuaternion
(
quaternion
);
return
resul
t
.
setFromQuaternion
(
quaternion
,
this
.
rotation
.
order
,
false
);
return
targe
t
.
setFromQuaternion
(
quaternion
,
this
.
rotation
.
order
,
false
);
};
...
...
@@ -491,15 +506,20 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
var
position
=
new
Vector3
();
var
quaternion
=
new
Quaternion
();
return
function
getWorldScale
(
optionalTarget
)
{
return
function
getWorldScale
(
target
)
{
if
(
target
===
undefined
)
{
var
result
=
optionalTarget
||
new
Vector3
();
console
.
warn
(
'
THREE.Object3D: .getWorldScale() target is now required
'
);
target
=
new
Vector3
();
}
this
.
updateMatrixWorld
(
true
);
this
.
matrixWorld
.
decompose
(
position
,
quaternion
,
resul
t
);
this
.
matrixWorld
.
decompose
(
position
,
quaternion
,
targe
t
);
return
resul
t
;
return
targe
t
;
};
...
...
@@ -509,13 +529,18 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
var
quaternion
=
new
Quaternion
();
return
function
getWorldDirection
(
optionalT
arget
)
{
return
function
getWorldDirection
(
t
arget
)
{
var
result
=
optionalTarget
||
new
Vector3
();
if
(
target
===
undefined
)
{
console
.
warn
(
'
THREE.Object3D: .getWorldDirection() target is now required
'
);
target
=
new
Vector3
();
}
this
.
getWorldQuaternion
(
quaternion
);
return
resul
t
.
set
(
0
,
0
,
1
).
applyQuaternion
(
quaternion
);
return
targe
t
.
set
(
0
,
0
,
1
).
applyQuaternion
(
quaternion
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录