Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
4e9b6b21
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,发现更多精彩内容 >>
未验证
提交
4e9b6b21
编写于
7月 30, 2019
作者:
M
Mr.doob
提交者:
GitHub
7月 30, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16993 from looeee/fbxloader_tga
FBXLoader: better support for TGA textures
上级
8f6d1962
add08253
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
40 deletion
+17
-40
examples/js/loaders/FBXLoader.js
examples/js/loaders/FBXLoader.js
+8
-19
examples/jsm/loaders/FBXLoader.js
examples/jsm/loaders/FBXLoader.js
+8
-20
utils/modularize.js
utils/modularize.js
+1
-1
未找到文件。
examples/js/loaders/FBXLoader.js
浏览文件 @
4e9b6b21
...
@@ -288,27 +288,15 @@ THREE.FBXLoader = ( function () {
...
@@ -288,27 +288,15 @@ THREE.FBXLoader = ( function () {
case
'
tga
'
:
case
'
tga
'
:
if
(
typeof
THREE
.
TGALoader
!==
'
function
'
)
{
if
(
THREE
.
Loader
.
Handlers
.
get
(
'
.tga
'
)
===
null
)
{
console
.
warn
(
'
FBXLoader: THREE.TGALoader is required to load TGA textures
'
);
console
.
warn
(
'
FBXLoader: TGA loader not found, skipping
'
,
fileName
);
return
;
}
else
{
if
(
THREE
.
Loader
.
Handlers
.
get
(
'
.tga
'
)
===
null
)
{
var
tgaLoader
=
new
THREE
.
TGALoader
();
tgaLoader
.
setPath
(
this
.
textureLoader
.
path
);
THREE
.
Loader
.
Handlers
.
add
(
/
\.
tga$/i
,
tgaLoader
);
}
type
=
'
image/tga
'
;
break
;
}
}
type
=
'
image/tga
'
;
break
;
default
:
default
:
console
.
warn
(
'
FBXLoader: Image type "
'
+
extension
+
'
" is not supported.
'
);
console
.
warn
(
'
FBXLoader: Image type "
'
+
extension
+
'
" is not supported.
'
);
...
@@ -417,7 +405,7 @@ THREE.FBXLoader = ( function () {
...
@@ -417,7 +405,7 @@ THREE.FBXLoader = ( function () {
if
(
loader
===
null
)
{
if
(
loader
===
null
)
{
console
.
warn
(
'
FBXLoader: TGA
Loader not found, creating empty placeholder texture for
'
,
fileN
ame
);
console
.
warn
(
'
FBXLoader: TGA
loader not found, creating placeholder texture for
'
,
textureNode
.
RelativeFilen
ame
);
texture
=
new
THREE
.
Texture
();
texture
=
new
THREE
.
Texture
();
}
else
{
}
else
{
...
@@ -428,7 +416,7 @@ THREE.FBXLoader = ( function () {
...
@@ -428,7 +416,7 @@ THREE.FBXLoader = ( function () {
}
else
if
(
extension
===
'
psd
'
)
{
}
else
if
(
extension
===
'
psd
'
)
{
console
.
warn
(
'
FBXLoader: PSD textures are not supported, creating
empty placeholder texture for
'
,
fileN
ame
);
console
.
warn
(
'
FBXLoader: PSD textures are not supported, creating
placeholder texture for
'
,
textureNode
.
RelativeFilen
ame
);
texture
=
new
THREE
.
Texture
();
texture
=
new
THREE
.
Texture
();
}
else
{
}
else
{
...
@@ -1554,6 +1542,7 @@ THREE.FBXLoader = ( function () {
...
@@ -1554,6 +1542,7 @@ THREE.FBXLoader = ( function () {
},
},
// Parse single node mesh geometry in FBXTree.Objects.Geometry
// Parse single node mesh geometry in FBXTree.Objects.Geometry
parseMeshGeometry
:
function
(
relationships
,
geoNode
,
deformers
)
{
parseMeshGeometry
:
function
(
relationships
,
geoNode
,
deformers
)
{
...
...
examples/jsm/loaders/FBXLoader.js
浏览文件 @
4e9b6b21
...
@@ -64,7 +64,6 @@ import {
...
@@ -64,7 +64,6 @@ import {
VertexColors
VertexColors
}
from
"
../../../build/three.module.js
"
;
}
from
"
../../../build/three.module.js
"
;
import
{
Zlib
}
from
"
../libs/inflate.module.min.js
"
;
import
{
Zlib
}
from
"
../libs/inflate.module.min.js
"
;
import
{
TGALoader
}
from
"
../loaders/TGALoader.js
"
;
import
{
NURBSCurve
}
from
"
../curves/NURBSCurve.js
"
;
import
{
NURBSCurve
}
from
"
../curves/NURBSCurve.js
"
;
...
@@ -337,27 +336,15 @@ var FBXLoader = ( function () {
...
@@ -337,27 +336,15 @@ var FBXLoader = ( function () {
case
'
tga
'
:
case
'
tga
'
:
if
(
typeof
TGALoader
!==
'
function
'
)
{
if
(
Loader
.
Handlers
.
get
(
'
.tga
'
)
===
null
)
{
console
.
warn
(
'
FBXLoader: TGALoader is required to load TGA textures
'
);
console
.
warn
(
'
FBXLoader: TGA loader not found, skipping
'
,
fileName
);
return
;
}
else
{
if
(
Loader
.
Handlers
.
get
(
'
.tga
'
)
===
null
)
{
var
tgaLoader
=
new
TGALoader
();
tgaLoader
.
setPath
(
this
.
textureLoader
.
path
);
Loader
.
Handlers
.
add
(
/
\.
tga$/i
,
tgaLoader
);
}
type
=
'
image/tga
'
;
break
;
}
}
type
=
'
image/tga
'
;
break
;
default
:
default
:
console
.
warn
(
'
FBXLoader: Image type "
'
+
extension
+
'
" is not supported.
'
);
console
.
warn
(
'
FBXLoader: Image type "
'
+
extension
+
'
" is not supported.
'
);
...
@@ -466,7 +453,7 @@ var FBXLoader = ( function () {
...
@@ -466,7 +453,7 @@ var FBXLoader = ( function () {
if
(
loader
===
null
)
{
if
(
loader
===
null
)
{
console
.
warn
(
'
FBXLoader: TGA
Loader not found, creating empty placeholder texture for
'
,
fileN
ame
);
console
.
warn
(
'
FBXLoader: TGA
loader not found, creating placeholder texture for
'
,
textureNode
.
RelativeFilen
ame
);
texture
=
new
Texture
();
texture
=
new
Texture
();
}
else
{
}
else
{
...
@@ -477,7 +464,7 @@ var FBXLoader = ( function () {
...
@@ -477,7 +464,7 @@ var FBXLoader = ( function () {
}
else
if
(
extension
===
'
psd
'
)
{
}
else
if
(
extension
===
'
psd
'
)
{
console
.
warn
(
'
FBXLoader: PSD textures are not supported, creating
empty placeholder texture for
'
,
fileN
ame
);
console
.
warn
(
'
FBXLoader: PSD textures are not supported, creating
placeholder texture for
'
,
textureNode
.
RelativeFilen
ame
);
texture
=
new
Texture
();
texture
=
new
Texture
();
}
else
{
}
else
{
...
@@ -1603,6 +1590,7 @@ var FBXLoader = ( function () {
...
@@ -1603,6 +1590,7 @@ var FBXLoader = ( function () {
},
},
// Parse single node mesh geometry in FBXTree.Objects.Geometry
// Parse single node mesh geometry in FBXTree.Objects.Geometry
parseMeshGeometry
:
function
(
relationships
,
geoNode
,
deformers
)
{
parseMeshGeometry
:
function
(
relationships
,
geoNode
,
deformers
)
{
...
...
utils/modularize.js
浏览文件 @
4e9b6b21
...
@@ -87,7 +87,7 @@ var files = [
...
@@ -87,7 +87,7 @@ var files = [
{
path
:
'
loaders/DRACOLoader.js
'
,
dependencies
:
[],
ignoreList
:
[
'
LoadingManager
'
]
},
{
path
:
'
loaders/DRACOLoader.js
'
,
dependencies
:
[],
ignoreList
:
[
'
LoadingManager
'
]
},
{
path
:
'
loaders/EXRLoader.js
'
,
dependencies
:
[],
ignoreList
:
[]
},
{
path
:
'
loaders/EXRLoader.js
'
,
dependencies
:
[],
ignoreList
:
[]
},
{
path
:
'
loaders/EquirectangularToCubeGenerator.js
'
,
dependencies
:
[],
ignoreList
:
[]
},
{
path
:
'
loaders/EquirectangularToCubeGenerator.js
'
,
dependencies
:
[],
ignoreList
:
[]
},
{
path
:
'
loaders/FBXLoader.js
'
,
dependencies
:
[
{
name
:
'
Zlib
'
,
path
:
'
libs/inflate.module.min.js
'
},
{
name
:
'
TGALoader
'
,
path
:
'
loaders/TGALoader.js
'
},
{
name
:
'
NURBSCurve
'
,
path
:
'
curves/NURBSCurve.js
'
}
],
ignoreList
:
[]
},
{
path
:
'
loaders/FBXLoader.js
'
,
dependencies
:
[
{
name
:
'
Zlib
'
,
path
:
'
libs/inflate.module.min.js
'
},
{
name
:
'
NURBSCurve
'
,
path
:
'
curves/NURBSCurve.js
'
}
],
ignoreList
:
[]
},
{
path
:
'
loaders/GCodeLoader.js
'
,
dependencies
:
[],
ignoreList
:
[]
},
{
path
:
'
loaders/GCodeLoader.js
'
,
dependencies
:
[],
ignoreList
:
[]
},
{
path
:
'
loaders/GLTFLoader.js
'
,
dependencies
:
[],
ignoreList
:
[
'
NoSide
'
,
'
Matrix2
'
,
'
Camera
'
,
'
Texture
'
]
},
{
path
:
'
loaders/GLTFLoader.js
'
,
dependencies
:
[],
ignoreList
:
[
'
NoSide
'
,
'
Matrix2
'
,
'
Camera
'
,
'
Texture
'
]
},
{
path
:
'
loaders/HDRCubeTextureLoader.js
'
,
dependencies
:
[
{
name
:
'
RGBELoader
'
,
path
:
'
loaders/RGBELoader.js
'
}
],
ignoreList
:
[]
},
{
path
:
'
loaders/HDRCubeTextureLoader.js
'
,
dependencies
:
[
{
name
:
'
RGBELoader
'
,
path
:
'
loaders/RGBELoader.js
'
}
],
ignoreList
:
[]
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录