Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
e0556d5b
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,发现更多精彩内容 >>
提交
e0556d5b
编写于
5月 31, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into dev
上级
ec77108c
f05fd04f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
4 deletion
+13
-4
examples/obj/cubecolors/cube_fvc.js
examples/obj/cubecolors/cube_fvc.js
+5
-1
examples/obj/cubecolors/cubecolors.js
examples/obj/cubecolors/cubecolors.js
+5
-1
utils/exporters/blender/2.63/scripts/addons/io_mesh_threejs/export_threejs.py
...der/2.63/scripts/addons/io_mesh_threejs/export_threejs.py
+3
-2
未找到文件。
examples/obj/cubecolors/cube_fvc.js
浏览文件 @
e0556d5b
...
...
@@ -3,7 +3,7 @@
"
metadata
"
:
{
"
formatVersion
"
:
3
,
"
generatedBy
"
:
"
Blender 2.6
0
Exporter
"
,
"
generatedBy
"
:
"
Blender 2.6
3
Exporter
"
,
"
vertices
"
:
8
,
"
faces
"
:
6
,
"
normals
"
:
0
,
...
...
@@ -19,12 +19,16 @@
"
DbgColor
"
:
15658734
,
"
DbgIndex
"
:
0
,
"
DbgName
"
:
"
Material
"
,
"
blending
"
:
"
NormalBlending
"
,
"
colorAmbient
"
:
[
0.0
,
0.0
,
0.0
],
"
colorDiffuse
"
:
[
0.800000011920929
,
0.800000011920929
,
0.800000011920929
],
"
colorSpecular
"
:
[
0.5
,
0.5
,
0.5
],
"
depthTest
"
:
true
,
"
depthWrite
"
:
true
,
"
shading
"
:
"
Lambert
"
,
"
specularCoef
"
:
50
,
"
transparency
"
:
1.0
,
"
transparent
"
:
false
,
"
vertexColors
"
:
true
}],
...
...
examples/obj/cubecolors/cubecolors.js
浏览文件 @
e0556d5b
...
...
@@ -3,7 +3,7 @@
"
metadata
"
:
{
"
formatVersion
"
:
3
,
"
generatedBy
"
:
"
Blender 2.6
0
Exporter
"
,
"
generatedBy
"
:
"
Blender 2.6
3
Exporter
"
,
"
vertices
"
:
1538
,
"
faces
"
:
1536
,
"
normals
"
:
0
,
...
...
@@ -19,12 +19,16 @@
"
DbgColor
"
:
15658734
,
"
DbgIndex
"
:
0
,
"
DbgName
"
:
"
Material
"
,
"
blending
"
:
"
NormalBlending
"
,
"
colorAmbient
"
:
[
0.0
,
0.0
,
0.0
],
"
colorDiffuse
"
:
[
1.0
,
1.0
,
1.0
],
"
colorSpecular
"
:
[
0.0
,
0.0
,
0.0
],
"
depthTest
"
:
true
,
"
depthWrite
"
:
true
,
"
shading
"
:
"
Lambert
"
,
"
specularCoef
"
:
50
,
"
transparency
"
:
1.0
,
"
transparent
"
:
false
,
"
vertexColors
"
:
true
}],
...
...
utils/exporters/blender/2.63/scripts/addons/io_mesh_threejs/export_threejs.py
浏览文件 @
e0556d5b
...
...
@@ -303,7 +303,7 @@ def get_uv_indices(face_index, uvs, mesh):
def
get_color_indices
(
face_index
,
colors
,
mesh
):
c
=
[]
color_layer
=
mesh
.
vertex_colors
.
active
.
data
color_layer
=
mesh
.
tessface_
vertex_colors
.
active
.
data
face_colors
=
color_layer
[
face_index
]
face_colors
=
face_colors
.
color1
,
face_colors
.
color2
,
face_colors
.
color3
,
face_colors
.
color4
for
i
in
face_colors
:
...
...
@@ -607,7 +607,7 @@ def generate_normals(normals, option_normals):
# #####################################################
def
extract_vertex_colors
(
mesh
,
colors
,
count
):
color_layer
=
mesh
.
vertex_colors
.
active
.
data
color_layer
=
mesh
.
tessface_
vertex_colors
.
active
.
data
for
face_index
,
face
in
enumerate
(
get_faces
(
mesh
)):
...
...
@@ -1013,6 +1013,7 @@ def extract_meshes(objects, scene, export_single_model, option_scale, flipyz):
mesh
.
transform
(
object
.
matrix_world
)
mesh
.
calc_normals
()
mesh
.
calc_tessface
()
mesh
.
transform
(
mathutils
.
Matrix
.
Scale
(
option_scale
,
4
))
meshes
.
append
([
mesh
,
object
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录