Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
3a44a065
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,发现更多精彩内容 >>
提交
3a44a065
编写于
11月 07, 2016
作者:
T
Takahiro
提交者:
Mr.doob
11月 07, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove MMD default textures (#10034)
上级
9ed5d1a3
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
39 addition
and
11 deletion
+39
-11
examples/js/loaders/MMDLoader.js
examples/js/loaders/MMDLoader.js
+39
-8
examples/models/mmd/default/toon00.bmp
examples/models/mmd/default/toon00.bmp
+0
-0
examples/models/mmd/default/toon01.bmp
examples/models/mmd/default/toon01.bmp
+0
-0
examples/models/mmd/default/toon02.bmp
examples/models/mmd/default/toon02.bmp
+0
-0
examples/models/mmd/default/toon03.bmp
examples/models/mmd/default/toon03.bmp
+0
-0
examples/models/mmd/default/toon04.bmp
examples/models/mmd/default/toon04.bmp
+0
-0
examples/models/mmd/default/toon05.bmp
examples/models/mmd/default/toon05.bmp
+0
-0
examples/models/mmd/default/toon06.bmp
examples/models/mmd/default/toon06.bmp
+0
-0
examples/models/mmd/default/toon07.bmp
examples/models/mmd/default/toon07.bmp
+0
-0
examples/models/mmd/default/toon08.bmp
examples/models/mmd/default/toon08.bmp
+0
-0
examples/models/mmd/default/toon09.bmp
examples/models/mmd/default/toon09.bmp
+0
-0
examples/models/mmd/default/toon10.bmp
examples/models/mmd/default/toon10.bmp
+0
-0
examples/webgl_loader_mmd.html
examples/webgl_loader_mmd.html
+0
-1
examples/webgl_loader_mmd_audio.html
examples/webgl_loader_mmd_audio.html
+0
-1
examples/webgl_loader_mmd_pose.html
examples/webgl_loader_mmd_pose.html
+0
-1
未找到文件。
examples/js/loaders/MMDLoader.js
浏览文件 @
3a44a065
...
...
@@ -41,18 +41,31 @@ THREE.MMDLoader = function ( manager ) {
THREE
.
Loader
.
call
(
this
);
this
.
manager
=
(
manager
!==
undefined
)
?
manager
:
THREE
.
DefaultLoadingManager
;
this
.
defaultTexturePath
=
'
./models/default/
'
;
};
THREE
.
MMDLoader
.
prototype
=
Object
.
create
(
THREE
.
Loader
.
prototype
);
THREE
.
MMDLoader
.
prototype
.
constructor
=
THREE
.
MMDLoader
;
THREE
.
MMDLoader
.
prototype
.
setDefaultTexturePath
=
function
(
path
)
{
this
.
defaultTexturePath
=
path
;
};
/*
* base64 encoded defalut toon textures toon00.bmp - toon10.bmp
* Users don't need to prepare default texture files.
*
* This idea is from http://www20.atpages.jp/katwat/three.js_r58/examples/mytest37/mmd.three.js
*/
THREE
.
MMDLoader
.
prototype
.
defaultToonTextures
=
[
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAN0lEQVRYR+3WQREAMBACsZ5/bWiiMvgEBTt5cW37hjsBBAgQIECAwFwgyfYPCCBAgAABAgTWAh8aBHZBl14e8wAAAABJRU5ErkJggg==
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAOUlEQVRYR+3WMREAMAwDsYY/yoDI7MLwIiP40+RJklfcCCBAgAABAgTqArfb/QMCCBAgQIAAgbbAB3z/e0F3js2cAAAAAElFTkSuQmCC
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAN0lEQVRYR+3WQREAMBACsZ5/B5ilMvgEBTt5cW37hjsBBAgQIECAwFwgyfYPCCBAgAABAgTWAh81dWyx0gFwKAAAAABJRU5ErkJggg==
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAOklEQVRYR+3WoREAMAwDsWb/UQtCy9wxTOQJ/oQ8SXKKGwEECBAgQIBAXeDt7f4BAQQIECBAgEBb4AOz8Hzx7WLY4wAAAABJRU5ErkJggg==
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+1XwW7CMAy1+f9fZOMysSEOEweEOPRNdm3HbdOyIhAcklPrOs/PLy9RygBALxzcCDQFmgJNgaZAU6Ap0BR4PwX8gsRMVLssMRH5HcpzJEaWL7EVg9F1IHRlyqQohgVr4FGUlUcMJSjcUlDw0zvjeun70cLWmneoyf7NgBTQSniBTQQSuJAZsOnnaczjIMb5hCiuHKxokCrJfVnrctyZL0PkJAJe1HMil4nxeyi3Ypfn1kX51jpPvo/JeCNC4PhVdHdJw2XjBR8brF8PEIhNVn12AgP7uHsTBguBn53MUZCqv7Lp07Pn5k1Ro+uWmUNn7D+M57rtk7aG0Vo73xyF/fbFf0bPJjDXngnGocDTdFhygZjwUQrMNrDcmZlQT50VJ/g/UwNyHpu778+yW+/ksOz/BFo54P4AsUXMfRq7XWsAAAAASUVORK5CYII=
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACMElEQVRYR+2Xv4pTQRTGf2dubhLdICiii2KnYKHVolhauKWPoGAnNr6BD6CvIVaihYuI2i1ia0B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VRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=
'
,
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=
'
];
THREE
.
MMDLoader
.
prototype
.
load
=
function
(
modelUrl
,
vmdUrls
,
callback
,
onProgress
,
onError
)
{
...
...
@@ -2075,8 +2088,26 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress
}
var
directoryPath
=
(
params
.
defaultTexturePath
===
true
)
?
scope
.
defaultTexturePath
:
texturePath
;
var
fullPath
=
directoryPath
+
filePath
;
var
fullPath
;
if
(
params
.
defaultTexturePath
===
true
)
{
try
{
fullPath
=
scope
.
defaultToonTextures
[
parseInt
(
filePath
.
match
(
'
toon([0-9]{2})
\
.bmp$
'
)[
1
]
)
];
}
catch
(
e
)
{
console
.
warn
(
'
THREE.MMDLoader:
'
+
filePath
+
'
seems like not right default texture path. Using toon00.bmp instead.
'
)
fullPath
=
scope
.
defaultToonTextures
[
0
];
}
}
else
{
fullPath
=
texturePath
+
filePath
;
}
var
loader
=
THREE
.
Loader
.
Handlers
.
get
(
fullPath
);
...
...
examples/models/mmd/default/toon00.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon01.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon02.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon03.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon04.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon05.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon06.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon07.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon08.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon09.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/models/mmd/default/toon10.bmp
已删除
100644 → 0
浏览文件 @
9ed5d1a3
3.1 KB
examples/webgl_loader_mmd.html
浏览文件 @
3a44a065
...
...
@@ -109,7 +109,6 @@
helper
=
new
THREE
.
MMDHelper
(
renderer
);
var
loader
=
new
THREE
.
MMDLoader
();
loader
.
setDefaultTexturePath
(
'
./models/mmd/default/
'
);
loader
.
load
(
modelFile
,
vmdFiles
,
function
(
object
)
{
...
...
examples/webgl_loader_mmd_audio.html
浏览文件 @
3a44a065
...
...
@@ -117,7 +117,6 @@
helper
=
new
THREE
.
MMDHelper
(
renderer
);
var
loader
=
new
THREE
.
MMDLoader
();
loader
.
setDefaultTexturePath
(
'
./models/mmd/default/
'
);
loader
.
load
(
modelFile
,
vmdFiles
,
function
(
object
)
{
...
...
examples/webgl_loader_mmd_pose.html
浏览文件 @
3a44a065
...
...
@@ -126,7 +126,6 @@
helper
=
new
THREE
.
MMDHelper
(
renderer
);
var
loader
=
new
THREE
.
MMDLoader
();
loader
.
setDefaultTexturePath
(
'
./models/mmd/default/
'
);
loader
.
loadModel
(
modelFile
,
function
(
object
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录