Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c2083af0
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,发现更多精彩内容 >>
提交
c2083af0
编写于
1月 22, 2017
作者:
T
Tristan VALCKE
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Protect Geometry against the closure circular reference bug
上级
c4cb5817
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
27 deletion
+26
-27
src/core/Geometry.js
src/core/Geometry.js
+26
-27
未找到文件。
src/core/Geometry.js
浏览文件 @
c2083af0
...
@@ -59,7 +59,7 @@ function Geometry() {
...
@@ -59,7 +59,7 @@ function Geometry() {
}
}
Geometry
.
prototype
=
{
Object
.
assign
(
Geometry
.
prototype
,
EventDispatcher
.
prototype
,
{
constructor
:
Geometry
,
constructor
:
Geometry
,
...
@@ -714,15 +714,15 @@ Geometry.prototype = {
...
@@ -714,15 +714,15 @@ Geometry.prototype = {
}
}
var
normalMatrix
,
var
normalMatrix
,
vertexOffset
=
this
.
vertices
.
length
,
vertexOffset
=
this
.
vertices
.
length
,
vertices1
=
this
.
vertices
,
vertices1
=
this
.
vertices
,
vertices2
=
geometry
.
vertices
,
vertices2
=
geometry
.
vertices
,
faces1
=
this
.
faces
,
faces1
=
this
.
faces
,
faces2
=
geometry
.
faces
,
faces2
=
geometry
.
faces
,
uvs1
=
this
.
faceVertexUvs
[
0
],
uvs1
=
this
.
faceVertexUvs
[
0
],
uvs2
=
geometry
.
faceVertexUvs
[
0
],
uvs2
=
geometry
.
faceVertexUvs
[
0
],
colors1
=
this
.
colors
,
colors1
=
this
.
colors
,
colors2
=
geometry
.
colors
;
colors2
=
geometry
.
colors
;
if
(
materialIndexOffset
===
undefined
)
materialIndexOffset
=
0
;
if
(
materialIndexOffset
===
undefined
)
materialIndexOffset
=
0
;
...
@@ -759,8 +759,8 @@ Geometry.prototype = {
...
@@ -759,8 +759,8 @@ Geometry.prototype = {
for
(
i
=
0
,
il
=
faces2
.
length
;
i
<
il
;
i
++
)
{
for
(
i
=
0
,
il
=
faces2
.
length
;
i
<
il
;
i
++
)
{
var
face
=
faces2
[
i
],
faceCopy
,
normal
,
color
,
var
face
=
faces2
[
i
],
faceCopy
,
normal
,
color
,
faceVertexNormals
=
face
.
vertexNormals
,
faceVertexNormals
=
face
.
vertexNormals
,
faceVertexColors
=
face
.
vertexColors
;
faceVertexColors
=
face
.
vertexColors
;
faceCopy
=
new
Face3
(
face
.
a
+
vertexOffset
,
face
.
b
+
vertexOffset
,
face
.
c
+
vertexOffset
);
faceCopy
=
new
Face3
(
face
.
a
+
vertexOffset
,
face
.
b
+
vertexOffset
,
face
.
c
+
vertexOffset
);
faceCopy
.
normal
.
copy
(
face
.
normal
);
faceCopy
.
normal
.
copy
(
face
.
normal
);
...
@@ -1171,28 +1171,28 @@ Geometry.prototype = {
...
@@ -1171,28 +1171,28 @@ Geometry.prototype = {
clone
:
function
()
{
clone
:
function
()
{
/*
/*
// Handle primitives
// Handle primitives
var parameters = this.parameters;
var parameters = this.parameters;
if ( parameters !== undefined ) {
if ( parameters !== undefined ) {
var values = [];
var values = [];
for ( var key in parameters ) {
for ( var key in parameters ) {
values.push( parameters[ key ] );
values.push( parameters[ key ] );
}
}
var geometry = Object.create( this.constructor.prototype );
var geometry = Object.create( this.constructor.prototype );
this.constructor.apply( geometry, values );
this.constructor.apply( geometry, values );
return geometry;
return geometry;
}
}
return new this.constructor().copy( this );
return new this.constructor().copy( this );
*/
*/
return
new
Geometry
().
copy
(
this
);
return
new
Geometry
().
copy
(
this
);
...
@@ -1267,8 +1267,7 @@ Geometry.prototype = {
...
@@ -1267,8 +1267,7 @@ Geometry.prototype = {
}
}
};
}
)
;
Object
.
assign
(
Geometry
.
prototype
,
EventDispatcher
.
prototype
);
export
{
GeometryIdCount
,
Geometry
};
export
{
GeometryIdCount
,
Geometry
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录