Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
db548187
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,发现更多精彩内容 >>
提交
db548187
编写于
2月 13, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code clean up.
上级
8b74317c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
14 deletion
+14
-14
examples/js/loaders/ctm/CTMLoader.js
examples/js/loaders/ctm/CTMLoader.js
+8
-8
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+6
-6
未找到文件。
examples/js/loaders/ctm/CTMLoader.js
浏览文件 @
db548187
...
...
@@ -116,8 +116,8 @@ THREE.CTMLoader.prototype.load = function( url, callback, parameters ) {
var
ctmFile
=
files
[
i
];
var
e1
=
Date
.
now
();
// console.log( "CTM data parse time [worker]: " + (e1-s) + " ms" );
var
e1
=
Date
.
now
();
// console.log( "CTM data parse time [worker]: " + (e1-s) + " ms" );
if
(
useBuffers
)
{
...
...
@@ -129,8 +129,8 @@ THREE.CTMLoader.prototype.load = function( url, callback, parameters ) {
}
var
e
=
Date
.
now
();
console
.
log
(
"
model load time [worker]:
"
+
(
e
-
e1
)
+
"
ms, total:
"
+
(
e
-
s
));
var
e
=
Date
.
now
();
console
.
log
(
"
model load time [worker]:
"
+
(
e
-
e1
)
+
"
ms, total:
"
+
(
e
-
s
));
}
...
...
@@ -229,7 +229,7 @@ THREE.CTMLoader.prototype.createModelBuffers = function ( file, callback ) {
// attributes
var
attributes
=
scope
.
attributes
;
attributes
[
"
index
"
]
=
{
itemSize
:
1
,
array
:
vertexIndexArray
};
attributes
[
"
index
"
]
=
{
itemSize
:
1
,
array
:
vertexIndexArray
};
attributes
[
"
position
"
]
=
{
itemSize
:
3
,
array
:
vertexPositionArray
};
if
(
vertexNormalArray
!==
undefined
)
...
...
@@ -432,15 +432,15 @@ THREE.CTMLoader.prototype.createModelClassic = function ( file, callback ) {
function
f3n
(
scope
,
normals
,
a
,
b
,
c
,
mi
,
nai
,
nbi
,
nci
)
{
var
nax
=
normals
[
nai
*
3
],
var
nax
=
normals
[
nai
*
3
],
nay
=
normals
[
nai
*
3
+
1
],
naz
=
normals
[
nai
*
3
+
2
],
nbx
=
normals
[
nbi
*
3
],
nbx
=
normals
[
nbi
*
3
],
nby
=
normals
[
nbi
*
3
+
1
],
nbz
=
normals
[
nbi
*
3
+
2
],
ncx
=
normals
[
nci
*
3
],
ncx
=
normals
[
nci
*
3
],
ncy
=
normals
[
nci
*
3
+
1
],
ncz
=
normals
[
nci
*
3
+
2
];
...
...
src/core/BufferGeometry.js
浏览文件 @
db548187
...
...
@@ -273,15 +273,15 @@ THREE.BufferGeometry.prototype = {
ab
.
subVectors
(
pA
,
pB
);
cb
.
cross
(
ab
);
normals
[
vA
*
3
]
+=
cb
.
x
;
normals
[
vA
*
3
]
+=
cb
.
x
;
normals
[
vA
*
3
+
1
]
+=
cb
.
y
;
normals
[
vA
*
3
+
2
]
+=
cb
.
z
;
normals
[
vB
*
3
]
+=
cb
.
x
;
normals
[
vB
*
3
]
+=
cb
.
x
;
normals
[
vB
*
3
+
1
]
+=
cb
.
y
;
normals
[
vB
*
3
+
2
]
+=
cb
.
z
;
normals
[
vC
*
3
]
+=
cb
.
x
;
normals
[
vC
*
3
]
+=
cb
.
x
;
normals
[
vC
*
3
+
1
]
+=
cb
.
y
;
normals
[
vC
*
3
+
2
]
+=
cb
.
z
;
...
...
@@ -314,7 +314,7 @@ THREE.BufferGeometry.prototype = {
ab
.
subVectors
(
pA
,
pB
);
cb
.
cross
(
ab
);
normals
[
i
]
=
cb
.
x
;
normals
[
i
]
=
cb
.
x
;
normals
[
i
+
1
]
=
cb
.
y
;
normals
[
i
+
2
]
=
cb
.
z
;
...
...
@@ -352,7 +352,7 @@ THREE.BufferGeometry.prototype = {
n
=
1.0
/
Math
.
sqrt
(
x
*
x
+
y
*
y
+
z
*
z
);
normals
[
i
]
*=
n
;
normals
[
i
]
*=
n
;
normals
[
i
+
1
]
*=
n
;
normals
[
i
+
2
]
*=
n
;
...
...
@@ -530,7 +530,7 @@ THREE.BufferGeometry.prototype = {
test
=
tmp2
.
dot
(
tan2
[
v
]
);
w
=
(
test
<
0.0
)
?
-
1.0
:
1.0
;
tangents
[
v
*
4
]
=
tmp
.
x
;
tangents
[
v
*
4
]
=
tmp
.
x
;
tangents
[
v
*
4
+
1
]
=
tmp
.
y
;
tangents
[
v
*
4
+
2
]
=
tmp
.
z
;
tangents
[
v
*
4
+
3
]
=
w
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录