Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9f60c1ce
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
9f60c1ce
编写于
6月 30, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'WestLangley/dev-cleanup' into dev
上级
647fd93d
50bff995
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
44 deletion
+17
-44
docs/api/math/Matrix4.html
docs/api/math/Matrix4.html
+4
-9
src/core/Object3D.js
src/core/Object3D.js
+1
-1
src/extras/core/Gyroscope.js
src/extras/core/Gyroscope.js
+5
-5
src/math/Matrix4.js
src/math/Matrix4.js
+0
-22
src/math/Rotation.js
src/math/Rotation.js
+6
-6
src/objects/Sprite.js
src/objects/Sprite.js
+1
-1
未找到文件。
docs/api/math/Matrix4.html
浏览文件 @
9f60c1ce
...
...
@@ -152,19 +152,14 @@
Multiplies the columns of this matrix by vector *v*.
</div>
<h3>
.
makeFromPositionQuaternionScale( [page:Vector3 translation], [page:Quaternion rotat
ion], [page:Vector3 scale] ) [page:Matrix4]
</h3>
<h3>
.
compose( [page:Vector3 translation], [page:Quaternion quatern
ion], [page:Vector3 scale] ) [page:Matrix4]
</h3>
<div>
Sets this matrix to the transformation composed of *translation*, *
rotat
ion* and *scale*.
Sets this matrix to the transformation composed of *translation*, *
quatern
ion* and *scale*.
</div>
<h3>
.
makeFromPositionEulerScale( [page:Vector3 translation], [page:Vector3 rotation], eulerOrder, [page:Vector3 scale] ) [page:Matrix4
]
</h3>
<h3>
.
decompose( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] ) [page:Array
]
</h3>
<div>
Sets this matrix to the transformation composed of *translation*, *rotation* (as euler angle triple and order) and *scale*.
</div>
<h3>
.decompose( [page:Vector3 translation], [page:Quaternion rotation], [page:Vector3 scale] ) [page:Array]
</h3>
<div>
Decomposes this matrix into the *translation*, *rotation* and *scale* components.
<br
/>
Decomposes this matrix into the *translation*, *quaternion* and *scale* components.
<br
/>
If parameters are not passed, new instances will be created.
</div>
...
...
src/core/Object3D.js
浏览文件 @
9f60c1ce
...
...
@@ -358,7 +358,7 @@ THREE.Object3D.prototype = {
updateMatrix
:
function
()
{
this
.
matrix
.
makeFromPositionQuaternionScal
e
(
this
.
position
,
this
.
quaternion
,
this
.
scale
);
this
.
matrix
.
compos
e
(
this
.
position
,
this
.
quaternion
,
this
.
scale
);
this
.
matrixWorldNeedsUpdate
=
true
;
...
...
src/extras/core/Gyroscope.js
浏览文件 @
9f60c1ce
...
...
@@ -22,10 +22,10 @@ THREE.Gyroscope.prototype.updateMatrixWorld = function ( force ) {
this
.
matrixWorld
.
multiplyMatrices
(
this
.
parent
.
matrixWorld
,
this
.
matrix
);
this
.
matrixWorld
.
decompose
(
this
.
translationWorld
,
this
.
rotat
ionWorld
,
this
.
scaleWorld
);
this
.
matrix
.
decompose
(
this
.
translationObject
,
this
.
rotat
ionObject
,
this
.
scaleObject
);
this
.
matrixWorld
.
decompose
(
this
.
translationWorld
,
this
.
quatern
ionWorld
,
this
.
scaleWorld
);
this
.
matrix
.
decompose
(
this
.
translationObject
,
this
.
quatern
ionObject
,
this
.
scaleObject
);
this
.
matrixWorld
.
makeFromPositionQuaternionScale
(
this
.
translationWorld
,
this
.
rotat
ionObject
,
this
.
scaleWorld
);
this
.
matrixWorld
.
compose
(
this
.
translationWorld
,
this
.
quatern
ionObject
,
this
.
scaleWorld
);
}
else
{
...
...
@@ -53,8 +53,8 @@ THREE.Gyroscope.prototype.updateMatrixWorld = function ( force ) {
THREE
.
Gyroscope
.
prototype
.
translationWorld
=
new
THREE
.
Vector3
();
THREE
.
Gyroscope
.
prototype
.
translationObject
=
new
THREE
.
Vector3
();
THREE
.
Gyroscope
.
prototype
.
rotat
ionWorld
=
new
THREE
.
Quaternion
();
THREE
.
Gyroscope
.
prototype
.
rotat
ionObject
=
new
THREE
.
Quaternion
();
THREE
.
Gyroscope
.
prototype
.
quatern
ionWorld
=
new
THREE
.
Quaternion
();
THREE
.
Gyroscope
.
prototype
.
quatern
ionObject
=
new
THREE
.
Quaternion
();
THREE
.
Gyroscope
.
prototype
.
scaleWorld
=
new
THREE
.
Vector3
();
THREE
.
Gyroscope
.
prototype
.
scaleObject
=
new
THREE
.
Vector3
();
src/math/Matrix4.js
浏览文件 @
9f60c1ce
...
...
@@ -818,14 +818,6 @@ THREE.Matrix4.prototype = {
compose
:
function
(
position
,
quaternion
,
scale
)
{
console
.
warn
(
'
DEPRECATED: Matrix4
\'
s .compose() has been deprecated in favor of makeFromPositionQuaternionScale. Please update your code.
'
);
return
this
.
makeFromPositionQuaternionScale
(
position
,
quaternion
,
scale
);
},
makeFromPositionQuaternionScale
:
function
(
position
,
quaternion
,
scale
)
{
this
.
makeRotationFromQuaternion
(
quaternion
);
this
.
scale
(
scale
);
this
.
setPosition
(
position
);
...
...
@@ -834,20 +826,6 @@ THREE.Matrix4.prototype = {
},
makeFromPositionEulerScale
:
function
(
position
,
rotation
,
scale
)
{
if
(
typeof
rotation
[
'
order
'
]
===
undefined
)
{
console
.
error
(
'
ERROR: Matrix4
\'
s .makeFromPositionEulerScale() now expects a Euler rotation rather than a Vector3 and order. Please update your code.
'
);
}
this
.
makeRotationFromEuler
(
rotation
);
this
.
scale
(
scale
);
this
.
setPosition
(
position
);
return
this
;
},
makeFrustum
:
function
(
left
,
right
,
bottom
,
top
,
near
,
far
)
{
var
te
=
this
.
elements
;
...
...
src/math/Rotation.js
浏览文件 @
9f60c1ce
/**
* @author mrdoob / http://mrdoob.com/
* @author bhouston / http://exocortex.com/
*/
*/
THREE
.
Rotation
=
function
(
quaternion
)
{
this
.
euler
=
new
THREE
.
Euler
();
this
.
quaternion
=
quaternion
;
this
.
__
quaternion
=
quaternion
;
this
.
updateEuler
();
...
...
@@ -113,7 +113,7 @@ THREE.Rotation.prototype = {
setFromQuaternion
:
function
(
quaternion
,
order
)
{
this
.
euler
.
setFromQuaternion
(
quaternion
,
order
);
this
.
quaternion
.
copy
(
quaternion
);
this
.
__
quaternion
.
copy
(
quaternion
);
return
this
;
...
...
@@ -122,7 +122,7 @@ THREE.Rotation.prototype = {
copy
:
function
(
rotation
)
{
this
.
euler
.
copy
(
rotation
.
euler
);
this
.
quaternion
.
copy
(
rotation
.
quaternion
);
this
.
__
quaternion
.
copy
(
rotation
.
quaternion
);
return
this
;
...
...
@@ -145,7 +145,7 @@ THREE.Rotation.prototype = {
updateEuler
:
function
()
{
this
.
euler
.
setFromQuaternion
(
this
.
quaternion
);
this
.
euler
.
setFromQuaternion
(
this
.
__
quaternion
);
return
this
;
...
...
@@ -153,7 +153,7 @@ THREE.Rotation.prototype = {
updateQuaternion
:
function
()
{
this
.
quaternion
.
setFromEuler
(
this
.
euler
);
this
.
__
quaternion
.
setFromEuler
(
this
.
euler
);
return
this
;
...
...
src/objects/Sprite.js
浏览文件 @
9f60c1ce
...
...
@@ -24,7 +24,7 @@ THREE.Sprite.prototype.updateMatrix = function () {
this
.
rotation3d
.
set
(
0
,
0
,
this
.
rotation
,
this
.
rotation3d
.
order
);
this
.
quaternion
.
setFromEuler
(
this
.
rotation3d
);
this
.
matrix
.
makeFromPositionQuaternionScal
e
(
this
.
position
,
this
.
quaternion
,
this
.
scale
);
this
.
matrix
.
compos
e
(
this
.
position
,
this
.
quaternion
,
this
.
scale
);
this
.
matrixWorldNeedsUpdate
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录