Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
44422ffd
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,发现更多精彩内容 >>
提交
44422ffd
编写于
11月 18, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples fixes.
上级
0f966c12
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
18 addition
and
28 deletion
+18
-28
examples/canvas_lines_sphere.html
examples/canvas_lines_sphere.html
+2
-1
examples/canvas_particles_random.html
examples/canvas_particles_random.html
+2
-2
examples/canvas_particles_shapes.html
examples/canvas_particles_shapes.html
+2
-15
examples/canvas_particles_waves.html
examples/canvas_particles_waves.html
+5
-3
examples/index.html
examples/index.html
+1
-2
examples/webgl_geometry_extrude_shapes.html
examples/webgl_geometry_extrude_shapes.html
+1
-1
examples/webgl_geometry_extrude_splines.html
examples/webgl_geometry_extrude_splines.html
+3
-3
examples/webgl_interactive_voxelpainter.html
examples/webgl_interactive_voxelpainter.html
+1
-1
examples/webgl_marchingcubes.html
examples/webgl_marchingcubes.html
+0
-0
examples/webgl_materials_grass.html
examples/webgl_materials_grass.html
+1
-0
未找到文件。
examples/canvas_lines_sphere.html
浏览文件 @
44422ffd
...
...
@@ -65,7 +65,7 @@
program
:
function
(
context
)
{
context
.
beginPath
();
context
.
arc
(
0
,
0
,
1
,
0
,
PI2
,
true
);
context
.
arc
(
0
,
0
,
0.5
,
0
,
PI2
,
true
);
context
.
fill
();
}
...
...
@@ -80,6 +80,7 @@
particle
.
position
.
z
=
Math
.
random
()
*
2
-
1
;
particle
.
position
.
normalize
();
particle
.
position
.
multiplyScalar
(
Math
.
random
()
*
10
+
450
);
particle
.
scale
.
multiplyScalar
(
2
);
scene
.
add
(
particle
);
}
...
...
examples/canvas_particles_random.html
浏览文件 @
44422ffd
...
...
@@ -48,7 +48,7 @@
var
program
=
function
(
context
)
{
context
.
beginPath
();
context
.
arc
(
0
,
0
,
1
,
0
,
PI2
,
true
);
context
.
arc
(
0
,
0
,
0.5
,
0
,
PI2
,
true
);
context
.
fill
();
}
...
...
@@ -67,7 +67,7 @@
particle
.
position
.
x
=
Math
.
random
()
*
2000
-
1000
;
particle
.
position
.
y
=
Math
.
random
()
*
2000
-
1000
;
particle
.
position
.
z
=
Math
.
random
()
*
2000
-
1000
;
particle
.
scale
.
x
=
particle
.
scale
.
y
=
Math
.
random
()
*
10
+
5
;
particle
.
scale
.
x
=
particle
.
scale
.
y
=
Math
.
random
()
*
20
+
10
;
group
.
add
(
particle
);
}
...
...
examples/canvas_particles_shapes.html
浏览文件 @
44422ffd
...
...
@@ -132,25 +132,13 @@
heartShape
.
bezierCurveTo
(
x
+
80
,
y
+
35
,
x
+
80
,
y
,
x
+
50
,
y
);
heartShape
.
bezierCurveTo
(
x
+
35
,
y
,
x
+
25
,
y
+
25
,
x
+
25
,
y
+
25
);
var
circleLines
=
function
(
context
)
{
context
.
lineWidth
=
0.05
;
context
.
beginPath
();
context
.
arc
(
0
,
0
,
1
,
0
,
Math
.
PI
*
2
,
true
);
context
.
stroke
();
context
.
globalAlpha
=
0.2
;
context
.
fill
();
}
var
hue
=
0
;
var
hearts
=
function
(
context
)
{
context
.
globalAlpha
=
0.5
;
var
x
=
0
,
y
=
0
;
context
.
scale
(
0.
1
,
-
0.1
);
// Scale so canvas render can redraw within bounds
context
.
scale
(
0.
05
,
-
0.05
);
// Scale so canvas render can redraw within bounds
context
.
beginPath
();
// From http://blog.burlock.org/html5/130-paths
context
.
bezierCurveTo
(
x
+
2.5
,
y
+
2.5
,
x
+
2.0
,
y
,
x
,
y
);
...
...
@@ -167,7 +155,6 @@
var
setTargetParticle
=
function
()
{
//hearts circleLines
var
material
=
new
THREE
.
SpriteCanvasMaterial
(
{
program
:
hearts
,
blending
:
THREE
.
AdditiveBlending
...
...
@@ -179,7 +166,7 @@
particle
=
new
THREE
.
Sprite
(
material
);
particle
.
scale
.
x
=
particle
.
scale
.
y
=
Math
.
random
()
*
20
+
2
0
;
particle
.
scale
.
x
=
particle
.
scale
.
y
=
Math
.
random
()
*
40
+
4
0
;
particleCloud
.
add
(
particle
);
return
particle
;
...
...
examples/canvas_particles_waves.html
浏览文件 @
44422ffd
...
...
@@ -57,7 +57,7 @@
program
:
function
(
context
)
{
context
.
beginPath
();
context
.
arc
(
0
,
0
,
1
,
0
,
PI2
,
true
);
context
.
arc
(
0
,
0
,
0.5
,
0
,
PI2
,
true
);
context
.
fill
();
}
...
...
@@ -169,8 +169,10 @@
for
(
var
iy
=
0
;
iy
<
AMOUNTY
;
iy
++
)
{
particle
=
particles
[
i
++
];
particle
.
position
.
y
=
(
Math
.
sin
(
(
ix
+
count
)
*
0.3
)
*
50
)
+
(
Math
.
sin
(
(
iy
+
count
)
*
0.5
)
*
50
);
particle
.
scale
.
x
=
particle
.
scale
.
y
=
(
Math
.
sin
(
(
ix
+
count
)
*
0.3
)
+
1
)
*
2
+
(
Math
.
sin
(
(
iy
+
count
)
*
0.5
)
+
1
)
*
2
;
particle
.
position
.
y
=
(
Math
.
sin
(
(
ix
+
count
)
*
0.3
)
*
50
)
+
(
Math
.
sin
(
(
iy
+
count
)
*
0.5
)
*
50
);
particle
.
scale
.
x
=
particle
.
scale
.
y
=
(
Math
.
sin
(
(
ix
+
count
)
*
0.3
)
+
1
)
*
4
+
(
Math
.
sin
(
(
iy
+
count
)
*
0.5
)
+
1
)
*
4
;
}
...
...
examples/index.html
浏览文件 @
44422ffd
...
...
@@ -134,7 +134,6 @@
"
webgl_geometry_large_mesh
"
,
"
webgl_geometry_minecraft
"
,
"
webgl_geometry_minecraft_ao
"
,
"
webgl_geometry_minecraft_oculusrift
"
,
"
webgl_geometry_normals
"
,
"
webgl_geometry_nurbs
"
,
"
webgl_geometry_shapes
"
,
...
...
@@ -178,7 +177,7 @@
"
webgl_loader_vrml
"
,
"
webgl_loader_vtk
"
,
"
webgl_lod
"
,
"
webgl_marching
_
cubes
"
,
"
webgl_marchingcubes
"
,
"
webgl_materials
"
,
"
webgl_materials2
"
,
"
webgl_materials_blending
"
,
...
...
examples/webgl_geometry_extrude_shapes.html
浏览文件 @
44422ffd
...
...
@@ -72,7 +72,7 @@
// 3d shape
var
mesh
=
THREE
.
SceneUtils
.
createMultiMaterialObject
(
geometry
,
[
new
THREE
.
MeshLambertMaterial
(
{
color
:
color
,
opacity
:
0.2
,
transparent
:
true
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
opacity
:
0.3
}
)
]
);
var
mesh
=
THREE
.
SceneUtils
.
createMultiMaterialObject
(
geometry
,
[
new
THREE
.
MeshLambertMaterial
(
{
color
:
color
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
wireframe
:
true
,
opacity
:
0.3
,
transparent
:
true
}
)
]
);
mesh
.
position
.
set
(
x
,
y
,
z
-
75
);
// mesh.rotation.set( rx, ry, rz );
...
...
examples/webgl_geometry_extrude_splines.html
浏览文件 @
44422ffd
...
...
@@ -139,13 +139,13 @@
tubeMesh
=
THREE
.
SceneUtils
.
createMultiMaterialObject
(
geometry
,
[
new
THREE
.
MeshLambertMaterial
({
color
:
color
,
opacity
:
geometry
.
debug
?
0.2
:
0.8
,
transparent
:
true
}),
new
THREE
.
MeshBasicMaterial
({
color
:
0x000000
,
opacity
:
0.5
,
wireframe
:
true
opacity
:
0.3
,
wireframe
:
true
,
transparent
:
true
})]);
if
(
geometry
.
debug
)
tubeMesh
.
add
(
geometry
.
debug
);
...
...
examples/webgl_interactive_voxelpainter.html
浏览文件 @
44422ffd
...
...
@@ -92,7 +92,7 @@
}
var
material
=
new
THREE
.
LineBasicMaterial
(
{
color
:
0x000000
,
opacity
:
0.2
}
);
var
material
=
new
THREE
.
LineBasicMaterial
(
{
color
:
0x000000
,
opacity
:
0.2
,
transparent
:
true
}
);
var
line
=
new
THREE
.
Line
(
geometry
,
material
);
line
.
type
=
THREE
.
LinePieces
;
...
...
examples/webgl_marching
_
cubes.html
→
examples/webgl_marchingcubes.html
浏览文件 @
44422ffd
文件已移动
examples/webgl_materials_grass.html
浏览文件 @
44422ffd
...
...
@@ -57,6 +57,7 @@
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
.
sortObjects
=
false
;
renderer
.
setClearColor
(
0x003300
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
document
.
body
.
appendChild
(
renderer
.
domElement
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录