Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
ff952e5e
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,发现更多精彩内容 >>
提交
ff952e5e
编写于
3月 31, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Made half-float default mode in ocean2 and added to list.
上级
5b4958c0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
10 deletion
+11
-10
examples/index.html
examples/index.html
+1
-0
examples/webgl_shaders_ocean2.html
examples/webgl_shaders_ocean2.html
+10
-10
未找到文件。
examples/index.html
浏览文件 @
ff952e5e
...
...
@@ -351,6 +351,7 @@
"
webgl_shader_lava
"
,
"
webgl_shader2
"
,
"
webgl_shaders_ocean
"
,
"
webgl_shaders_ocean2
"
,
"
webgl_shading_physical
"
,
"
webgl_shaders_sky
"
,
"
webgl_shaders_tonemapping
"
,
...
...
examples/webgl_shaders_ocean2.html
浏览文件 @
ff952e5e
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
/>
<style
type=
"text/css"
>
body
{
margin
:
0px
;
...
...
@@ -23,7 +23,7 @@
font-weight
:
bold
;
}
#stats
{
position
:
absolute
;
top
:
0
;
left
:
0
}
</style>
</style>
</head>
<body>
<div
id=
"info"
>
...
...
@@ -32,12 +32,12 @@
change type to
<span
id=
"change-type"
></span>
</div>
<script
src=
"../build/three.min.js"
></script>
<script
src=
"../build/three.min.js"
></script>
<script
src=
"js/libs/stats.min.js"
></script>
<script
src=
"js/libs/dat.gui.min.js"
></script>
<script
src=
"js/controls/OrbitControls.js"
></script>
<script
src=
"js/shaders/OceanShaders.js"
></script>
<script
src=
"js/Ocean.js"
></script>
<script
src=
"js/Ocean.js"
></script>
<script>
var
stats
;
...
...
@@ -45,7 +45,7 @@
var
types
=
{
'
float
'
:
'
half-float
'
,
'
half-float
'
:
'
float
'
};
var
hash
=
document
.
location
.
hash
.
substr
(
1
);
if
(
!
(
hash
in
types
))
hash
=
'
float
'
;
if
(
!
(
hash
in
types
))
hash
=
'
half-
float
'
;
document
.
getElementById
(
'
type-status
'
).
innerHTML
=
hash
;
document
.
getElementById
(
'
change-type
'
).
innerHTML
=
...
...
@@ -133,7 +133,7 @@
this
.
ms_Camera
.
position
.
set
(
450
,
350
,
450
);
this
.
ms_Camera
.
lookAt
(
new
THREE
.
Vector3
());
// Initialize Orbit control
// Initialize Orbit control
this
.
ms_Controls
=
new
THREE
.
OrbitControls
(
this
.
ms_Camera
,
this
.
ms_Renderer
.
domElement
);
this
.
ms_Controls
.
userPan
=
false
;
this
.
ms_Controls
.
userPanSpeed
=
0.0
;
...
...
@@ -141,9 +141,9 @@
this
.
ms_Controls
.
maxDistance
=
2000.0
;
this
.
ms_Controls
.
minPolarAngle
=
0
;
this
.
ms_Controls
.
maxPolarAngle
=
Math
.
PI
*
0.495
;
var
gsize
=
512
;
var
res
=
1024
;
var
gsize
=
512
;
var
res
=
1024
;
var
gres
=
res
/
2
;
var
origx
=
-
gsize
/
2
;
var
origz
=
-
gsize
/
2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录