Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
785271e6
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,体验更适合开发者的 AI 搜索 >>
提交
785271e6
编写于
5月 26, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
And more post-release fixes.
上级
624e4d1f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
57 addition
and
9 deletion
+57
-9
editor/js/Menubar.File.js
editor/js/Menubar.File.js
+12
-0
editor/js/libs/app/index.html
editor/js/libs/app/index.html
+2
-0
examples/js/loaders/ColladaLoader2.js
examples/js/loaders/ColladaLoader2.js
+3
-8
examples/js/loaders/OBJLoader.js
examples/js/loaders/OBJLoader.js
+40
-1
未找到文件。
editor/js/Menubar.File.js
浏览文件 @
785271e6
...
...
@@ -248,6 +248,18 @@ Menubar.File = function ( editor ) {
}
);
loader
.
load
(
'
../examples/js/controls/VRControls.js
'
,
function
(
content
)
{
zip
.
file
(
'
js/VRControls.js
'
,
content
);
}
);
loader
.
load
(
'
../examples/js/effects/VREffect.js
'
,
function
(
content
)
{
zip
.
file
(
'
js/VREffect.js
'
,
content
);
}
);
}
);
options
.
add
(
option
);
...
...
editor/js/libs/app/index.html
浏览文件 @
785271e6
...
...
@@ -30,6 +30,8 @@
<body
ontouchstart=
""
>
<script
src=
"js/three.min.js"
></script>
<script
src=
"js/app.js"
></script>
<script
src=
"js/VRControls.js"
></script>
<script
src=
"js/VREffect.js"
></script>
<script>
var
loader
=
new
THREE
.
XHRLoader
();
...
...
examples/js/loaders/ColladaLoader2.js
浏览文件 @
785271e6
...
...
@@ -183,12 +183,7 @@ THREE.ColladaLoader.prototype = {
// image
var
imageLoader
=
new
THREE
.
ImageLoader
();
if
(
this
.
crossOrigin
)
{
imageLoader
.
crossOrigin
=
this
.
crossOrigin
;
}
imageLoader
.
setCrossOrigin
(
this
.
crossOrigin
);
function
parseImage
(
xml
)
{
...
...
@@ -606,10 +601,10 @@ THREE.ColladaLoader.prototype = {
texture
.
repeat
.
set
(
technique
.
repeatU
,
technique
.
repeatV
);
}
else
{
texture
.
wrapS
=
THREE
.
RepeatWrapping
;
texture
.
wrapT
=
THREE
.
RepeatWrapping
;
}
texture
.
needsUpdate
=
true
;
...
...
examples/js/loaders/OBJLoader.js
浏览文件 @
785271e6
...
...
@@ -95,6 +95,8 @@ THREE.OBJLoader.prototype = {
}
var
previousMaterial
=
(
this
.
object
&&
typeof
this
.
object
.
currentMaterial
===
'
function
'
?
this
.
object
.
currentMaterial
()
:
undefined
);
this
.
object
=
{
name
:
name
||
''
,
fromDeclaration
:
(
fromDeclaration
!==
false
),
...
...
@@ -111,6 +113,14 @@ THREE.OBJLoader.prototype = {
var
previous
=
this
.
_finalize
(
false
);
// New usemtl declaration overwrites an inherited material, except if faces were declared
// after the material, then it must be preserved for proper MultiMaterial continuation.
if
(
previous
&&
(
previous
.
inherited
||
previous
.
groupCount
<=
0
)
)
{
this
.
materials
.
splice
(
previous
.
index
,
1
);
}
var
material
=
{
index
:
this
.
materials
.
length
,
name
:
name
||
''
,
...
...
@@ -118,7 +128,21 @@ THREE.OBJLoader.prototype = {
smooth
:
(
previous
!==
undefined
?
previous
.
smooth
:
this
.
smooth
),
groupStart
:
(
previous
!==
undefined
?
previous
.
groupEnd
:
0
),
groupEnd
:
-
1
,
groupCount
:
-
1
groupCount
:
-
1
,
inherited
:
false
,
clone
:
function
(
index
)
{
return
{
index
:
(
typeof
index
===
'
number
'
?
index
:
this
.
index
),
name
:
this
.
name
,
mtllib
:
this
.
mtllib
,
smooth
:
this
.
smooth
,
groupStart
:
this
.
groupEnd
,
groupEnd
:
-
1
,
groupCount
:
-
1
,
inherited
:
false
};
}
};
this
.
materials
.
push
(
material
);
...
...
@@ -144,6 +168,7 @@ THREE.OBJLoader.prototype = {
lastMultiMaterial
.
groupEnd
=
this
.
geometry
.
vertices
.
length
/
3
;
lastMultiMaterial
.
groupCount
=
lastMultiMaterial
.
groupEnd
-
lastMultiMaterial
.
groupStart
;
lastMultiMaterial
.
inherited
=
false
;
}
...
...
@@ -160,6 +185,20 @@ THREE.OBJLoader.prototype = {
}
};
// Inherit previous objects material.
// Spec tells us that a declared material must be set to all objects until a new material is declared.
// If a usemtl declaration is encountered while this new object is being parsed, it will
// overwrite the inherited material. Exception being that there was already face declarations
// to the inherited material, then it will be preserved for proper MultiMaterial continuation.
if
(
previousMaterial
&&
previousMaterial
.
name
&&
typeof
previousMaterial
.
clone
===
"
function
"
)
{
var
declared
=
previousMaterial
.
clone
(
0
);
declared
.
inherited
=
true
;
this
.
object
.
materials
.
push
(
declared
);
}
this
.
objects
.
push
(
this
.
object
);
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录