Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
6f4cc817
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,发现更多精彩内容 >>
提交
6f4cc817
编写于
1月 10, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed camera.projectionMatrixInverse as per @bhouston suggestion in #4257.
上级
69a40ba9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
13 deletion
+9
-13
docs/api/cameras/Camera.html
docs/api/cameras/Camera.html
+2
-5
examples/js/renderers/WebGLDeferredRenderer.js
examples/js/renderers/WebGLDeferredRenderer.js
+3
-2
src/cameras/Camera.js
src/cameras/Camera.js
+0
-3
src/core/Projector.js
src/core/Projector.js
+4
-3
未找到文件。
docs/api/cameras/Camera.html
浏览文件 @
6f4cc817
...
...
@@ -19,7 +19,7 @@
<h3>
[name]()
</h3>
<div>
This constructor sets the following properties to the correct type: matrixWorldInverse
, projectionMatrix and projectionMatrixInverse
.
This constructor sets the following properties to the correct type: matrixWorldInverse
and projectionMatrix
.
</div>
...
...
@@ -30,10 +30,7 @@
<div>
This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has the world transform of the Camera.
</div>
<h3>
.[page:Matrix4 projectionMatrix]
</h3>
<div>
This is the matrix which contains the projection.
</div>
<h3>
.[page:Matrix4 projectionMatrixInverse]
</h3>
<div>
This is the inverse of projectionMatrix.
</div>
<div>
This is the matrix which contains the projection.
</div>
<h2>
Methods
</h2>
...
...
examples/js/renderers/WebGLDeferredRenderer.js
浏览文件 @
6f4cc817
...
...
@@ -39,6 +39,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
//
var
currentCamera
=
null
;
var
projectionMatrixInverse
=
new
THREE
.
Matrix4
();
var
positionVS
=
new
THREE
.
Vector3
();
var
directionVS
=
new
THREE
.
Vector3
();
...
...
@@ -932,7 +933,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
var
uniforms
=
proxy
.
material
.
uniforms
;
if
(
uniforms
[
"
matProjInverse
"
]
)
uniforms
[
"
matProjInverse
"
].
value
=
currentCamera
.
projectionMatrixInverse
;
if
(
uniforms
[
"
matProjInverse
"
]
)
uniforms
[
"
matProjInverse
"
].
value
=
projectionMatrixInverse
;
if
(
uniforms
[
"
matView
"
]
)
uniforms
[
"
matView
"
].
value
=
currentCamera
.
matrixWorldInverse
;
var
originalLight
=
proxy
.
userData
.
originalLight
;
...
...
@@ -1055,7 +1056,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
gl
.
depthFunc
(
gl
.
GEQUAL
);
currentCamera
.
projectionMatrixInverse
.
getInverse
(
currentCamera
.
projectionMatrix
);
projectionMatrixInverse
.
getInverse
(
currentCamera
.
projectionMatrix
);
for
(
var
i
=
0
,
il
=
lightSceneProxy
.
children
.
length
;
i
<
il
;
i
++
)
{
...
...
src/cameras/Camera.js
浏览文件 @
6f4cc817
...
...
@@ -9,9 +9,7 @@ THREE.Camera = function () {
THREE
.
Object3D
.
call
(
this
);
this
.
matrixWorldInverse
=
new
THREE
.
Matrix4
();
this
.
projectionMatrix
=
new
THREE
.
Matrix4
();
this
.
projectionMatrixInverse
=
new
THREE
.
Matrix4
();
};
...
...
@@ -41,7 +39,6 @@ THREE.Camera.prototype.clone = function (camera) {
camera
.
matrixWorldInverse
.
copy
(
this
.
matrixWorldInverse
);
camera
.
projectionMatrix
.
copy
(
this
.
projectionMatrix
);
camera
.
projectionMatrixInverse
.
copy
(
this
.
projectionMatrixInverse
);
return
camera
;
};
src/core/Projector.js
浏览文件 @
6f4cc817
...
...
@@ -22,6 +22,8 @@ THREE.Projector = function () {
_points3
=
new
Array
(
3
),
_points4
=
new
Array
(
4
),
_projectionMatrixInverse
=
new
THREE
.
Matrix4
(),
_viewMatrix
=
new
THREE
.
Matrix4
(),
_viewProjectionMatrix
=
new
THREE
.
Matrix4
(),
...
...
@@ -50,9 +52,8 @@ THREE.Projector = function () {
this
.
unprojectVector
=
function
(
vector
,
camera
)
{
camera
.
projectionMatrixInverse
.
getInverse
(
camera
.
projectionMatrix
);
_viewProjectionMatrix
.
multiplyMatrices
(
camera
.
matrixWorld
,
camera
.
projectionMatrixInverse
);
_projectionMatrixInverse
.
getInverse
(
camera
.
projectionMatrix
);
_viewProjectionMatrix
.
multiplyMatrices
(
camera
.
matrixWorld
,
_projectionMatrixInverse
);
return
vector
.
applyProjection
(
_viewProjectionMatrix
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录