Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
d7ec2be7
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,发现更多精彩内容 >>
提交
d7ec2be7
编写于
4月 19, 2011
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added embedded ascii JSON meshes to SceneLoader.
上级
b9977ede
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
435 addition
and
362 deletion
+435
-362
build/Three.js
build/Three.js
+270
-270
build/custom/ThreeExtras.js
build/custom/ThreeExtras.js
+92
-91
examples/scenes/test_scene.js
examples/scenes/test_scene.js
+52
-1
src/extras/io/SceneLoader.js
src/extras/io/SceneLoader.js
+21
-0
未找到文件。
build/Three.js
浏览文件 @
d7ec2be7
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
build/custom/ThreeExtras.js
浏览文件 @
d7ec2be7
此差异已折叠。
点击以展开。
examples/scenes/test_scene.js
浏览文件 @
d7ec2be7
...
...
@@ -86,6 +86,15 @@ var scene = {
"
scale
"
:
[
1
,
1
,
1
],
"
visible
"
:
true
},
"
colorcube
"
:
{
"
geometry
"
:
"
colorcube
"
,
"
materials
"
:
[
],
"
position
"
:
[
-
10
,
-
5
,
30
],
"
rotation
"
:
[
1.57
,
0
,
0
],
"
scale
"
:
[
5
,
5
,
5
],
"
visible
"
:
true
},
"
veyron
"
:
{
"
geometry
"
:
"
veyron
"
,
...
...
@@ -203,11 +212,53 @@ var scene = {
"
veyron
"
:
{
"
type
"
:
"
bin_mesh
"
,
"
url
"
:
"
obj/veyron/VeyronNoUv_bin.js
"
}
}
,
"
colorcube
"
:
{
"
type
"
:
"
embedded_mesh
"
,
"
id
"
:
"
cube_fvc
"
}
},
"
embeds
"
:
{
"
cube_fvc
"
:
{
"
version
"
:
2
,
"
scale
"
:
1.000000
,
"
materials
"
:
[
{
"
DbgColor
"
:
15658734
,
"
DbgIndex
"
:
0
,
"
DbgName
"
:
"
Material
"
,
"
colorAmbient
"
:
[
0.0
,
0.0
,
0.0
],
"
colorDiffuse
"
:
[
0.800000011920929
,
0.800000011920929
,
0.800000011920929
],
"
colorSpecular
"
:
[
0.5
,
0.5
,
0.5
],
"
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.000001
,
-
1.000000
,
1.000000
,
1.000000
,
-
1.000000
,
1.000000
,
-
1.000000
],
"
morphTargets
"
:
[],
"
normals
"
:
[],
"
colors
"
:
[
16777215
,
16769421
,
16769424
,
8454135
,
15195931
,
7299839
,
16586715
,
16711687
,
1056014
,
6029475
,
13762484
,
9044089
,
7962349
,
6772991
,
16774622
,
4144383
,
11973887
,
1966063
,
1056285
,
9081232
,
13696943
,
5002581
],
"
uvs
"
:
[[]],
"
faces
"
:
[
131
,
0
,
1
,
2
,
3
,
0
,
0
,
1
,
2
,
3
,
131
,
4
,
7
,
6
,
5
,
0
,
4
,
5
,
6
,
7
,
131
,
0
,
4
,
5
,
1
,
0
,
0
,
8
,
9
,
10
,
131
,
1
,
5
,
6
,
2
,
0
,
0
,
11
,
12
,
13
,
131
,
2
,
6
,
7
,
3
,
0
,
14
,
15
,
16
,
17
,
131
,
4
,
0
,
3
,
7
,
0
,
18
,
19
,
20
,
21
],
"
edges
"
:
[]
}
},
"
materials
"
:
{
/*
...
...
src/extras/io/SceneLoader.js
浏览文件 @
d7ec2be7
...
...
@@ -244,6 +244,16 @@ THREE.SceneLoader.prototype = {
};
function
create_callback_embed
(
id
)
{
return
function
(
geo
)
{
result
.
geometries
[
id
]
=
geo
;
}
};
function
async_callback_gate
()
{
var
progress
=
{
...
...
@@ -449,6 +459,17 @@ THREE.SceneLoader.prototype = {
callback
:
create_callback
(
dg
)
}
);
}
else
if
(
g
.
type
==
"
embedded_mesh
"
)
{
var
modelJson
=
data
.
embeds
[
g
.
id
],
texture_path
=
""
;
if
(
modelJson
)
{
jsonLoader
.
createModel
(
modelJson
,
create_callback_embed
(
dg
),
texture_path
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录