Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
b00c5840
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,发现更多精彩内容 >>
未验证
提交
b00c5840
编写于
4月 11, 2020
作者:
G
Guilherme Avila
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
EXRLoader: fix int32 parsing
上级
7feede6b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
10 deletion
+30
-10
examples/js/loaders/EXRLoader.js
examples/js/loaders/EXRLoader.js
+15
-5
examples/jsm/loaders/EXRLoader.js
examples/jsm/loaders/EXRLoader.js
+15
-5
未找到文件。
examples/js/loaders/EXRLoader.js
浏览文件 @
b00c5840
...
...
@@ -1610,7 +1610,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
function
parseRational
(
dataView
,
offset
)
{
var
x
=
parse
Ui
nt32
(
dataView
,
offset
);
var
x
=
parse
I
nt32
(
dataView
,
offset
);
var
y
=
parseUint32
(
dataView
,
offset
);
return
[
x
,
y
];
...
...
@@ -1626,6 +1626,16 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
}
function
parseInt32
(
dataView
,
offset
)
{
var
Int32
=
dataView
.
getInt32
(
offset
.
value
,
true
);
offset
.
value
=
offset
.
value
+
INT32_SIZE
;
return
Int32
;
}
function
parseUint32
(
dataView
,
offset
)
{
var
Uint32
=
dataView
.
getUint32
(
offset
.
value
,
true
);
...
...
@@ -1773,11 +1783,11 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
while
(
offset
.
value
<
(
startOffset
+
size
-
1
)
)
{
var
name
=
parseNullTerminatedString
(
buffer
,
offset
);
var
pixelType
=
parse
Uint32
(
dataView
,
offset
);
// TODO: Cast this to UINT, HALF or FLOAT
var
pixelType
=
parse
Int32
(
dataView
,
offset
);
var
pLinear
=
parseUint8
(
dataView
,
offset
);
offset
.
value
+=
3
;
// reserved, three chars
var
xSampling
=
parse
Ui
nt32
(
dataView
,
offset
);
var
ySampling
=
parse
Ui
nt32
(
dataView
,
offset
);
var
xSampling
=
parse
I
nt32
(
dataView
,
offset
);
var
ySampling
=
parse
I
nt32
(
dataView
,
offset
);
channels
.
push
(
{
name
:
name
,
...
...
@@ -1899,7 +1909,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
}
else
if
(
type
===
'
int
'
)
{
return
parse
Ui
nt32
(
dataView
,
offset
);
return
parse
I
nt32
(
dataView
,
offset
);
}
else
if
(
type
===
'
rational
'
)
{
...
...
examples/jsm/loaders/EXRLoader.js
浏览文件 @
b00c5840
...
...
@@ -1625,7 +1625,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
function
parseRational
(
dataView
,
offset
)
{
var
x
=
parse
Ui
nt32
(
dataView
,
offset
);
var
x
=
parse
I
nt32
(
dataView
,
offset
);
var
y
=
parseUint32
(
dataView
,
offset
);
return
[
x
,
y
];
...
...
@@ -1641,6 +1641,16 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
}
function
parseInt32
(
dataView
,
offset
)
{
var
Int32
=
dataView
.
getInt32
(
offset
.
value
,
true
);
offset
.
value
=
offset
.
value
+
INT32_SIZE
;
return
Int32
;
}
function
parseUint32
(
dataView
,
offset
)
{
var
Uint32
=
dataView
.
getUint32
(
offset
.
value
,
true
);
...
...
@@ -1788,11 +1798,11 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
while
(
offset
.
value
<
(
startOffset
+
size
-
1
)
)
{
var
name
=
parseNullTerminatedString
(
buffer
,
offset
);
var
pixelType
=
parse
Uint32
(
dataView
,
offset
);
// TODO: Cast this to UINT, HALF or FLOAT
var
pixelType
=
parse
Int32
(
dataView
,
offset
);
var
pLinear
=
parseUint8
(
dataView
,
offset
);
offset
.
value
+=
3
;
// reserved, three chars
var
xSampling
=
parse
Ui
nt32
(
dataView
,
offset
);
var
ySampling
=
parse
Ui
nt32
(
dataView
,
offset
);
var
xSampling
=
parse
I
nt32
(
dataView
,
offset
);
var
ySampling
=
parse
I
nt32
(
dataView
,
offset
);
channels
.
push
(
{
name
:
name
,
...
...
@@ -1914,7 +1924,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
}
else
if
(
type
===
'
int
'
)
{
return
parse
Ui
nt32
(
dataView
,
offset
);
return
parse
I
nt32
(
dataView
,
offset
);
}
else
if
(
type
===
'
rational
'
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录