Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c748ab35
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,发现更多精彩内容 >>
提交
c748ab35
编写于
9月 17, 2020
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Loaders: Clean up.
上级
538533d0
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
32 addition
and
32 deletion
+32
-32
examples/js/loaders/GLTFLoader.js
examples/js/loaders/GLTFLoader.js
+3
-3
examples/js/loaders/LDrawLoader.js
examples/js/loaders/LDrawLoader.js
+1
-1
examples/js/loaders/MTLLoader.js
examples/js/loaders/MTLLoader.js
+1
-1
examples/js/loaders/OBJLoader.js
examples/js/loaders/OBJLoader.js
+2
-2
examples/js/loaders/PLYLoader.js
examples/js/loaders/PLYLoader.js
+1
-1
examples/js/loaders/STLLoader.js
examples/js/loaders/STLLoader.js
+3
-3
examples/js/loaders/TDSLoader.js
examples/js/loaders/TDSLoader.js
+2
-2
examples/js/loaders/TGALoader.js
examples/js/loaders/TGALoader.js
+1
-1
examples/js/loaders/TTFLoader.js
examples/js/loaders/TTFLoader.js
+1
-1
examples/jsm/loaders/GLTFLoader.js
examples/jsm/loaders/GLTFLoader.js
+3
-3
examples/jsm/loaders/LDrawLoader.js
examples/jsm/loaders/LDrawLoader.js
+1
-1
examples/jsm/loaders/MTLLoader.js
examples/jsm/loaders/MTLLoader.js
+1
-1
examples/jsm/loaders/OBJLoader.js
examples/jsm/loaders/OBJLoader.js
+2
-2
examples/jsm/loaders/PLYLoader.js
examples/jsm/loaders/PLYLoader.js
+1
-1
examples/jsm/loaders/STLLoader.js
examples/jsm/loaders/STLLoader.js
+3
-3
examples/jsm/loaders/TDSLoader.js
examples/jsm/loaders/TDSLoader.js
+2
-2
examples/jsm/loaders/TGALoader.js
examples/jsm/loaders/TGALoader.js
+1
-1
examples/jsm/loaders/TTFLoader.js
examples/jsm/loaders/TTFLoader.js
+1
-1
src/loaders/ObjectLoader.js
src/loaders/ObjectLoader.js
+2
-2
未找到文件。
examples/js/loaders/GLTFLoader.js
浏览文件 @
c748ab35
...
...
@@ -65,7 +65,7 @@ THREE.GLTFLoader = ( function () {
// Tells the LoadingManager to track an extra item, which resolves after
// the model is fully loaded. This means the count of items loaded will
// be incorrect, but ensures manager.onLoad() does not fire early.
scope
.
manager
.
itemStart
(
url
);
this
.
manager
.
itemStart
(
url
);
var
_onError
=
function
(
e
)
{
...
...
@@ -84,12 +84,12 @@ THREE.GLTFLoader = ( function () {
};
var
loader
=
new
THREE
.
FileLoader
(
scope
.
manager
);
var
loader
=
new
THREE
.
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
data
)
{
...
...
examples/js/loaders/LDrawLoader.js
浏览文件 @
c748ab35
...
...
@@ -585,7 +585,7 @@ THREE.LDrawLoader = ( function () {
var
fileLoader
=
new
THREE
.
FileLoader
(
this
.
manager
);
fileLoader
.
setPath
(
this
.
path
);
fileLoader
.
setRequestHeader
(
this
.
requestHeader
);
fileLoader
.
setWithCredentials
(
scope
.
withCredentials
);
fileLoader
.
setWithCredentials
(
this
.
withCredentials
);
fileLoader
.
load
(
url
,
function
(
text
)
{
scope
.
processObject
(
text
,
onLoad
,
null
,
url
);
...
...
examples/js/loaders/MTLLoader.js
浏览文件 @
c748ab35
...
...
@@ -35,7 +35,7 @@ THREE.MTLLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
var
loader
=
new
THREE
.
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
try
{
...
...
examples/js/loaders/OBJLoader.js
浏览文件 @
c748ab35
...
...
@@ -433,10 +433,10 @@ THREE.OBJLoader = ( function () {
var
scope
=
this
;
var
loader
=
new
THREE
.
FileLoader
(
scope
.
manager
);
var
loader
=
new
THREE
.
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
try
{
...
...
examples/js/loaders/PLYLoader.js
浏览文件 @
c748ab35
...
...
@@ -46,7 +46,7 @@ THREE.PLYLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
try
{
...
...
examples/js/loaders/STLLoader.js
浏览文件 @
c748ab35
...
...
@@ -65,11 +65,11 @@ THREE.STLLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
var
scope
=
this
;
var
loader
=
new
THREE
.
FileLoader
(
scope
.
manager
);
loader
.
setPath
(
scope
.
path
);
var
loader
=
new
THREE
.
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
...
...
examples/js/loaders/TDSLoader.js
浏览文件 @
c748ab35
...
...
@@ -39,13 +39,13 @@ THREE.TDSLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
var
scope
=
this
;
var
path
=
(
scope
.
path
===
''
)
?
THREE
.
LoaderUtils
.
extractUrlBase
(
url
)
:
scope
.
path
;
var
path
=
(
this
.
path
===
''
)
?
THREE
.
LoaderUtils
.
extractUrlBase
(
url
)
:
this
.
path
;
var
loader
=
new
THREE
.
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
data
)
{
...
...
examples/js/loaders/TGALoader.js
浏览文件 @
c748ab35
...
...
@@ -19,7 +19,7 @@ THREE.TGALoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
var
loader
=
new
THREE
.
FileLoader
(
this
.
manager
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setPath
(
this
.
path
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
buffer
)
{
...
...
examples/js/loaders/TTFLoader.js
浏览文件 @
c748ab35
...
...
@@ -26,7 +26,7 @@ THREE.TTFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
buffer
)
{
try
{
...
...
examples/jsm/loaders/GLTFLoader.js
浏览文件 @
c748ab35
...
...
@@ -128,7 +128,7 @@ var GLTFLoader = ( function () {
// Tells the LoadingManager to track an extra item, which resolves after
// the model is fully loaded. This means the count of items loaded will
// be incorrect, but ensures manager.onLoad() does not fire early.
scope
.
manager
.
itemStart
(
url
);
this
.
manager
.
itemStart
(
url
);
var
_onError
=
function
(
e
)
{
...
...
@@ -147,12 +147,12 @@ var GLTFLoader = ( function () {
};
var
loader
=
new
FileLoader
(
scope
.
manager
);
var
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
data
)
{
...
...
examples/jsm/loaders/LDrawLoader.js
浏览文件 @
c748ab35
...
...
@@ -601,7 +601,7 @@ var LDrawLoader = ( function () {
var
fileLoader
=
new
FileLoader
(
this
.
manager
);
fileLoader
.
setPath
(
this
.
path
);
fileLoader
.
setRequestHeader
(
this
.
requestHeader
);
fileLoader
.
setWithCredentials
(
scope
.
withCredentials
);
fileLoader
.
setWithCredentials
(
this
.
withCredentials
);
fileLoader
.
load
(
url
,
function
(
text
)
{
scope
.
processObject
(
text
,
onLoad
,
null
,
url
);
...
...
examples/jsm/loaders/MTLLoader.js
浏览文件 @
c748ab35
...
...
@@ -46,7 +46,7 @@ MTLLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
var
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
try
{
...
...
examples/jsm/loaders/OBJLoader.js
浏览文件 @
c748ab35
...
...
@@ -447,10 +447,10 @@ var OBJLoader = ( function () {
var
scope
=
this
;
var
loader
=
new
FileLoader
(
scope
.
manager
);
var
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
try
{
...
...
examples/jsm/loaders/PLYLoader.js
浏览文件 @
c748ab35
...
...
@@ -52,7 +52,7 @@ PLYLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
try
{
...
...
examples/jsm/loaders/STLLoader.js
浏览文件 @
c748ab35
...
...
@@ -73,11 +73,11 @@ STLLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
var
scope
=
this
;
var
loader
=
new
FileLoader
(
scope
.
manager
);
loader
.
setPath
(
scope
.
path
);
var
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
...
...
examples/jsm/loaders/TDSLoader.js
浏览文件 @
c748ab35
...
...
@@ -53,13 +53,13 @@ TDSLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
var
scope
=
this
;
var
path
=
(
scope
.
path
===
''
)
?
LoaderUtils
.
extractUrlBase
(
url
)
:
scope
.
path
;
var
path
=
(
this
.
path
===
''
)
?
LoaderUtils
.
extractUrlBase
(
url
)
:
this
.
path
;
var
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
data
)
{
...
...
examples/jsm/loaders/TGALoader.js
浏览文件 @
c748ab35
...
...
@@ -23,7 +23,7 @@ TGALoader.prototype = Object.assign( Object.create( Loader.prototype ), {
var
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setPath
(
this
.
path
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
buffer
)
{
...
...
examples/jsm/loaders/TTFLoader.js
浏览文件 @
c748ab35
...
...
@@ -30,7 +30,7 @@ TTFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
loader
.
setPath
(
this
.
path
);
loader
.
setResponseType
(
'
arraybuffer
'
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
buffer
)
{
try
{
...
...
src/loaders/ObjectLoader.js
浏览文件 @
c748ab35
...
...
@@ -71,10 +71,10 @@ class ObjectLoader extends Loader {
const
path
=
(
this
.
path
===
''
)
?
LoaderUtils
.
extractUrlBase
(
url
)
:
this
.
path
;
this
.
resourcePath
=
this
.
resourcePath
||
path
;
const
loader
=
new
FileLoader
(
scope
.
manager
);
const
loader
=
new
FileLoader
(
this
.
manager
);
loader
.
setPath
(
this
.
path
);
loader
.
setRequestHeader
(
this
.
requestHeader
);
loader
.
setWithCredentials
(
scope
.
withCredentials
);
loader
.
setWithCredentials
(
this
.
withCredentials
);
loader
.
load
(
url
,
function
(
text
)
{
let
json
=
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录