Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
7152fcda
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,发现更多精彩内容 >>
提交
7152fcda
编写于
2月 19, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
ffdf84a4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
7 deletion
+19
-7
build/three.js
build/three.js
+16
-5
build/three.min.js
build/three.min.js
+3
-2
未找到文件。
build/three.js
浏览文件 @
7152fcda
...
...
@@ -34892,16 +34892,27 @@ THREE.DirectionalLightHelper = function ( light, size ) {
this.matrixAutoUpdate = false;
size = size || 1;
var geometry = new THREE.PlaneGeometry( size, size );
var material = new THREE.MeshBasicMaterial( { wireframe: true, fog: false } );
var geometry = new THREE.Geometry();
geometry.vertices.push(
new THREE.Vector3( - size, size, 0 ),
new THREE.Vector3( size, size, 0 ),
new THREE.Vector3( size, - size, 0 ),
new THREE.Vector3( - size, - size, 0 ),
new THREE.Vector3( - size, size, 0 )
);
var material = new THREE.LineBasicMaterial( { fog: false } );
material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
this.lightPlane = new THREE.
Mesh
( geometry, material );
this.lightPlane = new THREE.
Line
( geometry, material );
this.add( this.lightPlane );
geometry = new THREE.Geometry();
geometry.vertices.push( new THREE.Vector3() );
geometry.vertices.push( new THREE.Vector3() );
geometry.vertices.push(
new THREE.Vector3(),
new THREE.Vector3()
);
material = new THREE.LineBasicMaterial( { fog: false } );
material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
...
...
build/three.min.js
浏览文件 @
7152fcda
...
...
@@ -656,8 +656,9 @@ THREE.BoxHelper.prototype.update=function(a){var b=a.geometry;null===b.boundingB
b
(
"
n2
"
,
"
f2
"
,
16755200
);
b
(
"
n3
"
,
"
f3
"
,
16755200
);
b
(
"
n4
"
,
"
f4
"
,
16755200
);
b
(
"
p
"
,
"
n1
"
,
16711680
);
b
(
"
p
"
,
"
n2
"
,
16711680
);
b
(
"
p
"
,
"
n3
"
,
16711680
);
b
(
"
p
"
,
"
n4
"
,
16711680
);
b
(
"
u1
"
,
"
u2
"
,
43775
);
b
(
"
u2
"
,
"
u3
"
,
43775
);
b
(
"
u3
"
,
"
u1
"
,
43775
);
b
(
"
c
"
,
"
t
"
,
16777215
);
b
(
"
p
"
,
"
c
"
,
3355443
);
b
(
"
cn1
"
,
"
cn2
"
,
3355443
);
b
(
"
cn3
"
,
"
cn4
"
,
3355443
);
b
(
"
cf1
"
,
"
cf2
"
,
3355443
);
b
(
"
cf3
"
,
"
cf4
"
,
3355443
);
THREE
.
Line
.
call
(
this
,
d
,
e
,
THREE
.
LinePieces
);
this
.
camera
=
a
;
this
.
matrixWorld
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
;
this
.
pointMap
=
f
;
this
.
update
()};
THREE
.
CameraHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
CameraHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
,
b
=
new
THREE
.
Camera
,
c
=
new
THREE
.
Projector
;
return
function
(){
function
d
(
d
,
g
,
h
,
k
){
a
.
set
(
g
,
h
,
k
);
c
.
unprojectVector
(
a
,
b
);
d
=
e
.
pointMap
[
d
];
if
(
void
0
!==
d
)
for
(
g
=
0
,
h
=
d
.
length
;
g
<
h
;
g
++
)
e
.
geometry
.
vertices
[
d
[
g
]].
copy
(
a
)}
var
e
=
this
;
b
.
projectionMatrix
.
copy
(
this
.
camera
.
projectionMatrix
);
d
(
"
c
"
,
0
,
0
,
-
1
);
d
(
"
t
"
,
0
,
0
,
1
);
d
(
"
n1
"
,
-
1
,
-
1
,
-
1
);
d
(
"
n2
"
,
1
,
-
1
,
-
1
);
d
(
"
n3
"
,
-
1
,
1
,
-
1
);
d
(
"
n4
"
,
1
,
1
,
-
1
);
d
(
"
f1
"
,
-
1
,
-
1
,
1
);
d
(
"
f2
"
,
1
,
-
1
,
1
);
d
(
"
f3
"
,
-
1
,
1
,
1
);
d
(
"
f4
"
,
1
,
1
,
1
);
d
(
"
u1
"
,
0.7
,
1.1
,
-
1
);
d
(
"
u2
"
,
-
0.7
,
1.1
,
-
1
);
d
(
"
u3
"
,
0
,
2
,
-
1
);
d
(
"
cf1
"
,
-
1
,
0
,
1
);
d
(
"
cf2
"
,
1
,
0
,
1
);
d
(
"
cf3
"
,
0
,
-
1
,
1
);
d
(
"
cf4
"
,
0
,
1
,
1
);
d
(
"
cn1
"
,
-
1
,
0
,
-
1
);
d
(
"
cn2
"
,
1
,
0
,
-
1
);
d
(
"
cn3
"
,
0
,
-
1
,
-
1
);
d
(
"
cn4
"
,
0
,
1
,
-
1
);
this
.
geometry
.
verticesNeedUpdate
=!
0
}}();
THREE
.
DirectionalLightHelper
=
function
(
a
,
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
light
=
a
;
this
.
light
.
updateMatrixWorld
();
this
.
matrixWorld
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
;
b
=
b
||
1
;
var
c
=
new
THREE
.
PlaneGeometry
(
b
,
b
),
d
=
new
THREE
.
MeshBasicMaterial
({
wireframe
:
!
0
,
fog
:
!
1
});
d
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
lightPlane
=
new
THREE
.
Mesh
(
c
,
d
);
this
.
add
(
this
.
lightPlane
);
c
=
new
THREE
.
Geometry
;
c
.
vertices
.
push
(
new
THREE
.
Vector3
);
c
.
vertices
.
push
(
new
THREE
.
Vector3
);
d
=
new
THREE
.
LineBasicMaterial
({
fog
:
!
1
});
d
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
targetLine
=
new
THREE
.
Line
(
c
,
d
);
this
.
add
(
this
.
targetLine
);
this
.
update
()};
THREE
.
DirectionalLightHelper
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
DirectionalLightHelper
.
prototype
.
dispose
=
function
(){
this
.
lightPlane
.
geometry
.
dispose
();
this
.
lightPlane
.
material
.
dispose
();
this
.
targetLine
.
geometry
.
dispose
();
this
.
targetLine
.
material
.
dispose
()};
1.1
,
-
1
);
d
(
"
u2
"
,
-
0.7
,
1.1
,
-
1
);
d
(
"
u3
"
,
0
,
2
,
-
1
);
d
(
"
cf1
"
,
-
1
,
0
,
1
);
d
(
"
cf2
"
,
1
,
0
,
1
);
d
(
"
cf3
"
,
0
,
-
1
,
1
);
d
(
"
cf4
"
,
0
,
1
,
1
);
d
(
"
cn1
"
,
-
1
,
0
,
-
1
);
d
(
"
cn2
"
,
1
,
0
,
-
1
);
d
(
"
cn3
"
,
0
,
-
1
,
-
1
);
d
(
"
cn4
"
,
0
,
1
,
-
1
);
this
.
geometry
.
verticesNeedUpdate
=!
0
}}();
THREE
.
DirectionalLightHelper
=
function
(
a
,
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
light
=
a
;
this
.
light
.
updateMatrixWorld
();
this
.
matrixWorld
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
;
b
=
b
||
1
;
var
c
=
new
THREE
.
Geometry
;
c
.
vertices
.
push
(
new
THREE
.
Vector3
(
-
b
,
b
,
0
),
new
THREE
.
Vector3
(
b
,
b
,
0
),
new
THREE
.
Vector3
(
b
,
-
b
,
0
),
new
THREE
.
Vector3
(
-
b
,
-
b
,
0
),
new
THREE
.
Vector3
(
-
b
,
b
,
0
));
var
d
=
new
THREE
.
LineBasicMaterial
({
fog
:
!
1
});
d
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
lightPlane
=
new
THREE
.
Line
(
c
,
d
);
this
.
add
(
this
.
lightPlane
);
c
=
new
THREE
.
Geometry
;
c
.
vertices
.
push
(
new
THREE
.
Vector3
,
new
THREE
.
Vector3
);
d
=
new
THREE
.
LineBasicMaterial
({
fog
:
!
1
});
d
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
targetLine
=
new
THREE
.
Line
(
c
,
d
);
this
.
add
(
this
.
targetLine
);
this
.
update
()};
THREE
.
DirectionalLightHelper
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
DirectionalLightHelper
.
prototype
.
dispose
=
function
(){
this
.
lightPlane
.
geometry
.
dispose
();
this
.
lightPlane
.
material
.
dispose
();
this
.
targetLine
.
geometry
.
dispose
();
this
.
targetLine
.
material
.
dispose
()};
THREE
.
DirectionalLightHelper
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
,
b
=
new
THREE
.
Vector3
,
c
=
new
THREE
.
Vector3
;
return
function
(){
a
.
setFromMatrixPosition
(
this
.
light
.
matrixWorld
);
b
.
setFromMatrixPosition
(
this
.
light
.
target
.
matrixWorld
);
c
.
subVectors
(
b
,
a
);
this
.
lightPlane
.
lookAt
(
c
);
this
.
lightPlane
.
material
.
color
.
copy
(
this
.
light
.
color
).
multiplyScalar
(
this
.
light
.
intensity
);
this
.
targetLine
.
geometry
.
vertices
[
1
].
copy
(
c
);
this
.
targetLine
.
geometry
.
verticesNeedUpdate
=!
0
;
this
.
targetLine
.
material
.
color
.
copy
(
this
.
lightPlane
.
material
.
color
)}}();
THREE
.
EdgesHelper
=
function
(
a
,
b
){
var
c
=
void
0
!==
b
?
b
:
16777215
,
d
=
[
0
,
0
],
e
=
{},
f
=
function
(
a
,
b
){
return
a
-
b
},
g
=
[
"
a
"
,
"
b
"
,
"
c
"
],
h
=
new
THREE
.
BufferGeometry
,
k
=
a
.
geometry
.
clone
();
k
.
mergeVertices
();
k
.
computeFaceNormals
();
for
(
var
l
=
k
.
vertices
,
k
=
k
.
faces
,
n
=
0
,
q
=
0
,
r
=
k
.
length
;
q
<
r
;
q
++
)
for
(
var
s
=
k
[
q
],
t
=
0
;
3
>
t
;
t
++
){
d
[
0
]
=
s
[
g
[
t
]];
d
[
1
]
=
s
[
g
[(
t
+
1
)
%
3
]];
d
.
sort
(
f
);
var
p
=
d
.
toString
();
void
0
===
e
[
p
]?(
e
[
p
]
=
{
vert1
:
d
[
0
],
vert2
:
d
[
1
],
face1
:
q
,
face2
:
void
0
},
n
++
):
e
[
p
].
face2
=
q
}
h
.
addAttribute
(
"
position
"
,
new
Float32Array
(
6
*
n
),
3
);
d
=
h
.
attributes
.
position
.
array
;
f
=
0
;
for
(
p
in
e
)
if
(
g
=
e
[
p
],
void
0
===
g
.
face2
||
0.9999
>
k
[
g
.
face1
].
normal
.
dot
(
k
[
g
.
face2
].
normal
))
n
=
l
[
g
.
vert1
],
d
[
f
++
]
=
n
.
x
,
d
[
f
++
]
=
n
.
y
,
d
[
f
++
]
=
n
.
z
,
n
=
l
[
g
.
vert2
],
d
[
f
++
]
=
n
.
x
,
d
[
f
++
]
=
n
.
y
,
d
[
f
++
]
=
n
.
z
;
THREE
.
Line
.
call
(
this
,
h
,
new
THREE
.
LineBasicMaterial
({
color
:
c
}),
THREE
.
LinePieces
);
this
.
matrixAutoUpdate
=!
1
;
this
.
matrixWorld
=
a
.
matrixWorld
};
THREE
.
EdgesHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
FaceNormalsHelper
=
function
(
a
,
b
,
c
,
d
){
this
.
object
=
a
;
this
.
size
=
void
0
!==
b
?
b
:
1
;
a
=
void
0
!==
c
?
c
:
16776960
;
d
=
void
0
!==
d
?
d
:
1
;
b
=
new
THREE
.
Geometry
;
c
=
0
;
for
(
var
e
=
this
.
object
.
geometry
.
faces
.
length
;
c
<
e
;
c
++
)
b
.
vertices
.
push
(
new
THREE
.
Vector3
),
b
.
vertices
.
push
(
new
THREE
.
Vector3
);
THREE
.
Line
.
call
(
this
,
b
,
new
THREE
.
LineBasicMaterial
({
color
:
a
,
linewidth
:
d
}),
THREE
.
LinePieces
);
this
.
matrixAutoUpdate
=!
1
;
this
.
normalMatrix
=
new
THREE
.
Matrix3
;
this
.
update
()};
THREE
.
FaceNormalsHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
FaceNormalsHelper
.
prototype
.
update
=
function
(
a
){
var
b
=
new
THREE
.
Vector3
;
return
function
(
a
){
this
.
object
.
updateMatrixWorld
(
!
0
);
this
.
normalMatrix
.
getNormalMatrix
(
this
.
object
.
matrixWorld
);
a
=
this
.
geometry
.
vertices
;
for
(
var
d
=
this
.
object
.
geometry
.
faces
,
e
=
this
.
object
.
matrixWorld
,
f
=
0
,
g
=
d
.
length
;
f
<
g
;
f
++
){
var
h
=
d
[
f
];
b
.
copy
(
h
.
normal
).
applyMatrix3
(
this
.
normalMatrix
).
normalize
().
multiplyScalar
(
this
.
size
);
var
k
=
2
*
f
;
a
[
k
].
copy
(
h
.
centroid
).
applyMatrix4
(
e
);
a
[
k
+
1
].
addVectors
(
a
[
k
],
b
)}
this
.
geometry
.
verticesNeedUpdate
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录