Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
51d59741
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,发现更多精彩内容 >>
提交
51d59741
编写于
3月 31, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Using Matrix3.getNormalMatrix. See #3220.
上级
389cf29b
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
270 addition
and
287 deletion
+270
-287
build/three.js
build/three.js
+7
-14
build/three.min.js
build/three.min.js
+253
-252
examples/canvas_interactive_voxelpainter.html
examples/canvas_interactive_voxelpainter.html
+1
-2
examples/webgl_interactive_voxelpainter.html
examples/webgl_interactive_voxelpainter.html
+1
-2
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+1
-2
src/core/Geometry.js
src/core/Geometry.js
+1
-1
src/core/Projector.js
src/core/Projector.js
+2
-4
src/extras/GeometryUtils.js
src/extras/GeometryUtils.js
+1
-3
src/math/Plane.js
src/math/Plane.js
+1
-1
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+1
-3
src/renderers/WebGLRenderer2.js
src/renderers/WebGLRenderer2.js
+1
-3
未找到文件。
build/three.js
浏览文件 @
51d59741
...
...
@@ -5233,7 +5233,7 @@ THREE.Plane.prototype = {
// compute new normal based on theory here:
// http://www.songho.ca/opengl/gl_normaltransform.html
optionalNormalMatrix = optionalNormalMatrix || new THREE.Matrix3().get
Inverse( matrix ).transpose(
);
optionalNormalMatrix = optionalNormalMatrix || new THREE.Matrix3().get
NormalMatrix( matrix
);
var newNormal = v1.copy( this.normal ).applyMatrix3( optionalNormalMatrix );
var newCoplanarPoint = this.coplanarPoint( v2 );
...
...
@@ -6860,8 +6860,7 @@ THREE.Projector = function () {
_viewMatrix.copy( camera.matrixWorldInverse.getInverse( camera.matrixWorld ) );
_viewProjectionMatrix.multiplyMatrices( camera.projectionMatrix, _viewMatrix );
_normalViewMatrix.getInverse( _viewMatrix );
_normalViewMatrix.transpose();
_normalViewMatrix.getNormalMatrix( _viewMatrix );
_frustum.setFromMatrix( _viewProjectionMatrix );
...
...
@@ -6883,8 +6882,7 @@ THREE.Projector = function () {
faces = geometry.faces;
faceVertexUvs = geometry.faceVertexUvs;
_normalMatrix.getInverse( _modelMatrix );
_normalMatrix.transpose();
_normalMatrix.getNormalMatrix( _modelMatrix );
isFaceMaterial = object.material instanceof THREE.MeshFaceMaterial;
objectMaterials = isFaceMaterial === true ? object.material : null;
...
...
@@ -7491,7 +7489,7 @@ THREE.Geometry.prototype = {
applyMatrix: function ( matrix ) {
var normalMatrix = new THREE.Matrix3().get
Inverse( matrix ).transpose(
);
var normalMatrix = new THREE.Matrix3().get
NormalMatrix( matrix
);
for ( var i = 0, il = this.vertices.length; i < il; i ++ ) {
...
...
@@ -8291,8 +8289,7 @@ THREE.BufferGeometry.prototype = {
if ( normalArray !== undefined ) {
var normalMatrix = new THREE.Matrix3();
normalMatrix.getInverse( matrix ).transpose();
var normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
normalMatrix.multiplyVector3Array( normalArray );
...
...
@@ -24000,9 +23997,7 @@ THREE.WebGLRenderer = function ( parameters ) {
function setupMatrices ( object, camera ) {
object._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
object._normalMatrix.getInverse( object._modelViewMatrix );
object._normalMatrix.transpose();
object._normalMatrix.getNormalMatrix( object._modelViewMatrix );
};
...
...
@@ -25868,9 +25863,7 @@ THREE.GeometryUtils = {
matrix = object2.matrix;
normalMatrix = new THREE.Matrix3();
normalMatrix.getInverse( matrix );
normalMatrix.transpose();
normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
}
...
...
build/three.min.js
浏览文件 @
51d59741
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
examples/canvas_interactive_voxelpainter.html
浏览文件 @
51d59741
...
...
@@ -173,8 +173,7 @@
}
else
{
normalMatrix
.
getInverse
(
intersect
.
object
.
matrixWorld
);
normalMatrix
.
transpose
();
normalMatrix
.
getNormalMatrix
(
intersect
.
object
.
matrixWorld
);
var
normal
=
intersect
.
face
.
normal
.
clone
();
normal
.
applyMatrix3
(
normalMatrix
).
normalize
();
...
...
examples/webgl_interactive_voxelpainter.html
浏览文件 @
51d59741
...
...
@@ -143,8 +143,7 @@
function
setVoxelPosition
(
intersector
)
{
normalMatrix
.
getInverse
(
intersector
.
object
.
matrixWorld
);
normalMatrix
.
transpose
();
normalMatrix
.
getNormalMatrix
(
intersector
.
object
.
matrixWorld
);
tmpVec
.
copy
(
intersector
.
face
.
normal
);
tmpVec
.
applyMatrix3
(
normalMatrix
).
normalize
();
...
...
src/core/BufferGeometry.js
浏览文件 @
51d59741
...
...
@@ -57,8 +57,7 @@ THREE.BufferGeometry.prototype = {
if
(
normalArray
!==
undefined
)
{
var
normalMatrix
=
new
THREE
.
Matrix3
();
normalMatrix
.
getInverse
(
matrix
).
transpose
();
var
normalMatrix
=
new
THREE
.
Matrix3
().
getNormalMatrix
(
matrix
);
normalMatrix
.
multiplyVector3Array
(
normalArray
);
...
...
src/core/Geometry.js
浏览文件 @
51d59741
...
...
@@ -63,7 +63,7 @@ THREE.Geometry.prototype = {
applyMatrix
:
function
(
matrix
)
{
var
normalMatrix
=
new
THREE
.
Matrix3
().
get
Inverse
(
matrix
).
transpose
(
);
var
normalMatrix
=
new
THREE
.
Matrix3
().
get
NormalMatrix
(
matrix
);
for
(
var
i
=
0
,
il
=
this
.
vertices
.
length
;
i
<
il
;
i
++
)
{
...
...
src/core/Projector.js
浏览文件 @
51d59741
...
...
@@ -195,8 +195,7 @@ THREE.Projector = function () {
_viewMatrix
.
copy
(
camera
.
matrixWorldInverse
.
getInverse
(
camera
.
matrixWorld
)
);
_viewProjectionMatrix
.
multiplyMatrices
(
camera
.
projectionMatrix
,
_viewMatrix
);
_normalViewMatrix
.
getInverse
(
_viewMatrix
);
_normalViewMatrix
.
transpose
();
_normalViewMatrix
.
getNormalMatrix
(
_viewMatrix
);
_frustum
.
setFromMatrix
(
_viewProjectionMatrix
);
...
...
@@ -218,8 +217,7 @@ THREE.Projector = function () {
faces
=
geometry
.
faces
;
faceVertexUvs
=
geometry
.
faceVertexUvs
;
_normalMatrix
.
getInverse
(
_modelMatrix
);
_normalMatrix
.
transpose
();
_normalMatrix
.
getNormalMatrix
(
_modelMatrix
);
isFaceMaterial
=
object
.
material
instanceof
THREE
.
MeshFaceMaterial
;
objectMaterials
=
isFaceMaterial
===
true
?
object
.
material
:
null
;
...
...
src/extras/GeometryUtils.js
浏览文件 @
51d59741
...
...
@@ -28,9 +28,7 @@ THREE.GeometryUtils = {
matrix
=
object2
.
matrix
;
normalMatrix
=
new
THREE
.
Matrix3
();
normalMatrix
.
getInverse
(
matrix
);
normalMatrix
.
transpose
();
normalMatrix
=
new
THREE
.
Matrix3
().
getNormalMatrix
(
matrix
);
}
...
...
src/math/Plane.js
浏览文件 @
51d59741
...
...
@@ -185,7 +185,7 @@ THREE.Plane.prototype = {
// compute new normal based on theory here:
// http://www.songho.ca/opengl/gl_normaltransform.html
optionalNormalMatrix
=
optionalNormalMatrix
||
new
THREE
.
Matrix3
().
get
Inverse
(
matrix
).
transpose
(
);
optionalNormalMatrix
=
optionalNormalMatrix
||
new
THREE
.
Matrix3
().
get
NormalMatrix
(
matrix
);
var
newNormal
=
v1
.
copy
(
this
.
normal
).
applyMatrix3
(
optionalNormalMatrix
);
var
newCoplanarPoint
=
this
.
coplanarPoint
(
v2
);
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
51d59741
...
...
@@ -5714,9 +5714,7 @@ THREE.WebGLRenderer = function ( parameters ) {
function
setupMatrices
(
object
,
camera
)
{
object
.
_modelViewMatrix
.
multiplyMatrices
(
camera
.
matrixWorldInverse
,
object
.
matrixWorld
);
object
.
_normalMatrix
.
getInverse
(
object
.
_modelViewMatrix
);
object
.
_normalMatrix
.
transpose
();
object
.
_normalMatrix
.
getNormalMatrix
(
object
.
_modelViewMatrix
);
};
...
...
src/renderers/WebGLRenderer2.js
浏览文件 @
51d59741
...
...
@@ -2917,9 +2917,7 @@ THREE.WebGLRenderer = function ( parameters ) {
function
setupMatrices
(
object
,
camera
)
{
object
.
_modelViewMatrix
.
multiplyMatrices
(
camera
.
matrixWorldInverse
,
object
.
matrixWorld
);
object
.
_normalMatrix
.
getInverse
(
object
.
_modelViewMatrix
);
object
.
_normalMatrix
.
transpose
();
object
.
_normalMatrix
.
getNormalMatrix
(
object
.
_modelViewMatrix
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录