Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c589751d
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,发现更多精彩内容 >>
提交
c589751d
编写于
2月 04, 2013
作者:
B
Ben Houston
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removed "position = _vector3" pattern per @WestLangley
上级
3db966d6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
25 deletion
+20
-25
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+9
-11
src/renderers/WebGLRenderer2.js
src/renderers/WebGLRenderer2.js
+11
-14
未找到文件。
src/renderers/WebGLRenderer.js
浏览文件 @
c589751d
...
@@ -6035,12 +6035,11 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -6035,12 +6035,11 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
position
=
_vector3
;
_vector3
.
getPositionFromMatrix
(
light
.
matrixWorld
);
position
.
getPositionFromMatrix
(
light
.
matrixWorld
);
pointPositions
[
pointOffset
]
=
position
.
x
;
pointPositions
[
pointOffset
]
=
_vector3
.
x
;
pointPositions
[
pointOffset
+
1
]
=
position
.
y
;
pointPositions
[
pointOffset
+
1
]
=
_vector3
.
y
;
pointPositions
[
pointOffset
+
2
]
=
position
.
z
;
pointPositions
[
pointOffset
+
2
]
=
_vector3
.
z
;
pointDistances
[
pointLength
]
=
distance
;
pointDistances
[
pointLength
]
=
distance
;
...
@@ -6064,16 +6063,15 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -6064,16 +6063,15 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
position
=
_vector3
;
_vector3
.
getPositionFromMatrix
(
light
.
matrixWorld
);
position
.
getPositionFromMatrix
(
light
.
matrixWorld
);
spotPositions
[
spotOffset
]
=
position
.
x
;
spotPositions
[
spotOffset
]
=
_vector3
.
x
;
spotPositions
[
spotOffset
+
1
]
=
position
.
y
;
spotPositions
[
spotOffset
+
1
]
=
_vector3
.
y
;
spotPositions
[
spotOffset
+
2
]
=
position
.
z
;
spotPositions
[
spotOffset
+
2
]
=
_vector3
.
z
;
spotDistances
[
spotLength
]
=
distance
;
spotDistances
[
spotLength
]
=
distance
;
_direction
.
copy
(
position
);
_direction
.
copy
(
_vector3
);
_vector3
.
getPositionFromMatrix
(
light
.
target
.
matrixWorld
);
_vector3
.
getPositionFromMatrix
(
light
.
target
.
matrixWorld
);
_direction
.
sub
(
_vector3
);
_direction
.
sub
(
_vector3
);
_direction
.
normalize
();
_direction
.
normalize
();
...
...
src/renderers/WebGLRenderer2.js
浏览文件 @
c589751d
...
@@ -2507,9 +2507,8 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
...
@@ -2507,9 +2507,8 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
if
(
p_uniforms
.
cameraPosition
!==
null
)
{
if
(
p_uniforms
.
cameraPosition
!==
null
)
{
var
position
=
_vector3
;
_vector3
.
getPositionFromMatrix
(
camera
.
matrixWorld
);
position
.
getPositionFromMatrix
(
camera
.
matrixWorld
);
renderer
.
uniform3f
(
p_uniforms
.
cameraPosition
,
_vector3
.
x
,
_vector3
.
y
,
_vector3
.
z
);
renderer
.
uniform3f
(
p_uniforms
.
cameraPosition
,
position
.
x
,
position
.
y
,
position
.
z
);
}
}
...
@@ -3156,12 +3155,11 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
...
@@ -3156,12 +3155,11 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
}
}
position
=
_vector3
;
_vector3
.
getPositionFromMatrix
(
light
.
matrixWorld
);
position
.
getPositionFromMatrix
(
light
.
matrixWorld
);
pointPositions
[
pointOffset
]
=
position
.
x
;
pointPositions
[
pointOffset
]
=
_vector3
.
x
;
pointPositions
[
pointOffset
+
1
]
=
position
.
y
;
pointPositions
[
pointOffset
+
1
]
=
_vector3
.
y
;
pointPositions
[
pointOffset
+
2
]
=
position
.
z
;
pointPositions
[
pointOffset
+
2
]
=
_vector3
.
z
;
pointDistances
[
pointLength
]
=
distance
;
pointDistances
[
pointLength
]
=
distance
;
...
@@ -3185,16 +3183,15 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
...
@@ -3185,16 +3183,15 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
}
}
position
=
_vector3
;
_vector3
.
getPositionFromMatrix
(
light
.
matrixWorld
);
position
.
getPositionFromMatrix
(
light
.
matrixWorld
);
spotPositions
[
spotOffset
]
=
position
.
x
;
spotPositions
[
spotOffset
]
=
_vector3
.
x
;
spotPositions
[
spotOffset
+
1
]
=
position
.
y
;
spotPositions
[
spotOffset
+
1
]
=
_vector3
.
y
;
spotPositions
[
spotOffset
+
2
]
=
position
.
z
;
spotPositions
[
spotOffset
+
2
]
=
_vector3
.
z
;
spotDistances
[
spotLength
]
=
distance
;
spotDistances
[
spotLength
]
=
distance
;
_direction
.
copy
(
position
);
_direction
.
copy
(
_vector3
);
_vector3
.
getPositionFromMatrix
(
light
.
target
.
matrixWorld
);
_vector3
.
getPositionFromMatrix
(
light
.
target
.
matrixWorld
);
_direction
.
sub
(
_vector3
);
_direction
.
sub
(
_vector3
);
_direction
.
normalize
();
_direction
.
normalize
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录