Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
63cfba0c
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,发现更多精彩内容 >>
提交
63cfba0c
编写于
3月 18, 2016
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples: Cleanup
上级
5d724d33
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
102 addition
and
117 deletion
+102
-117
examples/webgl_animation_skinning_morph.html
examples/webgl_animation_skinning_morph.html
+7
-10
examples/webgl_geometry_spline_editor.html
examples/webgl_geometry_spline_editor.html
+6
-6
examples/webgl_interactive_draggablecubes.html
examples/webgl_interactive_draggablecubes.html
+6
-6
examples/webgl_interactive_raycasting_points.html
examples/webgl_interactive_raycasting_points.html
+1
-1
examples/webgl_loader_md2_control.html
examples/webgl_loader_md2_control.html
+11
-8
examples/webgl_loader_ply.html
examples/webgl_loader_ply.html
+9
-10
examples/webgl_loader_stl.html
examples/webgl_loader_stl.html
+9
-10
examples/webgl_loader_utf8.html
examples/webgl_loader_utf8.html
+8
-9
examples/webgl_materials_bumpmap.html
examples/webgl_materials_bumpmap.html
+6
-7
examples/webgl_materials_bumpmap_skin.html
examples/webgl_materials_bumpmap_skin.html
+9
-10
examples/webgl_materials_cubemap_dynamic.html
examples/webgl_materials_cubemap_dynamic.html
+6
-11
examples/webgl_shadowmap.html
examples/webgl_shadowmap.html
+6
-9
examples/webgl_shadowmap_performance.html
examples/webgl_shadowmap_performance.html
+6
-8
examples/webgl_shadowmap_viewer.html
examples/webgl_shadowmap_viewer.html
+12
-12
未找到文件。
examples/webgl_animation_skinning_morph.html
浏览文件 @
63cfba0c
...
...
@@ -121,18 +121,17 @@
light
.
castShadow
=
true
;
light
.
shadow
MapW
idth
=
1024
;
light
.
shadow
MapHeight
=
1024
;
light
.
shadow
.
mapSize
.
w
idth
=
1024
;
light
.
shadow
.
mapSize
.
heigth
=
1024
;
var
d
=
390
;
light
.
shadow
CameraL
eft
=
-
d
;
light
.
shadow
CameraR
ight
=
d
;
light
.
shadow
CameraT
op
=
d
*
1.5
;
light
.
shadow
CameraB
ottom
=
-
d
;
light
.
shadow
.
camera
.
l
eft
=
-
d
;
light
.
shadow
.
camera
.
r
ight
=
d
;
light
.
shadow
.
camera
.
t
op
=
d
*
1.5
;
light
.
shadow
.
camera
.
b
ottom
=
-
d
;
light
.
shadowCameraFar
=
3500
;
//light.shadowCameraVisible = true;
light
.
shadow
.
camera
.
far
=
3500
;
// RENDERER
...
...
@@ -160,8 +159,6 @@
var
loader
=
new
THREE
.
JSONLoader
();
loader
.
load
(
"
models/skinned/knight.js
"
,
function
(
geometry
,
materials
)
{
console
.
log
(
'
materials
'
,
materials
);
createScene
(
geometry
,
materials
,
0
,
FLOOR
,
-
300
,
60
)
// GUI
...
...
examples/webgl_geometry_spline_editor.html
浏览文件 @
63cfba0c
...
...
@@ -70,12 +70,12 @@
var
light
=
new
THREE
.
SpotLight
(
0xffffff
,
1.5
);
light
.
position
.
set
(
0
,
1500
,
200
);
light
.
castShadow
=
true
;
light
.
shadow
CameraN
ear
=
200
;
light
.
shadow
CameraF
ar
=
2000
;
light
.
shadow
CameraF
ov
=
70
;
light
.
shadow
B
ias
=
-
0.000222
;
light
.
shadow
MapW
idth
=
1024
;
light
.
shadow
MapH
eight
=
1024
;
light
.
shadow
.
camera
.
n
ear
=
200
;
light
.
shadow
.
camera
.
f
ar
=
2000
;
light
.
shadow
.
camera
.
f
ov
=
70
;
light
.
shadow
.
b
ias
=
-
0.000222
;
light
.
shadow
.
mapSize
.
w
idth
=
1024
;
light
.
shadow
.
mapSize
.
h
eight
=
1024
;
scene
.
add
(
light
);
spotlight
=
light
;
...
...
examples/webgl_interactive_draggablecubes.html
浏览文件 @
63cfba0c
...
...
@@ -60,14 +60,14 @@
light
.
position
.
set
(
0
,
500
,
2000
);
light
.
castShadow
=
true
;
light
.
shadow
CameraN
ear
=
200
;
light
.
shadow
CameraF
ar
=
camera
.
far
;
light
.
shadow
CameraF
ov
=
50
;
light
.
shadow
.
camera
.
n
ear
=
200
;
light
.
shadow
.
camera
.
f
ar
=
camera
.
far
;
light
.
shadow
.
camera
.
f
ov
=
50
;
light
.
shadow
B
ias
=
-
0.00022
;
light
.
shadow
.
b
ias
=
-
0.00022
;
light
.
shadow
MapW
idth
=
2048
;
light
.
shadow
MapH
eight
=
2048
;
light
.
shadow
.
mapSize
.
w
idth
=
2048
;
light
.
shadow
.
mapSize
.
h
eight
=
2048
;
scene
.
add
(
light
);
...
...
examples/webgl_interactive_raycasting_points.html
浏览文件 @
63cfba0c
...
...
@@ -160,7 +160,7 @@
}
geometry
.
setIndex
(
new
THREE
.
BufferAttribute
(
indices
,
1
)
);
geometry
.
add
DrawCall
(
0
,
indices
.
length
);
geometry
.
add
Group
(
0
,
indices
.
length
);
var
material
=
new
THREE
.
PointsMaterial
(
{
size
:
pointSize
,
vertexColors
:
THREE
.
VertexColors
}
);
var
pointcloud
=
new
THREE
.
Points
(
geometry
,
material
);
...
...
examples/webgl_loader_md2_control.html
浏览文件 @
63cfba0c
...
...
@@ -105,14 +105,17 @@
light
.
position
.
set
(
200
,
450
,
500
);
light
.
castShadow
=
true
;
light
.
shadowMapWidth
=
1024
;
light
.
shadowMapHeight
=
512
;
light
.
shadowCameraNear
=
100
;
light
.
shadowCameraFar
=
1200
;
light
.
shadowCameraTop
=
350
;
light
.
shadowCameraBottom
=
-
350
;
light
.
shadowCameraRight
=
1000
;
light
.
shadowCameraLeft
=
-
1000
;
light
.
shadow
.
mapSize
.
width
=
1024
;
light
.
shadow
.
mapSize
.
height
=
512
;
light
.
shadow
.
camera
.
near
=
100
;
light
.
shadow
.
camera
.
far
=
1200
;
light
.
shadow
.
camera
.
left
=
-
1000
;
light
.
shadow
.
camera
.
right
=
1000
;
light
.
shadow
.
camera
.
top
=
350
;
light
.
shadow
.
camera
.
bottom
=
-
350
;
scene
.
add
(
light
);
// scene.add( new THREE.CameraHelper( light.shadow.camera ) );
...
...
examples/webgl_loader_ply.html
浏览文件 @
63cfba0c
...
...
@@ -150,21 +150,20 @@
scene
.
add
(
directionalLight
);
directionalLight
.
castShadow
=
true
;
// directionalLight.shadowCameraVisible = true;
var
d
=
1
;
directionalLight
.
shadow
CameraL
eft
=
-
d
;
directionalLight
.
shadow
CameraR
ight
=
d
;
directionalLight
.
shadow
CameraT
op
=
d
;
directionalLight
.
shadow
CameraB
ottom
=
-
d
;
directionalLight
.
shadow
.
camera
.
l
eft
=
-
d
;
directionalLight
.
shadow
.
camera
.
r
ight
=
d
;
directionalLight
.
shadow
.
camera
.
t
op
=
d
;
directionalLight
.
shadow
.
camera
.
b
ottom
=
-
d
;
directionalLight
.
shadow
CameraN
ear
=
1
;
directionalLight
.
shadow
CameraF
ar
=
4
;
directionalLight
.
shadow
.
camera
.
n
ear
=
1
;
directionalLight
.
shadow
.
camera
.
f
ar
=
4
;
directionalLight
.
shadow
MapW
idth
=
1024
;
directionalLight
.
shadow
MapH
eight
=
1024
;
directionalLight
.
shadow
.
mapSize
.
w
idth
=
1024
;
directionalLight
.
shadow
.
mapSize
.
h
eight
=
1024
;
directionalLight
.
shadow
B
ias
=
-
0.005
;
directionalLight
.
shadow
.
b
ias
=
-
0.005
;
}
...
...
examples/webgl_loader_stl.html
浏览文件 @
63cfba0c
...
...
@@ -204,21 +204,20 @@
scene
.
add
(
directionalLight
);
directionalLight
.
castShadow
=
true
;
// directionalLight.shadowCameraVisible = true;
var
d
=
1
;
directionalLight
.
shadow
CameraL
eft
=
-
d
;
directionalLight
.
shadow
CameraR
ight
=
d
;
directionalLight
.
shadow
CameraT
op
=
d
;
directionalLight
.
shadow
CameraB
ottom
=
-
d
;
directionalLight
.
shadow
.
camera
.
l
eft
=
-
d
;
directionalLight
.
shadow
.
camera
.
r
ight
=
d
;
directionalLight
.
shadow
.
camera
.
t
op
=
d
;
directionalLight
.
shadow
.
camera
.
b
ottom
=
-
d
;
directionalLight
.
shadow
CameraN
ear
=
1
;
directionalLight
.
shadow
CameraF
ar
=
4
;
directionalLight
.
shadow
.
camera
.
n
ear
=
1
;
directionalLight
.
shadow
.
camera
.
f
ar
=
4
;
directionalLight
.
shadow
MapW
idth
=
1024
;
directionalLight
.
shadow
MapH
eight
=
1024
;
directionalLight
.
shadow
.
mapSize
.
w
idth
=
1024
;
directionalLight
.
shadow
.
mapSize
.
h
eight
=
1024
;
directionalLight
.
shadow
B
ias
=
-
0.005
;
directionalLight
.
shadow
.
b
ias
=
-
0.005
;
}
...
...
examples/webgl_loader_utf8.html
浏览文件 @
63cfba0c
...
...
@@ -96,20 +96,19 @@
scene
.
add
(
directionalLight
);
directionalLight
.
castShadow
=
true
;
// directionalLight.shadowCameraVisible = true;
directionalLight
.
shadow
MapW
idth
=
2048
;
directionalLight
.
shadow
MaH
eight
=
2048
;
directionalLight
.
shadow
.
mapSize
.
w
idth
=
2048
;
directionalLight
.
shadow
.
mapSize
.
h
eight
=
2048
;
var
d
=
150
;
directionalLight
.
shadow
CameraL
eft
=
-
d
*
1.2
;
directionalLight
.
shadow
CameraR
ight
=
d
*
1.2
;
directionalLight
.
shadow
CameraT
op
=
d
;
directionalLight
.
shadow
CameraB
ottom
=
-
d
;
directionalLight
.
shadow
.
camera
.
l
eft
=
-
d
*
1.2
;
directionalLight
.
shadow
.
camera
.
r
ight
=
d
*
1.2
;
directionalLight
.
shadow
.
camera
.
t
op
=
d
;
directionalLight
.
shadow
.
camera
.
b
ottom
=
-
d
;
directionalLight
.
shadow
CameraN
ear
=
200
;
directionalLight
.
shadow
CameraF
ar
=
500
;
directionalLight
.
shadow
.
camera
.
n
ear
=
200
;
directionalLight
.
shadow
.
camera
.
f
ar
=
500
;
// RENDERER
...
...
examples/webgl_materials_bumpmap.html
浏览文件 @
63cfba0c
...
...
@@ -101,17 +101,16 @@
scene
.
add
(
spotLight
);
spotLight
.
castShadow
=
true
;
// spotLight.shadowCameraVisible = true;
spotLight
.
shadow
MapW
idth
=
2048
;
spotLight
.
shadow
MapH
eight
=
2048
;
spotLight
.
shadow
.
mapSize
.
w
idth
=
2048
;
spotLight
.
shadow
.
mapSize
.
h
eight
=
2048
;
spotLight
.
shadow
CameraN
ear
=
200
;
spotLight
.
shadow
CameraF
ar
=
1500
;
spotLight
.
shadow
.
camera
.
n
ear
=
200
;
spotLight
.
shadow
.
camera
.
f
ar
=
1500
;
spotLight
.
shadow
CameraF
ov
=
40
;
spotLight
.
shadow
.
camera
.
f
ov
=
40
;
spotLight
.
shadow
B
ias
=
-
0.005
;
spotLight
.
shadow
.
b
ias
=
-
0.005
;
//
...
...
examples/webgl_materials_bumpmap_skin.html
浏览文件 @
63cfba0c
...
...
@@ -111,20 +111,19 @@
directionalLight
.
position
.
set
(
500
,
0
,
500
);
directionalLight
.
castShadow
=
true
;
//directionalLight.shadowCameraVisible = true;
directionalLight
.
shadow
MapW
idth
=
2048
;
directionalLight
.
shadow
MapH
eight
=
2048
;
directionalLight
.
shadow
.
mapSize
.
w
idth
=
2048
;
directionalLight
.
shadow
.
mapSize
.
h
eight
=
2048
;
directionalLight
.
shadow
CameraN
ear
=
200
;
directionalLight
.
shadow
CameraF
ar
=
1500
;
directionalLight
.
shadow
.
camera
.
n
ear
=
200
;
directionalLight
.
shadow
.
camera
.
f
ar
=
1500
;
directionalLight
.
shadow
CameraL
eft
=
-
500
;
directionalLight
.
shadow
CameraR
ight
=
500
;
directionalLight
.
shadow
CameraT
op
=
500
;
directionalLight
.
shadow
CameraB
ottom
=
-
500
;
directionalLight
.
shadow
.
camera
.
l
eft
=
-
500
;
directionalLight
.
shadow
.
camera
.
r
ight
=
500
;
directionalLight
.
shadow
.
camera
.
t
op
=
500
;
directionalLight
.
shadow
.
camera
.
b
ottom
=
-
500
;
directionalLight
.
shadow
B
ias
=
-
0.005
;
directionalLight
.
shadow
.
b
ias
=
-
0.005
;
scene
.
add
(
directionalLight
);
...
...
examples/webgl_materials_cubemap_dynamic.html
浏览文件 @
63cfba0c
...
...
@@ -169,21 +169,16 @@
spotLight
.
target
.
position
.
set
(
0
,
0
,
0
);
spotLight
.
castShadow
=
true
;
spotLight
.
shadow
CameraN
ear
=
100
;
spotLight
.
shadow
CameraF
ar
=
camera
.
far
;
spotLight
.
shadow
CameraF
ov
=
50
;
spotLight
.
shadow
.
camera
.
n
ear
=
100
;
spotLight
.
shadow
.
camera
.
f
ar
=
camera
.
far
;
spotLight
.
shadow
.
camera
.
f
ov
=
50
;
spotLight
.
shadow
B
ias
=
-
0.00125
;
spotLight
.
shadow
MapW
idth
=
SHADOW_MAP_WIDTH
;
spotLight
.
shadow
MapH
eight
=
SHADOW_MAP_HEIGHT
;
spotLight
.
shadow
.
b
ias
=
-
0.00125
;
spotLight
.
shadow
.
mapSize
.
w
idth
=
SHADOW_MAP_WIDTH
;
spotLight
.
shadow
.
mapSize
.
h
eight
=
SHADOW_MAP_HEIGHT
;
scene
.
add
(
spotLight
);
directionalLight2
=
new
THREE
.
PointLight
(
0xff9900
,
0.25
);
directionalLight2
.
position
.
set
(
0.5
,
-
1
,
0.5
);
//directionalLight2.position.normalize();
//scene.add( directionalLight2 );
// RENDERER
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
false
}
);
...
...
examples/webgl_shadowmap.html
浏览文件 @
63cfba0c
...
...
@@ -111,16 +111,13 @@
light
.
castShadow
=
true
;
light
.
shadowCameraNear
=
1200
;
light
.
shadowCameraFar
=
2500
;
light
.
shadowCameraFov
=
50
;
light
.
shadow
.
camera
.
near
=
1200
;
light
.
shadow
.
camera
.
far
=
2500
;
light
.
shadow
.
camera
.
fov
=
50
;
light
.
shadow
.
bias
=
0.0001
;
//light.shadowCameraVisible = true;
light
.
shadowBias
=
0.0001
;
light
.
shadowMapWidth
=
SHADOW_MAP_WIDTH
;
light
.
shadowMapHeight
=
SHADOW_MAP_HEIGHT
;
light
.
shadow
.
mapSize
.
width
=
SHADOW_MAP_WIDTH
;
light
.
shadow
.
mapSize
.
height
=
SHADOW_MAP_HEIGHT
;
scene
.
add
(
light
);
...
...
examples/webgl_shadowmap_performance.html
浏览文件 @
63cfba0c
...
...
@@ -106,16 +106,14 @@
light
.
castShadow
=
true
;
light
.
shadow
CameraN
ear
=
700
;
light
.
shadow
CameraF
ar
=
camera
.
far
;
light
.
shadow
CameraF
ov
=
50
;
light
.
shadow
.
camera
.
n
ear
=
700
;
light
.
shadow
.
camera
.
f
ar
=
camera
.
far
;
light
.
shadow
.
camera
.
f
ov
=
50
;
//light.shadowCameraVisible = true
;
light
.
shadow
.
bias
=
0.0001
;
light
.
shadowBias
=
0.0001
;
light
.
shadowMapWidth
=
SHADOW_MAP_WIDTH
;
light
.
shadowMapHeight
=
SHADOW_MAP_HEIGHT
;
light
.
shadow
.
mapSize
.
width
=
SHADOW_MAP_WIDTH
;
light
.
shadow
.
mapSize
.
height
=
SHADOW_MAP_HEIGHT
;
scene
.
add
(
light
);
...
...
examples/webgl_shadowmap_viewer.html
浏览文件 @
63cfba0c
...
...
@@ -76,10 +76,10 @@
spotLight
.
penumbra
=
0.3
;
spotLight
.
position
.
set
(
10
,
10
,
5
);
spotLight
.
castShadow
=
true
;
spotLight
.
shadow
CameraN
ear
=
8
;
spotLight
.
shadow
CameraF
ar
=
30
;
spotLight
.
shadow
MapW
idth
=
1024
;
spotLight
.
shadow
MapH
eight
=
1024
;
spotLight
.
shadow
.
camera
.
n
ear
=
8
;
spotLight
.
shadow
.
camera
.
f
ar
=
30
;
spotLight
.
shadow
.
mapSize
.
w
idth
=
1024
;
spotLight
.
shadow
.
mapSize
.
h
eight
=
1024
;
scene
.
add
(
spotLight
);
scene
.
add
(
new
THREE
.
CameraHelper
(
spotLight
.
shadow
.
camera
)
);
...
...
@@ -88,14 +88,14 @@
dirLight
.
name
=
'
Dir. Light
'
;
dirLight
.
position
.
set
(
0
,
10
,
0
);
dirLight
.
castShadow
=
true
;
dirLight
.
shadow
CameraN
ear
=
1
;
dirLight
.
shadow
CameraF
ar
=
10
;
dirLight
.
shadow
CameraR
ight
=
15
;
dirLight
.
shadow
CameraL
eft
=
-
15
;
dirLight
.
shadow
CameraT
op
=
15
;
dirLight
.
shadow
CameraB
ottom
=
-
15
;
dirLight
.
shadow
MapW
idth
=
1024
;
dirLight
.
shadow
MapH
eight
=
1024
;
dirLight
.
shadow
.
camera
.
n
ear
=
1
;
dirLight
.
shadow
.
camera
.
f
ar
=
10
;
dirLight
.
shadow
.
camera
.
r
ight
=
15
;
dirLight
.
shadow
.
camera
.
l
eft
=
-
15
;
dirLight
.
shadow
.
camera
.
t
op
=
15
;
dirLight
.
shadow
.
camera
.
b
ottom
=
-
15
;
dirLight
.
shadow
.
mapSize
.
w
idth
=
1024
;
dirLight
.
shadow
.
mapSize
.
h
eight
=
1024
;
scene
.
add
(
dirLight
);
scene
.
add
(
new
THREE
.
CameraHelper
(
dirLight
.
shadow
.
camera
)
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录