Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
0548b13c
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
0548b13c
编写于
8月 15, 2017
作者:
D
Don McCurdy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[glTF] Internal GLTFLoader naming updates.
上级
f7263aa3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
22 deletion
+22
-22
examples/js/loaders/GLTFLoader.js
examples/js/loaders/GLTFLoader.js
+22
-22
examples/webgl_loader_gltf.html
examples/webgl_loader_gltf.html
+0
-0
未找到文件。
examples/js/loaders/GLTFLoader.js
浏览文件 @
0548b13c
...
...
@@ -6,17 +6,17 @@
* @author Don McCurdy / https://www.donmccurdy.com
*/
THREE
.
GLTF
2
Loader
=
(
function
()
{
THREE
.
GLTFLoader
=
(
function
()
{
function
GLTF
2
Loader
(
manager
)
{
function
GLTFLoader
(
manager
)
{
this
.
manager
=
(
manager
!==
undefined
)
?
manager
:
THREE
.
DefaultLoadingManager
;
}
GLTF
2
Loader
.
prototype
=
{
GLTFLoader
.
prototype
=
{
constructor
:
GLTF
2
Loader
,
constructor
:
GLTFLoader
,
crossOrigin
:
'
Anonymous
'
,
...
...
@@ -39,7 +39,7 @@ THREE.GLTF2Loader = ( function () {
}
catch
(
e
)
{
// For SyntaxError or TypeError, return a generic failure message.
onError
(
e
.
constructor
===
Error
?
e
:
new
Error
(
'
THREE.GLTF
2
Loader: Unable to parse model.
'
)
);
onError
(
e
.
constructor
===
Error
?
e
:
new
Error
(
'
THREE.GLTFLoader: Unable to parse model.
'
)
);
}
...
...
@@ -81,7 +81,7 @@ THREE.GLTF2Loader = ( function () {
if
(
json
.
asset
===
undefined
||
json
.
asset
.
version
[
0
]
<
2
)
{
onError
(
new
Error
(
'
THREE.GLTF
2Loader: Legacy glTF detected. Use THREE.GLTFLoader instea
d.
'
)
);
onError
(
new
Error
(
'
THREE.GLTF
Loader: Unsupported asset. glTF versions >=2.0 are supporte
d.
'
)
);
return
;
}
...
...
@@ -108,7 +108,7 @@ THREE.GLTF2Loader = ( function () {
}
console
.
time
(
'
GLTF
2
Loader
'
);
console
.
time
(
'
GLTFLoader
'
);
var
parser
=
new
GLTFParser
(
json
,
extensions
,
{
...
...
@@ -119,7 +119,7 @@ THREE.GLTF2Loader = ( function () {
parser
.
parse
(
function
(
scene
,
scenes
,
cameras
,
animations
)
{
console
.
timeEnd
(
'
GLTF
2
Loader
'
);
console
.
timeEnd
(
'
GLTFLoader
'
);
var
glTF
=
{
scene
:
scene
,
...
...
@@ -270,7 +270,7 @@ THREE.GLTF2Loader = ( function () {
if
(
light
.
fallOffExponent
!==
undefined
)
{
console
.
warn
(
'
THREE.GLTF
2
Loader:: light.fallOffExponent not currently supported.
'
);
console
.
warn
(
'
THREE.GLTFLoader:: light.fallOffExponent not currently supported.
'
);
}
...
...
@@ -407,11 +407,11 @@ THREE.GLTF2Loader = ( function () {
if
(
this
.
header
.
magic
!==
BINARY_EXTENSION_HEADER_MAGIC
)
{
throw
new
Error
(
'
THREE.GLTF
2
Loader: Unsupported glTF-Binary header.
'
);
throw
new
Error
(
'
THREE.GLTFLoader: Unsupported glTF-Binary header.
'
);
}
else
if
(
this
.
header
.
version
<
2.0
)
{
throw
new
Error
(
'
THREE.GLTF
2
Loader: Legacy binary file detected. Use GLTFLoader instead.
'
);
throw
new
Error
(
'
THREE.GLTFLoader: Legacy binary file detected. Use GLTFLoader instead.
'
);
}
...
...
@@ -446,7 +446,7 @@ THREE.GLTF2Loader = ( function () {
if
(
this
.
content
===
null
)
{
throw
new
Error
(
'
THREE.GLTF
2
Loader: JSON content not found.
'
);
throw
new
Error
(
'
THREE.GLTFLoader: JSON content not found.
'
);
}
...
...
@@ -1329,7 +1329,7 @@ THREE.GLTF2Loader = ( function () {
if
(
bufferDef
.
type
&&
bufferDef
.
type
!==
'
arraybuffer
'
)
{
throw
new
Error
(
'
THREE.GLTF
2
Loader: %s buffer type is not supported.
'
,
bufferDef
.
type
);
throw
new
Error
(
'
THREE.GLTFLoader: %s buffer type is not supported.
'
,
bufferDef
.
type
);
}
...
...
@@ -1479,7 +1479,7 @@ THREE.GLTF2Loader = ( function () {
if
(
textureDef
.
internalFormat
!==
undefined
&&
texture
.
format
!==
WEBGL_TEXTURE_FORMATS
[
textureDef
.
internalFormat
]
)
{
console
.
warn
(
'
THREE.GLTF
2
Loader: Three.js does not support texture internalFormat which is different from texture format.
'
+
console
.
warn
(
'
THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format.
'
+
'
internalFormat will be forced to be the same value as format.
'
);
}
...
...
@@ -1801,7 +1801,7 @@ THREE.GLTF2Loader = ( function () {
&&
geometry
.
attributes
.
uv2
===
undefined
&&
geometry
.
attributes
.
uv
!==
undefined
)
{
console
.
log
(
'
THREE.GLTF
2
Loader: Duplicating UVs to support aoMap.
'
);
console
.
log
(
'
THREE.GLTFLoader: Duplicating UVs to support aoMap.
'
);
geometry
.
addAttribute
(
'
uv2
'
,
new
THREE
.
BufferAttribute
(
geometry
.
attributes
.
uv
.
array
,
2
)
);
}
...
...
@@ -1862,7 +1862,7 @@ THREE.GLTF2Loader = ( function () {
}
else
{
throw
new
Error
(
'
THREE.GLTF
2
Loader: Primitive mode unsupported:
'
,
primitive
.
mode
);
throw
new
Error
(
'
THREE.GLTFLoader: Primitive mode unsupported:
'
,
primitive
.
mode
);
}
...
...
@@ -1905,7 +1905,7 @@ THREE.GLTF2Loader = ( function () {
if
(
!
params
)
{
console
.
warn
(
'
THREE.GLTF
2
Loader: Missing camera parameters.
'
);
console
.
warn
(
'
THREE.GLTFLoader: Missing camera parameters.
'
);
return
;
}
...
...
@@ -2021,7 +2021,7 @@ THREE.GLTF2Loader = ( function () {
if
(
sampler
.
interpolation
===
'
CATMULLROMSPLINE
'
)
{
console
.
warn
(
'
THREE.GLTF
2
Loader: CATMULLROMSPLINE interpolation is not supported. Using CUBICSPLINE instead.
'
);
console
.
warn
(
'
THREE.GLTFLoader: CATMULLROMSPLINE interpolation is not supported. Using CUBICSPLINE instead.
'
);
}
...
...
@@ -2168,7 +2168,7 @@ THREE.GLTF2Loader = ( function () {
}
else
if
(
node
.
meshes
!==
undefined
)
{
console
.
warn
(
'
THREE.GLTF
2
Loader: Legacy glTF file detected. Nodes may have no more than one mesh.
'
);
console
.
warn
(
'
THREE.GLTFLoader: Legacy glTF file detected. Nodes may have no more than one mesh.
'
);
meshes
=
node
.
meshes
;
...
...
@@ -2183,7 +2183,7 @@ THREE.GLTF2Loader = ( function () {
if
(
group
===
undefined
)
{
console
.
warn
(
'
THREE.GLTF
2
Loader: Could not find node "
'
+
mesh
+
'
".
'
);
console
.
warn
(
'
THREE.GLTFLoader: Could not find node "
'
+
mesh
+
'
".
'
);
continue
;
}
...
...
@@ -2273,7 +2273,7 @@ THREE.GLTF2Loader = ( function () {
}
else
{
console
.
warn
(
'
THREE.GLTF
2
Loader: Joint "%s" could not be found.
'
,
jointId
);
console
.
warn
(
'
THREE.GLTFLoader: Joint "%s" could not be found.
'
,
jointId
);
}
...
...
@@ -2400,6 +2400,6 @@ THREE.GLTF2Loader = ( function () {
};
return
GLTF
2
Loader
;
return
GLTFLoader
;
}
)();
examples/webgl_loader_gltf
2
.html
→
examples/webgl_loader_gltf.html
浏览文件 @
0548b13c
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录