Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
f5cd1d16
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,发现更多精彩内容 >>
提交
f5cd1d16
编写于
6月 15, 2017
作者:
K
kchapelier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
simplify the API by replacing * in the url by le or be depending on the platform's endianness
上级
0f93f98b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
13 addition
and
19 deletion
+13
-19
examples/js/loaders/PRWMLoader.js
examples/js/loaders/PRWMLoader.js
+2
-6
examples/models/prwm/faceted-nefertiti.be.prwm
examples/models/prwm/faceted-nefertiti.be.prwm
+0
-0
examples/models/prwm/faceted-nefertiti.le.prwm
examples/models/prwm/faceted-nefertiti.le.prwm
+0
-0
examples/models/prwm/smooth-suzanne.be.prwm
examples/models/prwm/smooth-suzanne.be.prwm
+0
-0
examples/models/prwm/smooth-suzanne.le.prwm
examples/models/prwm/smooth-suzanne.le.prwm
+0
-0
examples/models/prwm/vive-controller.be.prwm
examples/models/prwm/vive-controller.be.prwm
+0
-0
examples/models/prwm/vive-controller.le.prwm
examples/models/prwm/vive-controller.le.prwm
+0
-0
examples/webgl_loader_prwm.html
examples/webgl_loader_prwm.html
+11
-13
未找到文件。
examples/js/loaders/PRWMLoader.js
浏览文件 @
f5cd1d16
...
...
@@ -243,6 +243,8 @@
var
loader
=
new
THREE
.
FileLoader
(
scope
.
manager
);
loader
.
setResponseType
(
'
arraybuffer
'
);
url
=
url
.
replace
(
/
\*
/g
,
isBigEndianPlatform
()
?
'
be
'
:
'
le
'
);
loader
.
load
(
url
,
function
(
arrayBuffer
)
{
onLoad
(
scope
.
parse
(
arrayBuffer
)
);
...
...
@@ -251,12 +253,6 @@
},
loadBest
:
function
(
urlLittleEndian
,
urlBigEndian
,
onLoad
,
onProgress
,
onError
)
{
this
.
load
(
(
isBigEndianPlatform
()
?
urlBigEndian
:
urlLittleEndian
),
onLoad
,
onProgress
,
onError
);
},
parse
:
function
(
arrayBuffer
)
{
console
.
time
(
'
PRWMLoader
'
);
...
...
examples/models/prwm/faceted-nefertiti
-BE
.prwm
→
examples/models/prwm/faceted-nefertiti
.be
.prwm
浏览文件 @
f5cd1d16
文件已移动
examples/models/prwm/faceted-nefertiti
-LE
.prwm
→
examples/models/prwm/faceted-nefertiti
.le
.prwm
浏览文件 @
f5cd1d16
文件已移动
examples/models/prwm/smooth-suzanne
-BE
.prwm
→
examples/models/prwm/smooth-suzanne
.be
.prwm
浏览文件 @
f5cd1d16
文件已移动
examples/models/prwm/smooth-suzanne
-LE
.prwm
→
examples/models/prwm/smooth-suzanne
.le
.prwm
浏览文件 @
f5cd1d16
文件已移动
examples/models/prwm/vive-controller
-BE
.prwm
→
examples/models/prwm/vive-controller
.be
.prwm
浏览文件 @
f5cd1d16
文件已移动
examples/models/prwm/vive-controller
-LE
.prwm
→
examples/models/prwm/vive-controller
.le
.prwm
浏览文件 @
f5cd1d16
文件已移动
examples/webgl_loader_prwm.html
浏览文件 @
f5cd1d16
...
...
@@ -39,13 +39,11 @@
.models
strong
{
color
:
#FFFFFF
;
text-transform
:
uppercase
;
display
:
inline-block
;
min-width
:
120px
;
}
.models
a
,
.models
a
:visited
{
color
:
#FFFFFF
;
margin-
righ
t
:
12px
;
margin-
lef
t
:
12px
;
text-decoration
:
none
;
}
...
...
@@ -59,18 +57,17 @@
<div
class=
"models"
>
<strong>
Little-Endian
</strong>
<a
class=
"model"
href=
"./models/prwm/faceted-nefertiti-LE.prwm"
>
Faceted Nefertiti
</a>
<a
class=
"model"
href=
"./models/prwm/smooth-suzanne-LE.prwm"
>
Smooth Suzanne
</a>
<a
class=
"model"
href=
"./models/prwm/vive-controller-LE.prwm"
>
Vive Controller
</a><br>
<strong>
Big-Endian
</strong>
<a
class=
"model"
href=
"./models/prwm/faceted-nefertiti-BE.prwm"
>
Faceted Nefertiti
</a>
<a
class=
"model"
href=
"./models/prwm/smooth-suzanne-BE.prwm"
>
Smooth Suzanne
</a>
<a
class=
"model"
href=
"./models/prwm/vive-controller-BE.prwm"
>
Vive Controller
</a>
<strong>
Models
</strong>
<a
class=
"model"
href=
"models/prwm/faceted-nefertiti.*.prwm"
>
Faceted Nefertiti
</a>
<a
class=
"model"
href=
"models/prwm/smooth-suzanne.*.prwm"
>
Smooth Suzanne
</a>
<a
class=
"model"
href=
"models/prwm/vive-controller.*.prwm"
>
Vive Controller
</a>
</div>
<div
class=
"notes"
>
The parsing of PRWM file is especially fast when the endianness of the file is the same as the endianness
of the client platform. This platform endianness is
<strong
id=
"endianness"
></strong>
.
<br><br>
of the client platform. The loader will automatically replace the
<strong>
*
</strong>
in the model url
by either
<strong>
le
</strong>
or
<strong>
be
</strong>
depending on the client platform's endianness to
download the most appropriate file.
<br><br>
This platform endianness is
<strong
id=
"endianness"
></strong>
.
<br><br>
See your console for stats.
<br><br>
<a
href=
"https://github.com/kchapelier/PRWM"
target=
"_blank"
>
Specifications and implementations
</a>
</div>
...
...
@@ -201,7 +198,8 @@
//
loadGeometry
(
'
./models/prwm/smooth-suzanne-LE.prwm
'
);
// * is automatically replaced by 'le' or 'be' depending on the client platform's endianness
loadGeometry
(
'
./models/prwm/smooth-suzanne.*.prwm
'
);
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录