Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c2e024f4
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,发现更多精彩内容 >>
提交
c2e024f4
编写于
8月 14, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
aad2dc34
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
3 deletion
+7
-3
build/three.js
build/three.js
+6
-2
build/three.min.js
build/three.min.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
c2e024f4
...
...
@@ -34708,6 +34708,7 @@ THREE.SpotLightHelper.prototype = Object.create( THREE.Object3D.prototype );
THREE.SpotLightHelper.prototype.update = function () {
var vector = new THREE.Vector3();
var vector2 = new THREE.Vector3();
return function () {
...
...
@@ -34716,11 +34717,14 @@ THREE.SpotLightHelper.prototype.update = function () {
this.cone.scale.set( coneWidth, coneWidth, coneLength );
this.cone.lookAt( vector.getPositionFromMatrix( this.light.matrixWorld ).negate() );
vector.getPositionFromMatrix( this.light.matrixWorld );
vector2.getPositionFromMatrix( this.light.target.matrixWorld );
this.cone.lookAt( vector2.sub( vector ) );
this.cone.material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
}
}
;
}();
...
...
build/three.min.js
浏览文件 @
c2e024f4
...
...
@@ -654,7 +654,7 @@ THREE.FaceNormalsHelper.prototype.update=function(){var a=new THREE.Vector3;retu
!
0
;
return
this
}}();
THREE
.
GridHelper
=
function
(
a
,
b
){
var
c
=
new
THREE
.
Geometry
,
d
=
new
THREE
.
LineBasicMaterial
({
vertexColors
:
THREE
.
VertexColors
});
this
.
color1
=
new
THREE
.
Color
(
4473924
);
this
.
color2
=
new
THREE
.
Color
(
8947848
);
for
(
var
e
=-
a
;
e
<=
a
;
e
+=
b
){
c
.
vertices
.
push
(
new
THREE
.
Vector3
(
-
a
,
0
,
e
),
new
THREE
.
Vector3
(
a
,
0
,
e
),
new
THREE
.
Vector3
(
e
,
0
,
-
a
),
new
THREE
.
Vector3
(
e
,
0
,
a
));
var
f
=
0
===
e
?
this
.
color1
:
this
.
color2
;
c
.
colors
.
push
(
f
,
f
,
f
,
f
)}
THREE
.
Line
.
call
(
this
,
c
,
d
,
THREE
.
LinePieces
)};
THREE
.
GridHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
GridHelper
.
prototype
.
setColors
=
function
(
a
,
b
){
this
.
color1
.
set
(
a
);
this
.
color2
.
set
(
b
);
this
.
geometry
.
colorsNeedUpdate
=!
0
};
THREE
.
HemisphereLightHelper
=
function
(
a
,
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
light
=
a
;
this
.
light
.
updateMatrixWorld
();
this
.
matrixWorld
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
;
this
.
colors
=
[
new
THREE
.
Color
,
new
THREE
.
Color
];
var
c
=
new
THREE
.
SphereGeometry
(
b
,
4
,
2
);
c
.
applyMatrix
((
new
THREE
.
Matrix4
).
makeRotationX
(
-
Math
.
PI
/
2
));
for
(
var
d
=
0
;
8
>
d
;
d
++
)
c
.
faces
[
d
].
color
=
this
.
colors
[
4
>
d
?
0
:
1
];
d
=
new
THREE
.
MeshBasicMaterial
({
vertexColors
:
THREE
.
FaceColors
,
wireframe
:
!
0
});
this
.
lightSphere
=
new
THREE
.
Mesh
(
c
,
d
);
this
.
add
(
this
.
lightSphere
);
this
.
update
()};
THREE
.
HemisphereLightHelper
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
HemisphereLightHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
;
return
function
(){
this
.
colors
[
0
].
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
colors
[
1
].
copy
(
this
.
light
.
groundColor
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
lightSphere
.
lookAt
(
a
.
getPositionFromMatrix
(
this
.
light
.
matrixWorld
).
negate
());
this
.
lightSphere
.
geometry
.
colorsNeedUpdate
=!
0
}}();
THREE
.
PointLightHelper
=
function
(
a
,
b
){
this
.
light
=
a
;
this
.
light
.
updateMatrixWorld
();
var
c
=
new
THREE
.
SphereGeometry
(
b
,
4
,
2
),
d
=
new
THREE
.
MeshBasicMaterial
({
wireframe
:
!
0
,
fog
:
!
1
});
d
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
THREE
.
Mesh
.
call
(
this
,
c
,
d
);
this
.
matrixWorld
=
this
.
light
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
};
THREE
.
PointLightHelper
.
prototype
=
Object
.
create
(
THREE
.
Mesh
.
prototype
);
THREE
.
PointLightHelper
.
prototype
.
update
=
function
(){
this
.
material
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
)};
THREE
.
SpotLightHelper
=
function
(
a
){
THREE
.
Object3D
.
call
(
this
);
this
.
light
=
a
;
this
.
light
.
updateMatrixWorld
();
this
.
matrixWorld
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
;
a
=
new
THREE
.
CylinderGeometry
(
0
,
1
,
1
,
8
,
1
,
!
0
);
a
.
applyMatrix
((
new
THREE
.
Matrix4
).
makeTranslation
(
0
,
-
0.5
,
0
));
a
.
applyMatrix
((
new
THREE
.
Matrix4
).
makeRotationX
(
-
Math
.
PI
/
2
));
var
b
=
new
THREE
.
MeshBasicMaterial
({
wireframe
:
!
0
,
fog
:
!
1
});
this
.
cone
=
new
THREE
.
Mesh
(
a
,
b
);
this
.
add
(
this
.
cone
);
this
.
update
()};
THREE
.
SpotLightHelper
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
SpotLightHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
;
return
function
(){
var
b
=
this
.
light
.
distance
?
this
.
light
.
distance
:
1
E4
,
c
=
b
*
Math
.
tan
(
this
.
light
.
angle
);
this
.
cone
.
scale
.
set
(
c
,
c
,
b
);
this
.
cone
.
lookAt
(
a
.
getPositionFromMatrix
(
this
.
light
.
matrixWorld
).
negate
(
));
this
.
cone
.
material
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
)}}();
THREE
.
VertexNormalsHelper
=
function
(
a
,
b
,
c
,
d
){
this
.
object
=
a
;
this
.
size
=
b
||
1
;
for
(
var
b
=
c
||
16711680
,
d
=
d
||
1
,
c
=
new
THREE
.
Geometry
,
a
=
a
.
geometry
.
faces
,
e
=
0
,
f
=
a
.
length
;
e
<
f
;
e
++
)
for
(
var
h
=
0
,
g
=
a
[
e
].
vertexNormals
.
length
;
h
<
g
;
h
++
)
c
.
vertices
.
push
(
new
THREE
.
Vector3
),
c
.
vertices
.
push
(
new
THREE
.
Vector3
);
THREE
.
Line
.
call
(
this
,
c
,
new
THREE
.
LineBasicMaterial
({
color
:
b
,
linewidth
:
d
}),
THREE
.
LinePieces
);
this
.
matrixAutoUpdate
=!
1
;
this
.
normalMatrix
=
new
THREE
.
Matrix3
;
this
.
update
()};
THREE
.
VertexNormalsHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
SpotLightHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
,
b
=
new
THREE
.
Vector3
;
return
function
(){
var
c
=
this
.
light
.
distance
?
this
.
light
.
distance
:
1
E4
,
d
=
c
*
Math
.
tan
(
this
.
light
.
angle
);
this
.
cone
.
scale
.
set
(
d
,
d
,
c
);
a
.
getPositionFromMatrix
(
this
.
light
.
matrixWorld
);
b
.
getPositionFromMatrix
(
this
.
light
.
target
.
matrixWorld
);
this
.
cone
.
lookAt
(
b
.
sub
(
a
));
this
.
cone
.
material
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
)}}();
THREE
.
VertexNormalsHelper
=
function
(
a
,
b
,
c
,
d
){
this
.
object
=
a
;
this
.
size
=
b
||
1
;
for
(
var
b
=
c
||
16711680
,
d
=
d
||
1
,
c
=
new
THREE
.
Geometry
,
a
=
a
.
geometry
.
faces
,
e
=
0
,
f
=
a
.
length
;
e
<
f
;
e
++
)
for
(
var
h
=
0
,
g
=
a
[
e
].
vertexNormals
.
length
;
h
<
g
;
h
++
)
c
.
vertices
.
push
(
new
THREE
.
Vector3
),
c
.
vertices
.
push
(
new
THREE
.
Vector3
);
THREE
.
Line
.
call
(
this
,
c
,
new
THREE
.
LineBasicMaterial
({
color
:
b
,
linewidth
:
d
}),
THREE
.
LinePieces
);
this
.
matrixAutoUpdate
=!
1
;
this
.
normalMatrix
=
new
THREE
.
Matrix3
;
this
.
update
()};
THREE
.
VertexNormalsHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
VertexNormalsHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
;
return
function
(){
var
b
=
[
"
a
"
,
"
b
"
,
"
c
"
,
"
d
"
];
this
.
object
.
updateMatrixWorld
(
!
0
);
this
.
normalMatrix
.
getNormalMatrix
(
this
.
object
.
matrixWorld
);
for
(
var
c
=
this
.
geometry
.
vertices
,
d
=
this
.
object
.
geometry
.
vertices
,
e
=
this
.
object
.
geometry
.
faces
,
f
=
this
.
object
.
matrixWorld
,
h
=
0
,
g
=
0
,
i
=
e
.
length
;
g
<
i
;
g
++
)
for
(
var
k
=
e
[
g
],
m
=
0
,
l
=
k
.
vertexNormals
.
length
;
m
<
l
;
m
++
){
var
n
=
k
.
vertexNormals
[
m
];
c
[
h
].
copy
(
d
[
k
[
b
[
m
]]]).
applyMatrix4
(
f
);
a
.
copy
(
n
).
applyMatrix3
(
this
.
normalMatrix
).
normalize
().
multiplyScalar
(
this
.
size
);
a
.
add
(
c
[
h
]);
h
+=
1
;
c
[
h
].
copy
(
a
);
h
+=
1
}
this
.
geometry
.
verticesNeedUpdate
=!
0
;
return
this
}}();
THREE
.
VertexTangentsHelper
=
function
(
a
,
b
,
c
,
d
){
this
.
object
=
a
;
this
.
size
=
b
||
1
;
for
(
var
b
=
c
||
255
,
d
=
d
||
1
,
c
=
new
THREE
.
Geometry
,
a
=
a
.
geometry
.
faces
,
e
=
0
,
f
=
a
.
length
;
e
<
f
;
e
++
)
for
(
var
h
=
0
,
g
=
a
[
e
].
vertexTangents
.
length
;
h
<
g
;
h
++
)
c
.
vertices
.
push
(
new
THREE
.
Vector3
),
c
.
vertices
.
push
(
new
THREE
.
Vector3
);
THREE
.
Line
.
call
(
this
,
c
,
new
THREE
.
LineBasicMaterial
({
color
:
b
,
linewidth
:
d
}),
THREE
.
LinePieces
);
this
.
matrixAutoUpdate
=!
1
;
this
.
update
()};
THREE
.
VertexTangentsHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
VertexTangentsHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
;
return
function
(){
var
b
=
[
"
a
"
,
"
b
"
,
"
c
"
,
"
d
"
];
this
.
object
.
updateMatrixWorld
(
!
0
);
for
(
var
c
=
this
.
geometry
.
vertices
,
d
=
this
.
object
.
geometry
.
vertices
,
e
=
this
.
object
.
geometry
.
faces
,
f
=
this
.
object
.
matrixWorld
,
h
=
0
,
g
=
0
,
i
=
e
.
length
;
g
<
i
;
g
++
)
for
(
var
k
=
e
[
g
],
m
=
0
,
l
=
k
.
vertexTangents
.
length
;
m
<
l
;
m
++
){
var
n
=
k
.
vertexTangents
[
m
];
c
[
h
].
copy
(
d
[
k
[
b
[
m
]]]).
applyMatrix4
(
f
);
a
.
copy
(
n
).
transformDirection
(
f
).
multiplyScalar
(
this
.
size
);
a
.
add
(
c
[
h
]);
h
+=
1
;
c
[
h
].
copy
(
a
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录