Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
59de7d60
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,发现更多精彩内容 >>
提交
59de7d60
编写于
1月 19, 2016
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor materials in examples
上级
8ab45291
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
26 addition
and
27 deletion
+26
-27
examples/canvas_ascii_effect.html
examples/canvas_ascii_effect.html
+1
-1
examples/canvas_camera_orthographic.html
examples/canvas_camera_orthographic.html
+1
-1
examples/canvas_camera_orthographic2.html
examples/canvas_camera_orthographic2.html
+1
-1
examples/canvas_lights_pointlights.html
examples/canvas_lights_pointlights.html
+1
-1
examples/canvas_performance.html
examples/canvas_performance.html
+1
-1
examples/misc_lights_test.html
examples/misc_lights_test.html
+7
-8
examples/misc_sound.html
examples/misc_sound.html
+3
-3
examples/webgl_geometry_colors.html
examples/webgl_geometry_colors.html
+1
-1
examples/webgl_interactive_cubes_gpu.html
examples/webgl_interactive_cubes_gpu.html
+1
-1
examples/webgl_lights_pointlights2.html
examples/webgl_lights_pointlights2.html
+1
-1
examples/webgl_marchingcubes.html
examples/webgl_marchingcubes.html
+1
-1
examples/webgl_modifier_subdivision.html
examples/webgl_modifier_subdivision.html
+1
-1
examples/webgl_multiple_canvases_circle.html
examples/webgl_multiple_canvases_circle.html
+1
-1
examples/webgl_multiple_canvases_complex.html
examples/webgl_multiple_canvases_complex.html
+1
-1
examples/webgl_multiple_canvases_grid.html
examples/webgl_multiple_canvases_grid.html
+1
-1
examples/webgl_multiple_renderers.html
examples/webgl_multiple_renderers.html
+1
-1
examples/webgl_multiple_views.html
examples/webgl_multiple_views.html
+1
-1
examples/webgl_shadowmesh.html
examples/webgl_shadowmesh.html
+1
-1
未找到文件。
examples/canvas_ascii_effect.html
浏览文件 @
59de7d60
...
...
@@ -71,7 +71,7 @@
light
.
position
.
set
(
-
500
,
-
500
,
-
500
);
scene
.
add
(
light
);
sphere
=
new
THREE
.
Mesh
(
new
THREE
.
SphereGeometry
(
200
,
20
,
10
),
new
THREE
.
MeshLambertMaterial
(
{
shading
:
THREE
.
FlatShading
}
)
);
sphere
=
new
THREE
.
Mesh
(
new
THREE
.
SphereGeometry
(
200
,
20
,
10
),
new
THREE
.
MeshLambertMaterial
()
);
scene
.
add
(
sphere
);
// Plane
...
...
examples/canvas_camera_orthographic.html
浏览文件 @
59de7d60
...
...
@@ -74,7 +74,7 @@
// Cubes
var
geometry
=
new
THREE
.
BoxGeometry
(
50
,
50
,
50
);
var
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
overdraw
:
0.5
}
);
var
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
overdraw
:
0.5
}
);
for
(
var
i
=
0
;
i
<
100
;
i
++
)
{
...
...
examples/canvas_camera_orthographic2.html
浏览文件 @
59de7d60
...
...
@@ -143,7 +143,7 @@
// Cubes
var
geometry
=
new
THREE
.
BoxGeometry
(
50
,
50
,
50
);
var
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
overdraw
:
0.5
}
);
var
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
overdraw
:
0.5
}
);
for
(
var
i
=
0
;
i
<
100
;
i
++
)
{
...
...
examples/canvas_lights_pointlights.html
浏览文件 @
59de7d60
...
...
@@ -94,7 +94,7 @@
loader
=
new
THREE
.
JSONLoader
();
loader
.
load
(
'
obj/WaltHeadLo.js
'
,
function
(
geometry
)
{
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
overdraw
:
0.5
}
)
);
mesh
=
new
THREE
.
Mesh
(
geometry
,
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
overdraw
:
0.5
}
)
);
scene
.
add
(
mesh
);
}
);
...
...
examples/canvas_performance.html
浏览文件 @
59de7d60
...
...
@@ -69,7 +69,7 @@
// Spheres
geometry
=
new
THREE
.
SphereGeometry
(
100
,
26
,
18
);
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
overdraw
:
0.5
}
);
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
overdraw
:
0.5
}
);
for
(
var
i
=
0
;
i
<
20
;
i
++
)
{
...
...
examples/misc_lights_test.html
浏览文件 @
59de7d60
...
...
@@ -42,7 +42,7 @@
var
camera
,
scene
,
canvasRenderer
,
webglRenderer
;
var
mesh
,
zmesh
,
geometry
;
var
mesh
,
zmesh
,
geometry
,
material
;
var
directionalLight
,
pointLight
;
...
...
@@ -70,8 +70,8 @@
// Spheres
var
geometry
=
new
THREE
.
SphereGeometry
(
100
,
16
,
8
);
var
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
overdraw
:
0.5
}
);
geometry
=
new
THREE
.
SphereGeometry
(
100
,
16
,
8
);
material
=
new
THREE
.
MeshPhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
overdraw
:
0.5
,
shininess
:
0
}
);
for
(
var
i
=
0
;
i
<
30
;
i
++
)
{
...
...
@@ -86,8 +86,7 @@
// Torus
var
geometry
=
new
THREE
.
TorusGeometry
(
100
,
25
,
15
,
30
);
var
material
=
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
overdraw
:
0.5
}
);
geometry
=
new
THREE
.
TorusGeometry
(
100
,
25
,
15
,
30
);
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
scene
.
add
(
mesh
);
...
...
@@ -108,9 +107,9 @@
pointLight
=
new
THREE
.
PointLight
(
0xffaa00
);
scene
.
add
(
pointLight
);
var
geometry
=
new
THREE
.
SphereGeometry
(
100
,
8
,
4
);
var
material
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0xffaa00
}
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
geometry
=
new
THREE
.
SphereGeometry
(
100
,
8
,
4
);
material
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
0xffaa00
}
);
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
mesh
.
scale
.
set
(
0.05
,
0.05
,
0.05
);
pointLight
.
add
(
mesh
);
...
...
examples/misc_sound.html
浏览文件 @
59de7d60
...
...
@@ -88,9 +88,9 @@
var
sphere
=
new
THREE
.
SphereGeometry
(
20
,
32
,
16
);
material_sphere1
=
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffaa00
,
shading
:
THREE
.
FlatShading
}
);
material_sphere2
=
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xff2200
,
shading
:
THREE
.
FlatShading
}
);
material_sphere3
=
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0x6622aa
,
shading
:
THREE
.
FlatShading
}
);
material_sphere1
=
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffaa00
,
shading
:
THREE
.
FlatShading
,
shininess
:
0
}
);
material_sphere2
=
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xff2200
,
shading
:
THREE
.
FlatShading
,
shininess
:
0
}
);
material_sphere3
=
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0x6622aa
,
shading
:
THREE
.
FlatShading
,
shininess
:
0
}
);
// sound spheres
...
...
examples/webgl_geometry_colors.html
浏览文件 @
59de7d60
...
...
@@ -151,7 +151,7 @@
var
materials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
transparent
:
true
}
)
];
...
...
examples/webgl_interactive_cubes_gpu.html
浏览文件 @
59de7d60
...
...
@@ -86,7 +86,7 @@
var
geometry
=
new
THREE
.
Geometry
(),
pickingGeometry
=
new
THREE
.
Geometry
(),
pickingMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
vertexColors
:
THREE
.
VertexColors
}
),
defaultMaterial
=
new
THREE
.
Mesh
LambertMaterial
({
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
);
defaultMaterial
=
new
THREE
.
Mesh
PhongMaterial
({
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
);
function
applyVertexColors
(
g
,
c
)
{
...
...
examples/webgl_lights_pointlights2.html
浏览文件 @
59de7d60
...
...
@@ -130,7 +130,7 @@
// MATERIALS
var
groundMaterial
=
new
THREE
.
MeshPhongMaterial
(
{
color
:
0xffffff
,
map
:
texture
}
);
var
objectMaterial
=
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0x000000
,
specular
:
0xffffff
,
map
:
texture2
}
);
var
objectMaterial
=
new
THREE
.
Mesh
StandardMaterial
(
{
color
:
0x000000
,
map
:
texture2
,
roughness
:
0.2
,
metalness
:
1.0
}
);
// GROUND
...
...
examples/webgl_marchingcubes.html
浏览文件 @
59de7d60
...
...
@@ -307,7 +307,7 @@
"
shiny
"
:
{
m
:
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0x550000
,
specular
:
0x440000
,
envMap
:
reflectionCube
,
combine
:
THREE
.
MixOperation
,
reflectivity
:
0.3
,
metal
:
true
}
),
m
:
new
THREE
.
Mesh
StandardMaterial
(
{
color
:
0x550000
,
envMap
:
reflectionCube
,
roughness
:
0.1
,
metalness
:
1.0
}
),
h
:
0
,
s
:
0.8
,
l
:
0.2
},
...
...
examples/webgl_modifier_subdivision.html
浏览文件 @
59de7d60
...
...
@@ -249,7 +249,7 @@
group
.
add
(
mesh
);
var
meshmaterials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x405040
,
wireframe
:
true
,
opacity
:
0.8
,
transparent
:
true
}
)
];
...
...
examples/webgl_multiple_canvases_circle.html
浏览文件 @
59de7d60
...
...
@@ -283,7 +283,7 @@
var
materials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
}
)
];
...
...
examples/webgl_multiple_canvases_complex.html
浏览文件 @
59de7d60
...
...
@@ -210,7 +210,7 @@
var
materials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
transparent
:
true
}
)
];
...
...
examples/webgl_multiple_canvases_grid.html
浏览文件 @
59de7d60
...
...
@@ -226,7 +226,7 @@
var
materials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
transparent
:
true
}
)
];
...
...
examples/webgl_multiple_renderers.html
浏览文件 @
59de7d60
...
...
@@ -140,7 +140,7 @@
var
materials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
transparent
:
true
}
)
];
...
...
examples/webgl_multiple_views.html
浏览文件 @
59de7d60
...
...
@@ -207,7 +207,7 @@
var
materials
=
[
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
}
),
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
,
vertexColors
:
THREE
.
VertexColors
,
shininess
:
0
}
),
new
THREE
.
MeshBasicMaterial
(
{
color
:
0x000000
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
transparent
:
true
}
)
];
...
...
examples/webgl_shadowmesh.html
浏览文件 @
59de7d60
...
...
@@ -163,7 +163,7 @@
// YELLOW PYRAMID and PYRAMID'S SHADOW
var
pyramidGeometry
=
new
THREE
.
CylinderGeometry
(
0
,
0.5
,
2
,
4
);
var
pyramidMaterial
=
new
THREE
.
Mesh
LambertMaterial
(
{
color
:
'
rgb(255,255,0)
'
,
emissive
:
0x440000
,
shading
:
THREE
.
FlatShading
}
);
var
pyramidMaterial
=
new
THREE
.
Mesh
PhongMaterial
(
{
color
:
'
rgb(255,255,0)
'
,
emissive
:
0x440000
,
shading
:
THREE
.
FlatShading
,
shininess
:
0
}
);
pyramid
=
new
THREE
.
Mesh
(
pyramidGeometry
,
pyramidMaterial
);
pyramid
.
position
.
set
(
-
4
,
1
,
2
);
scene
.
add
(
pyramid
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录