Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
91ad5314
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,发现更多精彩内容 >>
提交
91ad5314
编写于
5月 05, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleaned up example.
上级
a1928a83
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
45 deletion
+19
-45
examples/webgl_shaders_sky.html
examples/webgl_shaders_sky.html
+1
-1
examples/webgl_shaders_vector.html
examples/webgl_shaders_vector.html
+18
-44
未找到文件。
examples/webgl_shaders_sky.html
浏览文件 @
91ad5314
...
...
@@ -36,7 +36,7 @@
</head>
<body>
<div
id=
"info"
><a
href=
"http://threejs.org"
target=
"_blank"
>
three.js
</a>
- webgl sky +
sun shader
<div
id=
"info"
><a
href=
"http://threejs.org"
target=
"_blank"
>
three.js
</a>
webgl - sky +
sun shader
<br/><a
href=
"https://plus.google.com/117614030945250277079/posts/MYkgKdvLhNj"
>
More info
</a>
by
<a
href=
"http://twitter.com/blurspline"
>
@blurspline
</a>
...
...
examples/webgl_shaders_vector.html
浏览文件 @
91ad5314
...
...
@@ -11,10 +11,19 @@
margin
:
0px
;
overflow
:
hidden
;
}
#info
{
position
:
absolute
;
top
:
10px
;
width
:
100%
;
text-align
:
center
;
}
</style>
</head>
<body>
<div
id=
"info"
>
<a
href=
"http://threejs.org"
target=
"_blank"
>
three.js
</a>
webgl - Resolution-Independent Vector Fonts.
<a
href=
"https://github.com/mrdoob/three.js/issues/4746"
>
info
</a>
.
</div>
<script
src=
"../build/three.min.js"
></script>
<script
src=
"./js/controls/OrbitControls.js"
></script>
...
...
@@ -65,21 +74,12 @@
<script>
var
container
,
stats
;
var
stats
;
var
camera
,
scene
,
renderer
,
controls
;
var
group
,
text
;
var
targetRotation
=
0
;
var
targetRotationOnMouseDown
=
0
;
var
mouseX
=
0
;
var
mouseXOnMouseDown
=
0
;
var
windowHalfX
=
window
.
innerWidth
/
2
;
var
windowHalfY
=
window
.
innerHeight
/
2
;
var
t
=
false
;
function
toggle
()
{
...
...
@@ -104,25 +104,13 @@
function
init
()
{
container
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
container
);
var
info
=
document
.
createElement
(
'
div
'
);
info
.
style
.
position
=
'
absolute
'
;
info
.
style
.
top
=
'
10px
'
;
info
.
style
.
width
=
'
100%
'
;
info
.
style
.
textAlign
=
'
center
'
;
info
.
innerHTML
=
'
Resolution-Independent Vector Fonts<br/><a href="https://github.com/mrdoob/three.js/issues/4746">rendered with three.js and WebGL </a>
'
;
container
.
appendChild
(
info
);
camera
=
new
THREE
.
PerspectiveCamera
(
50
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
1000
);
camera
.
position
.
set
(
0
,
150
,
500
);
camera
.
position
.
set
(
0
,
100
,
500
);
controls
=
new
THREE
.
OrbitControls
(
camera
);
controls
.
center
.
set
(
0
,
100
,
0
);
scene
=
new
THREE
.
Scene
();
var
theText
=
"
&
"
;
// i % & j b 8
...
...
@@ -235,7 +223,7 @@
for
(
var
i
=
0
;
i
<
subshape
.
holes
.
length
;
i
++
)
{
hole
=
subshape
.
holes
[
i
];
console
.
log
(
'
hole
'
,
hole
);
//
console.log('hole', hole);
process
=
processShape
(
hole
.
curves
,
true
);
...
...
@@ -340,20 +328,17 @@
//
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
);
renderer
.
setClearColor
(
0xf0f0f0
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
document
.
body
.
appendChild
(
renderer
.
domElement
);
stats
=
new
Stats
();
stats
.
domElement
.
style
.
position
=
'
absolute
'
;
stats
.
domElement
.
style
.
top
=
'
0px
'
;
container
.
appendChild
(
stats
.
domElement
);
document
.
addEventListener
(
'
mousedown
'
,
onDocumentMouseDown
,
false
);
document
.
body
.
appendChild
(
stats
.
domElement
);
//
document
.
addEventListener
(
'
mousedown
'
,
toggle
,
false
);
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
...
...
@@ -361,9 +346,6 @@
function
onWindowResize
()
{
windowHalfX
=
window
.
innerWidth
/
2
;
windowHalfY
=
window
.
innerHeight
/
2
;
camera
.
aspect
=
window
.
innerWidth
/
window
.
innerHeight
;
camera
.
updateProjectionMatrix
();
...
...
@@ -371,14 +353,6 @@
}
//
function
onDocumentMouseDown
(
event
)
{
toggle
();
}
//
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录