Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
d86527f9
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,发现更多精彩内容 >>
提交
d86527f9
编写于
8月 14, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improved some examples.
上级
bc05f238
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
9 deletion
+36
-9
examples/css3d_periodictable.html
examples/css3d_periodictable.html
+1
-1
examples/webgl_shaders_ocean.html
examples/webgl_shaders_ocean.html
+32
-7
examples/webgl_shadowmap.html
examples/webgl_shadowmap.html
+1
-0
examples/webgl_shadowmap_performance.html
examples/webgl_shadowmap_performance.html
+2
-1
未找到文件。
examples/css3d_periodictable.html
浏览文件 @
d86527f9
...
...
@@ -397,7 +397,7 @@
},
false
);
transform
(
targets
.
table
,
5
000
);
transform
(
targets
.
table
,
2
000
);
//
...
...
examples/webgl_shaders_ocean.html
浏览文件 @
d86527f9
...
...
@@ -51,6 +51,7 @@
var
container
,
stats
;
var
camera
,
scene
,
renderer
;
var
sphere
;
var
parameters
=
{
width
:
2000
,
...
...
@@ -77,20 +78,20 @@
container
.
appendChild
(
renderer
.
domElement
);
scene
=
new
THREE
.
Scene
();
camera
=
new
THREE
.
PerspectiveCamera
(
55
,
window
.
innerWidth
/
window
.
innerHeight
,
0.5
,
3000000
);
camera
.
position
.
set
(
0
,
Math
.
max
(
parameters
.
width
*
1.5
,
parameters
.
height
)
/
8
,
parameters
.
height
);
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
camera
=
new
THREE
.
PerspectiveCamera
(
55
,
window
.
innerWidth
/
window
.
innerHeight
,
0.5
,
3000000
);
camera
.
position
.
set
(
2000
,
750
,
2000
);
controls
=
new
THREE
.
OrbitControls
(
camera
,
renderer
.
domElement
);
controls
.
userPan
=
false
;
controls
.
userPanSpeed
=
0.0
;
controls
.
maxDistance
=
5000.0
;
controls
.
maxPolarAngle
=
Math
.
PI
*
0.495
;
controls
.
center
.
set
(
0
,
500
,
0
);
directionalLight
=
new
THREE
.
DirectionalLight
(
0xffff55
,
1
);
directionalLight
.
position
.
set
(
-
1
,
0.4
,
-
1
);
scene
.
add
(
directionalL
ight
);
var
light
=
new
THREE
.
HemisphereLight
(
0xffffbb
,
0x080820
,
1
);
light
.
position
.
set
(
-
1
,
1
,
-
1
);
scene
.
add
(
l
ight
);
waterNormals
=
new
THREE
.
ImageUtils
.
loadTexture
(
'
textures/waternormals.jpg
'
);
...
...
@@ -101,7 +102,7 @@
textureHeight
:
512
,
waterNormals
:
waterNormals
,
alpha
:
1.0
,
sunDirection
:
directionalLight
.
position
.
normalize
(),
sunDirection
:
light
.
position
.
clone
()
.
normalize
(),
sunColor
:
0xffffff
,
waterColor
:
0x001e0f
,
distortionScale
:
50.0
,
...
...
@@ -171,6 +172,24 @@
scene
.
add
(
skyBox
);
var
geometry
=
new
THREE
.
IcosahedronGeometry
(
400
,
4
);
for
(
var
i
=
0
,
j
=
geometry
.
faces
.
length
;
i
<
j
;
i
++
)
{
geometry
.
faces
[
i
].
color
.
setHex
(
Math
.
random
()
*
0xffffff
);
}
var
material
=
new
THREE
.
MeshPhongMaterial
(
{
vertexColors
:
THREE
.
FaceColors
,
shininess
:
100
,
envMap
:
cubeMap
}
);
sphere
=
new
THREE
.
Mesh
(
geometry
,
material
);
scene
.
add
(
sphere
);
}
//
...
...
@@ -184,6 +203,12 @@
function
render
()
{
var
time
=
performance
.
now
()
*
0.001
;
sphere
.
position
.
y
=
Math
.
sin
(
time
)
*
500
+
250
;
sphere
.
rotation
.
x
=
time
*
0.5
;
sphere
.
rotation
.
z
=
time
*
0.51
;
water
.
material
.
uniforms
.
time
.
value
+=
1.0
/
60.0
;
controls
.
update
();
water
.
render
();
...
...
examples/webgl_shadowmap.html
浏览文件 @
d86527f9
...
...
@@ -95,6 +95,7 @@
controls
.
verticalMax
=
2.0
;
controls
.
lon
=
250
;
controls
.
lat
=
30
;
// SCENE
...
...
examples/webgl_shadowmap_performance.html
浏览文件 @
d86527f9
...
...
@@ -89,7 +89,8 @@
controls
.
verticalMin
=
1.5
;
controls
.
verticalMax
=
2.0
;
controls
.
lon
=
-
110
;
controls
.
lon
=
250
;
controls
.
lat
=
30
;
// SCENE
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录