Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
d9a930ca
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,发现更多精彩内容 >>
提交
d9a930ca
编写于
3月 22, 2011
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added second cube for Blender vertex color example (courtesy of mrdoob).
上级
91ef6a71
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
66 addition
and
3 deletion
+66
-3
examples/obj/cubecolors/cube_fvc.blend
examples/obj/cubecolors/cube_fvc.blend
+0
-0
examples/obj/cubecolors/cube_fvc.js
examples/obj/cubecolors/cube_fvc.js
+47
-0
examples/webgl_geometry_blenderexport_colors.html
examples/webgl_geometry_blenderexport_colors.html
+19
-3
未找到文件。
examples/obj/cubecolors/cube_fvc.blend
0 → 100644
浏览文件 @
d9a930ca
文件已添加
examples/obj/cubecolors/cube_fvc.js
0 → 100644
浏览文件 @
d9a930ca
/*
* File generated with Blender 2.56 Exporter
* https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender/
*
* vertices: 8
* faces: 6
* normals: 8
* uvs: 0
* colors: 22
* materials: 1
*
*/
var
model
=
{
'
version
'
:
2
,
'
materials
'
:
[
{
"
DbgColor
"
:
0xeeeeee
,
"
DbgIndex
"
:
0
,
"
DbgName
"
:
"
Material
"
,
"
colorAmbient
"
:
[
0.0
,
0.0
,
0.0
],
"
colorDiffuse
"
:
[
1
,
1
,
1
],
"
colorSpecular
"
:
[
0.5
,
0.5
,
0.5
],
"
shading
"
:
"
Basic
"
,
"
specularCoef
"
:
50
,
"
transparency
"
:
1.0
,
"
vertexColors
"
:
true
}],
'
vertices
'
:
[
1.000000
,
-
1.000000
,
-
1.000000
,
1.000000
,
-
1.000000
,
1.000000
,
-
1.000000
,
-
1.000000
,
1.000000
,
-
1.000000
,
-
1.000000
,
-
1.000000
,
1.000000
,
1.000000
,
-
1.000000
,
0.999999
,
1.000000
,
1.000000
,
-
1.000000
,
1.000000
,
0.999999
,
-
1.000000
,
1.000000
,
-
1.000000
],
'
morphTargets
'
:
[],
'
normals
'
:
[
0.577349
,
-
0.577349
,
-
0.577349
,
0.577349
,
-
0.577349
,
0.577349
,
-
0.577349
,
-
0.577349
,
0.577349
,
-
0.577349
,
-
0.577349
,
-
0.577349
,
0.577349
,
0.577349
,
-
0.577349
,
-
0.577349
,
0.577349
,
-
0.577349
,
-
0.577349
,
0.577349
,
0.577349
,
0.577349
,
0.577349
,
0.577349
],
'
colors
'
:
[
0xffffff
,
0xffe18d
,
0xffe190
,
0x80fff7
,
0xe7df1b
,
0x6f62ff
,
0xfd17db
,
0xff0007
,
0x101d0e
,
0x5c00a3
,
0xd1ffb4
,
0x8a0079
,
0x797eed
,
0x6758ff
,
0xfff5de
,
0x3f3cff
,
0xb6b4ff
,
0x1dffef
,
0x101e1d
,
0x8a9190
,
0xd0ffaf
,
0x4c5555
],
'
uvs
'
:
[[]],
'
faces
'
:
[
163
,
0
,
1
,
2
,
3
,
0
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
163
,
4
,
7
,
6
,
5
,
0
,
4
,
5
,
6
,
7
,
4
,
5
,
6
,
7
,
163
,
0
,
4
,
5
,
1
,
0
,
0
,
4
,
7
,
1
,
0
,
8
,
9
,
10
,
163
,
1
,
5
,
6
,
2
,
0
,
1
,
7
,
6
,
2
,
0
,
11
,
12
,
13
,
163
,
2
,
6
,
7
,
3
,
0
,
2
,
6
,
5
,
3
,
14
,
15
,
16
,
17
,
163
,
4
,
0
,
3
,
7
,
0
,
4
,
0
,
3
,
5
,
18
,
19
,
20
,
21
],
'
end
'
:
(
new
Date
).
getTime
()
}
postMessage
(
model
);
examples/webgl_geometry_blenderexport_colors.html
浏览文件 @
d9a930ca
...
@@ -74,7 +74,8 @@
...
@@ -74,7 +74,8 @@
scene
.
addLight
(
light
);
scene
.
addLight
(
light
);
var
loader
=
new
THREE
.
JSONLoader
();
var
loader
=
new
THREE
.
JSONLoader
();
loader
.
load
(
{
model
:
"
obj/cubecolors/cubecolors.js
"
,
callback
:
createScene
}
);
loader
.
load
(
{
model
:
"
obj/cubecolors/cubecolors.js
"
,
callback
:
createScene1
}
);
loader
.
load
(
{
model
:
"
obj/cubecolors/cube_fvc.js
"
,
callback
:
createScene2
}
);
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
...
@@ -90,13 +91,23 @@
...
@@ -90,13 +91,23 @@
}
}
function
createScene
(
geometry
)
{
function
createScene
1
(
geometry
)
{
geometry
.
materials
[
0
][
0
].
shading
=
THREE
.
FlatShading
;
geometry
.
materials
[
0
][
0
].
shading
=
THREE
.
FlatShading
;
var
material
=
[
new
THREE
.
MeshFaceMaterial
(),
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
opacity
:
0.9
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
wireframeLinewidth
:
2
}
)
];
var
material
=
[
new
THREE
.
MeshFaceMaterial
(),
new
THREE
.
MeshLambertMaterial
(
{
color
:
0xffffff
,
opacity
:
0.9
,
shading
:
THREE
.
FlatShading
,
wireframe
:
true
,
wireframeLinewidth
:
2
}
)
];
mesh
=
SceneUtils
.
addMesh
(
scene
,
geometry
,
250
,
0
,
0
,
0
,
0
,
0
,
0
,
material
);
mesh
=
SceneUtils
.
addMesh
(
scene
,
geometry
,
250
,
400
,
0
,
0
,
0
,
0
,
0
,
material
);
}
function
createScene2
(
geometry
)
{
geometry
.
materials
[
0
][
0
].
shading
=
THREE
.
FlatShading
;
var
material
=
new
THREE
.
MeshFaceMaterial
();
mesh2
=
SceneUtils
.
addMesh
(
scene
,
geometry
,
250
,
-
400
,
0
,
0
,
0
,
0
,
0
,
material
);
}
}
...
@@ -127,6 +138,11 @@
...
@@ -127,6 +138,11 @@
mesh
.
rotation
.
x
+=
0.01
;
mesh
.
rotation
.
x
+=
0.01
;
mesh
.
rotation
.
y
+=
0.01
;
mesh
.
rotation
.
y
+=
0.01
;
}
if
(
mesh2
)
{
mesh2
.
rotation
.
x
+=
0.01
;
mesh2
.
rotation
.
y
+=
0.01
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录