Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
53ae111d
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,体验更适合开发者的 AI 搜索 >>
提交
53ae111d
编写于
12月 15, 2016
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Matrix4: Renamed .makeFrustum() to .makePerspective()
上级
700d80ea
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
31 addition
and
49 deletion
+31
-49
docs/api/deprecated/DeprecatedList.html
docs/api/deprecated/DeprecatedList.html
+14
-12
docs/api/math/Matrix4.html
docs/api/math/Matrix4.html
+3
-12
editor/js/libs/tern-threejs/threejs.js
editor/js/libs/tern-threejs/threejs.js
+1
-5
src/Three.Legacy.js
src/Three.Legacy.js
+5
-0
src/cameras/PerspectiveCamera.js
src/cameras/PerspectiveCamera.js
+1
-2
src/math/Matrix4.js
src/math/Matrix4.js
+1
-12
test/unit/math/Frustum.js
test/unit/math/Frustum.js
+4
-4
test/unit/math/Matrix4.js
test/unit/math/Matrix4.js
+2
-2
未找到文件。
docs/api/deprecated/DeprecatedList.html
浏览文件 @
53ae111d
...
...
@@ -306,7 +306,7 @@
<h3>
[page:Matrix4]
</h3>
<div>
Matrix4.flattenToArrayOffset is deprecated. Use [page:Matrix4.toArray]() instead.
<br
/><br
/>
Matrix4.flattenToArrayOffset
()
is deprecated. Use [page:Matrix4.toArray]() instead.
<br
/><br
/>
Matrix4.extractPosition() has been renamed to [page:Matrix4.copyPosition]( matrix ).
<br
/><br
/>
...
...
@@ -314,28 +314,30 @@
Matrix4.setRotationFromQuaternion() has been renamed to [page:Matrix4.makeRotationFromQuaternion]( quaternion ).
<br
/><br
/>
Matrix4.multiplyVector3 has been has been removed. Use vector.applyMatrix4( matrix )
Matrix4.multiplyVector3
()
has been has been removed. Use vector.applyMatrix4( matrix )
or vector.applyProjection( matrix ) instead.
<br
/><br
/>
Matrix4.multiplyVector4 has been removed. Use vector.applyMatrix4( matrix ) instead.
<br
/><br
/>
Matrix4.multiplyVector4
()
has been removed. Use vector.applyMatrix4( matrix ) instead.
<br
/><br
/>
Matrix4.multiplyVector3Array
has been renamed to [page:Matrix4.applyToVector3Array] (
array ).
<br
/><br
/>
Matrix4.multiplyVector3Array
() has been renamed to [page:Matrix4.applyToVector3Array] (
array ).
<br
/><br
/>
Matrix4.rotateAxis has been removed. Use [page:Matrix4.transformDirection]( matrix ) instead.
<br
/><br
/>
Matrix4.rotateAxis
()
has been removed. Use [page:Matrix4.transformDirection]( matrix ) instead.
<br
/><br
/>
Matrix4.crossVector has been removed. Use vector.applyMatrix4( matrix ) instead.
<br
/><br
/>
Matrix4.crossVector
()
has been removed. Use vector.applyMatrix4( matrix ) instead.
<br
/><br
/>
Matrix4.rotateX has been removed.
<br
/><br
/>
Matrix4.rotateX
()
has been removed.
<br
/><br
/>
Matrix4.rotateY has been removed.
<br
/><br
/>
Matrix4.rotateY
()
has been removed.
<br
/><br
/>
Matrix4.rotateZ has been removed.
<br
/><br
/>
Matrix4.rotateZ
()
has been removed.
<br
/><br
/>
Matrix4.rotateByAxis has been removed.
<br
/><br
/>
Matrix4.rotateByAxis
()
has been removed.
<br
/><br
/>
Matrix4.applyToBuffer
has been removed. Use matrix.applyToBufferAttribute( attribute
) instead.
<br
/><br
/>
Matrix4.applyToBuffer
() has been removed. Use matrix.applyToBufferAttribute(
) instead.
<br
/><br
/>
Matrix4.applyToVector3Array has been removed.
Matrix4.applyToVector3Array() has been removed.
<br
/><br
/>
Matrix4.makeFrustum() has been renamed to [page:Matrix4.makePerspective]().
</div>
...
...
docs/api/math/Matrix4.html
浏览文件 @
53ae111d
...
...
@@ -116,7 +116,7 @@ m.elements = [ 11, 21, 31, 41,
Multiplies (applies) this matrix to every 3D vector in the [page:BufferAttribute attribute].
</div>
<h3>
[method:Matrix4 clone]()
</h3>
<div>
Creates a new Matrix4 with identical [page:.elements elements] to this one.
</div>
...
...
@@ -236,9 +236,9 @@ xAxis.z, yAxis.z, zAxis.z, 0,
</code>
</div>
<h3>
[method:Matrix4 make
Frustum
]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] )
</h3>
<h3>
[method:Matrix4 make
Perspective
]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] )
</h3>
<div>
Creates a
matrix representing a [link:https://en.wikipedia.org/wiki/Frustum frustum]
.
Creates a
[link:https://en.wikipedia.org/wiki/3D_projection#Perspective_projection perspective projection] matrix
.
This is used internally by [page:PerspectiveCamera.updateProjectionMatrix]()
</div>
...
...
@@ -248,15 +248,6 @@ xAxis.z, yAxis.z, zAxis.z, 0,
This is used internally by [page:OrthographicCamera.updateProjectionMatrix]().
</div>
<h3>
[method:Matrix4 makePerspective]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] )
</h3>
<div>
Creates a [link:https://en.wikipedia.org/wiki/3D_projection#Perspective_projection perspective projection] matrix.
Internally this calculates the values of [page:Float left], [page:Float right], [page:Float bottom] and [page:Float top],
and calls [page:.makeFrustum makeFrustum].
</div>
<h3>
[method:Matrix4 makeRotationFromEuler]( [page:Euler euler] )
</h3>
<div>
Sets the rotation component (the upper left 3x3 matrix) of this matrix to the rotation specified by the given [page:Euler Euler Angle].
...
...
editor/js/libs/tern-threejs/threejs.js
浏览文件 @
53ae111d
...
...
@@ -3921,12 +3921,8 @@
"
!type
"
:
"
fn(x: number, y: number, z: number) -> +THREE.Matrix4
"
,
"
!doc
"
:
"
Sets this matrix as scale transform.
"
},
"
makeFrustum
"
:
{
"
!type
"
:
"
fn(left: number, right: number, bottom: number, top: number, near: number, far: number) -> +THREE.Matrix4
"
,
"
!doc
"
:
"
Creates a [page:Frustum frustum] matrix.
"
},
"
makePerspective
"
:
{
"
!type
"
:
"
fn(
fov: number, aspect
: number, near: number, far: number) -> +THREE.Matrix4
"
,
"
!type
"
:
"
fn(
left: number, right: number, bottom: number, top
: number, near: number, far: number) -> +THREE.Matrix4
"
,
"
!doc
"
:
"
Creates a perspective projection matrix.
"
},
"
makeOrthographic
"
:
{
...
...
src/Three.Legacy.js
浏览文件 @
53ae111d
...
...
@@ -466,6 +466,11 @@ Object.assign( Matrix4.prototype, {
console
.
error
(
'
THREE.Matrix4: .applyToVector3Array() has been removed.
'
);
},
makeFrustum
:
function
(
left
,
right
,
bottom
,
top
,
near
,
far
)
{
console
.
error
(
'
THREE.Matrix4: .makeFrustum() has been renamed to .makePerspective().
'
);
}
}
);
...
...
src/cameras/PerspectiveCamera.js
浏览文件 @
53ae111d
...
...
@@ -193,8 +193,7 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
var
skew
=
this
.
filmOffset
;
if
(
skew
!==
0
)
left
+=
near
*
skew
/
this
.
getFilmWidth
();
this
.
projectionMatrix
.
makeFrustum
(
left
,
left
+
width
,
top
-
height
,
top
,
near
,
this
.
far
);
this
.
projectionMatrix
.
makePerspective
(
left
,
left
+
width
,
top
-
height
,
top
,
near
,
this
.
far
);
},
...
...
src/math/Matrix4.js
浏览文件 @
53ae111d
...
...
@@ -833,7 +833,7 @@ Matrix4.prototype = {
}(),
make
Frustum
:
function
(
left
,
right
,
bottom
,
top
,
near
,
far
)
{
make
Perspective
:
function
(
left
,
right
,
bottom
,
top
,
near
,
far
)
{
var
te
=
this
.
elements
;
var
x
=
2
*
near
/
(
right
-
left
);
...
...
@@ -853,17 +853,6 @@ Matrix4.prototype = {
},
makePerspective
:
function
(
fov
,
aspect
,
near
,
far
)
{
var
ymax
=
near
*
Math
.
tan
(
_Math
.
DEG2RAD
*
fov
*
0.5
);
var
ymin
=
-
ymax
;
var
xmin
=
ymin
*
aspect
;
var
xmax
=
ymax
*
aspect
;
return
this
.
makeFrustum
(
xmin
,
xmax
,
ymin
,
ymax
,
near
,
far
);
},
makeOrthographic
:
function
(
left
,
right
,
top
,
bottom
,
near
,
far
)
{
var
te
=
this
.
elements
;
...
...
test/unit/math/Frustum.js
浏览文件 @
53ae111d
...
...
@@ -87,8 +87,8 @@ test( "setFromMatrix/makeOrthographic/containsPoint", function() {
});
test
(
"
setFromMatrix/make
Frustum
/containsPoint
"
,
function
()
{
var
m
=
new
THREE
.
Matrix4
().
make
Frustum
(
-
1
,
1
,
-
1
,
1
,
1
,
100
);
test
(
"
setFromMatrix/make
Perspective
/containsPoint
"
,
function
()
{
var
m
=
new
THREE
.
Matrix4
().
make
Perspective
(
-
1
,
1
,
-
1
,
1
,
1
,
100
);
var
a
=
new
THREE
.
Frustum
().
setFromMatrix
(
m
);
ok
(
!
a
.
containsPoint
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
),
"
Passed!
"
);
...
...
@@ -106,8 +106,8 @@ test( "setFromMatrix/makeFrustum/containsPoint", function() {
ok
(
!
a
.
containsPoint
(
new
THREE
.
Vector3
(
0
,
0
,
-
101
)
),
"
Passed!
"
);
});
test
(
"
setFromMatrix/make
Frustum
/intersectsSphere
"
,
function
()
{
var
m
=
new
THREE
.
Matrix4
().
make
Frustum
(
-
1
,
1
,
-
1
,
1
,
1
,
100
);
test
(
"
setFromMatrix/make
Perspective
/intersectsSphere
"
,
function
()
{
var
m
=
new
THREE
.
Matrix4
().
make
Perspective
(
-
1
,
1
,
-
1
,
1
,
1
,
100
);
var
a
=
new
THREE
.
Frustum
().
setFromMatrix
(
m
);
ok
(
!
a
.
intersectsSphere
(
new
THREE
.
Sphere
(
new
THREE
.
Vector3
(
0
,
0
,
0
),
0
)
),
"
Passed!
"
);
...
...
test/unit/math/Matrix4.js
浏览文件 @
53ae111d
...
...
@@ -184,8 +184,8 @@ test( "getInverse", function() {
new
THREE
.
Matrix4
().
makeRotationZ
(
-
0.3
),
new
THREE
.
Matrix4
().
makeScale
(
1
,
2
,
3
),
new
THREE
.
Matrix4
().
makeScale
(
1
/
8
,
1
/
2
,
1
/
3
),
new
THREE
.
Matrix4
().
make
Frustum
(
-
1
,
1
,
-
1
,
1
,
1
,
1000
),
new
THREE
.
Matrix4
().
make
Frustum
(
-
16
,
16
,
-
9
,
9
,
0.1
,
10000
),
new
THREE
.
Matrix4
().
make
Perspective
(
-
1
,
1
,
-
1
,
1
,
1
,
1000
),
new
THREE
.
Matrix4
().
make
Perspective
(
-
16
,
16
,
-
9
,
9
,
0.1
,
10000
),
new
THREE
.
Matrix4
().
makeTranslation
(
1
,
2
,
3
)
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录