Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c1faad5b
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,发现更多精彩内容 >>
提交
c1faad5b
编写于
3月 26, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Converted space indents to tabs. See #6252.
上级
645c8f37
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
153 addition
and
153 deletion
+153
-153
src/cameras/OrthographicCamera.js
src/cameras/OrthographicCamera.js
+1
-1
src/cameras/PerspectiveCamera.js
src/cameras/PerspectiveCamera.js
+1
-1
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+12
-12
src/core/Geometry.js
src/core/Geometry.js
+10
-10
src/core/Object3D.js
src/core/Object3D.js
+57
-57
src/lights/AmbientLight.js
src/lights/AmbientLight.js
+4
-4
src/lights/DirectionalLight.js
src/lights/DirectionalLight.js
+6
-6
src/lights/HemisphereLight.js
src/lights/HemisphereLight.js
+3
-3
src/lights/PointLight.js
src/lights/PointLight.js
+3
-3
src/lights/SpotLight.js
src/lights/SpotLight.js
+3
-3
src/materials/Material.js
src/materials/Material.js
+10
-10
src/materials/MeshBasicMaterial.js
src/materials/MeshBasicMaterial.js
+4
-4
src/materials/MeshDepthMaterial.js
src/materials/MeshDepthMaterial.js
+3
-3
src/materials/MeshLambertMaterial.js
src/materials/MeshLambertMaterial.js
+6
-6
src/materials/MeshNormalMaterial.js
src/materials/MeshNormalMaterial.js
+3
-3
src/materials/MeshPhongMaterial.js
src/materials/MeshPhongMaterial.js
+8
-8
src/materials/PointCloudMaterial.js
src/materials/PointCloudMaterial.js
+5
-5
src/materials/ShaderMaterial.js
src/materials/ShaderMaterial.js
+3
-3
src/materials/SpriteMaterial.js
src/materials/SpriteMaterial.js
+1
-1
src/objects/Line.js
src/objects/Line.js
+3
-3
src/objects/Mesh.js
src/objects/Mesh.js
+3
-3
src/objects/PointCloud.js
src/objects/PointCloud.js
+2
-2
src/objects/Sprite.js
src/objects/Sprite.js
+2
-2
未找到文件。
src/cameras/OrthographicCamera.js
浏览文件 @
c1faad5b
...
...
@@ -70,4 +70,4 @@ THREE.OrthographicCamera.prototype.toJSON = function ( meta ) {
return
data
;
};
\ No newline at end of file
};
src/cameras/PerspectiveCamera.js
浏览文件 @
c1faad5b
...
...
@@ -152,4 +152,4 @@ THREE.PerspectiveCamera.prototype.toJSON = function ( meta ) {
return
data
;
};
\ No newline at end of file
};
src/core/BufferGeometry.js
浏览文件 @
c1faad5b
...
...
@@ -876,25 +876,25 @@ THREE.BufferGeometry.prototype = {
toJSON
:
function
()
{
// we will store all serialization data on 'data'
var
data
=
{};
// we will store all serialization data on 'data'
var
data
=
{};
// add metadata
data
.
metadata
=
{
// add metadata
data
.
metadata
=
{
version
:
4.4
,
type
:
'
BufferGeometry
'
,
generator
:
'
BufferGeometry.toJSON
'
}
// standard BufferGeometry serialization
// standard BufferGeometry serialization
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
data
.
data
=
{};
data
.
data
.
attributes
=
{};
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
data
.
data
=
{};
data
.
data
.
attributes
=
{};
var
attributes
=
this
.
attributes
;
var
attributes
=
this
.
attributes
;
var
offsets
=
this
.
offsets
;
var
boundingSphere
=
this
.
boundingSphere
;
...
...
@@ -927,7 +927,7 @@ THREE.BufferGeometry.prototype = {
}
return
data
;
return
data
;
},
...
...
src/core/Geometry.js
浏览文件 @
c1faad5b
...
...
@@ -799,23 +799,23 @@ THREE.Geometry.prototype = {
toJSON
:
function
()
{
// we will store all serialization data on 'data'
var
data
=
{};
// we will store all serialization data on 'data'
var
data
=
{};
// add metadata
data
.
metadata
=
{
// add metadata
data
.
metadata
=
{
version
:
4.4
,
type
:
'
Geometry
'
,
generator
:
'
Geometry.toJSON
'
};
// standard Geometry serialization
// standard Geometry serialization
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
if
(
this
.
parameters
!==
undefined
)
{
if
(
this
.
parameters
!==
undefined
)
{
var
parameters
=
this
.
parameters
;
...
...
@@ -996,7 +996,7 @@ THREE.Geometry.prototype = {
if
(
uvs
.
length
>
0
)
data
.
data
.
uvs
=
[
uvs
];
// temporal backward compatibility
data
.
data
.
faces
=
faces
;
return
data
;
return
data
;
},
...
...
src/core/Object3D.js
浏览文件 @
c1faad5b
...
...
@@ -571,85 +571,85 @@ THREE.Object3D.prototype = {
var
isRootObject
=
(
meta
===
undefined
);
// we will store all serialization data on 'data'
var
data
=
{};
var
metadata
;
// meta is a hash used to collect geometries, materials.
// not providing it implies that this is the root object
// being serialized.
if
(
isRootObject
)
{
// initialize meta obj
meta
=
{
geometries
:
{},
materials
:
{}
}
// add metadata
metadata
=
{
// we will store all serialization data on 'data'
var
data
=
{};
var
metadata
;
// meta is a hash used to collect geometries, materials.
// not providing it implies that this is the root object
// being serialized.
if
(
isRootObject
)
{
// initialize meta obj
meta
=
{
geometries
:
{},
materials
:
{}
}
// add metadata
metadata
=
{
version
:
4.4
,
type
:
'
Object
'
,
generator
:
'
Object3D.toJSON
'
}
}
// standard Object3D serialization
}
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
if
(
JSON
.
stringify
(
this
.
userData
)
!==
'
{}
'
)
data
.
userData
=
this
.
userData
;
if
(
this
.
visible
!==
true
)
data
.
visible
=
this
.
visible
;
// standard Object3D serialization
data
.
matrix
=
this
.
matrix
.
toArray
();
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
if
(
JSON
.
stringify
(
this
.
userData
)
!==
'
{}
'
)
data
.
userData
=
this
.
userData
;
if
(
this
.
visible
!==
true
)
data
.
visible
=
this
.
visible
;
if
(
this
.
children
.
length
>
0
)
{
data
.
matrix
=
this
.
matrix
.
toArray
();
data
.
children
=
[];
if
(
this
.
children
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
data
.
children
=
[];
data
.
children
.
push
(
this
.
children
[
i
].
toJSON
(
meta
).
object
);
for
(
var
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
}
data
.
children
.
push
(
this
.
children
[
i
].
toJSON
(
meta
).
object
);
}
}
// wrap serialized object with additional data
}
var
output
;
// wrap serialized object with additional data
if
(
isRootObject
)
{
var
output
;
output
=
{
metadata
:
metadata
,
geometries
:
extractFromCache
(
meta
.
geometries
),
materials
:
extractFromCache
(
meta
.
materials
),
object
:
data
};
if
(
isRootObject
)
{
}
else
{
output
=
{
metadata
:
metadata
,
geometries
:
extractFromCache
(
meta
.
geometries
),
materials
:
extractFromCache
(
meta
.
materials
),
object
:
data
};
output
=
{
object
:
data
};
}
else
{
}
output
=
{
object
:
data
};
return
output
;
}
// extract data from the cache hash
// remove metadata on each item
// and return as array
function
extractFromCache
(
cache
)
{
var
values
=
[];
for
(
var
key
in
cache
)
{
var
data
=
cache
[
key
];
delete
data
.
metadata
;
values
.
push
(
data
);
}
return
values
;
}
return
output
;
// extract data from the cache hash
// remove metadata on each item
// and return as array
function
extractFromCache
(
cache
)
{
var
values
=
[];
for
(
var
key
in
cache
)
{
var
data
=
cache
[
key
];
delete
data
.
metadata
;
values
.
push
(
data
);
}
return
values
;
}
},
...
...
src/lights/AmbientLight.js
浏览文件 @
c1faad5b
...
...
@@ -25,10 +25,10 @@ THREE.AmbientLight.prototype.clone = function () {
THREE
.
AmbientLight
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
data
.
object
.
color
=
this
.
color
.
getHex
();
data
.
object
.
color
=
this
.
color
.
getHex
();
return
data
;
return
data
;
};
\ No newline at end of file
};
src/lights/DirectionalLight.js
浏览文件 @
c1faad5b
...
...
@@ -47,7 +47,7 @@ THREE.DirectionalLight = function ( color, intensity ) {
this
.
shadowCascadeHeight
=
[
512
,
512
,
512
];
this
.
shadowCascadeNearZ
=
[
-
1.000
,
0.990
,
0.998
];
this
.
shadowCascadeFarZ
=
[
0.990
,
0.998
,
1.000
];
this
.
shadowCascadeFarZ
=
[
0.990
,
0.998
,
1.000
];
this
.
shadowCascadeArray
=
[];
...
...
@@ -106,7 +106,7 @@ THREE.DirectionalLight.prototype.clone = function () {
light
.
shadowCascadeHeight
=
this
.
shadowCascadeHeight
.
slice
(
0
);
light
.
shadowCascadeNearZ
=
this
.
shadowCascadeNearZ
.
slice
(
0
);
light
.
shadowCascadeFarZ
=
this
.
shadowCascadeFarZ
.
slice
(
0
);
light
.
shadowCascadeFarZ
=
this
.
shadowCascadeFarZ
.
slice
(
0
);
return
light
;
...
...
@@ -114,11 +114,11 @@ THREE.DirectionalLight.prototype.clone = function () {
THREE
.
DirectionalLight
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
data
.
object
.
color
=
this
.
color
.
getHex
();
data
.
object
.
color
=
this
.
color
.
getHex
();
data
.
object
.
intensity
=
this
.
intensity
;
return
data
;
return
data
;
};
\ No newline at end of file
};
src/lights/HemisphereLight.js
浏览文件 @
c1faad5b
...
...
@@ -33,11 +33,11 @@ THREE.HemisphereLight.prototype.clone = function () {
THREE
.
HemisphereLight
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
data
.
object
.
color
=
this
.
color
.
getHex
();
data
.
object
.
groundColor
=
this
.
groundColor
.
getHex
();
return
data
;
return
data
;
};
\ No newline at end of file
};
src/lights/PointLight.js
浏览文件 @
c1faad5b
...
...
@@ -33,13 +33,13 @@ THREE.PointLight.prototype.clone = function () {
THREE
.
PointLight
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
data
.
object
.
color
=
this
.
color
.
getHex
();
data
.
object
.
intensity
=
this
.
intensity
;
data
.
object
.
distance
=
this
.
distance
;
data
.
object
.
decay
=
this
.
decay
;
return
data
;
return
data
;
};
\ No newline at end of file
};
src/lights/SpotLight.js
浏览文件 @
c1faad5b
...
...
@@ -83,7 +83,7 @@ THREE.SpotLight.prototype.clone = function () {
THREE
.
SpotLight
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
data
.
object
.
color
=
this
.
color
.
getHex
();
data
.
object
.
intensity
=
this
.
intensity
;
...
...
@@ -92,6 +92,6 @@ THREE.SpotLight.prototype.toJSON = function ( meta ) {
data
.
object
.
exponent
=
this
.
exponent
;
data
.
object
.
decay
=
this
.
decay
;
return
data
;
return
data
;
};
\ No newline at end of file
};
src/materials/Material.js
浏览文件 @
c1faad5b
...
...
@@ -109,26 +109,26 @@ THREE.Material.prototype = {
toJSON
:
function
()
{
// we will store all serialization data on 'data'
var
data
=
{};
// we will store all serialization data on 'data'
var
data
=
{};
// add metadata
data
.
metadata
=
{
// add metadata
data
.
metadata
=
{
version
:
4.4
,
type
:
'
Material
'
,
generator
:
'
Material.toJSON
'
}
// standard Material serialization
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
// standard Material serialization
data
.
type
=
this
.
type
;
data
.
uuid
=
this
.
uuid
;
if
(
this
.
name
!==
''
)
data
.
name
=
this
.
name
;
if
(
this
.
opacity
<
1
)
data
.
opacity
=
this
.
opacity
;
if
(
this
.
opacity
<
1
)
data
.
opacity
=
this
.
opacity
;
if
(
this
.
transparent
!==
false
)
data
.
transparent
=
this
.
transparent
;
if
(
this
.
wireframe
!==
false
)
data
.
wireframe
=
this
.
wireframe
;
return
data
;
return
data
;
},
...
...
src/materials/MeshBasicMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -121,10 +121,10 @@ THREE.MeshBasicMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
data
.
color
=
this
.
color
.
getHex
();
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
return
data
;
};
\ No newline at end of file
};
src/materials/MeshDepthMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -48,9 +48,9 @@ THREE.MeshDepthMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
return
data
;
};
\ No newline at end of file
};
src/materials/MeshLambertMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -134,12 +134,12 @@ THREE.MeshLambertMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
data
.
color
=
this
.
color
.
getHex
();
data
.
emissive
=
this
.
emissive
.
getHex
();
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
shading
!==
THREE
.
SmoothShading
)
data
.
shading
=
this
.
shading
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
data
.
emissive
=
this
.
emissive
.
getHex
();
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
shading
!==
THREE
.
SmoothShading
)
data
.
shading
=
this
.
shading
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
return
data
;
};
\ No newline at end of file
};
src/materials/MeshNormalMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -49,9 +49,9 @@ THREE.MeshPhongMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
return
data
;
};
\ No newline at end of file
};
src/materials/MeshPhongMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -174,15 +174,15 @@ THREE.MeshPhongMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
data
.
color
=
this
.
color
.
getHex
();
data
.
emissive
=
this
.
emissive
.
getHex
();
data
.
specular
=
this
.
specular
.
getHex
();
data
.
shininess
=
this
.
shininess
;
data
.
emissive
=
this
.
emissive
.
getHex
();
data
.
specular
=
this
.
specular
.
getHex
();
data
.
shininess
=
this
.
shininess
;
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
shading
!==
THREE
.
SmoothShading
)
data
.
shading
=
this
.
shading
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
shading
!==
THREE
.
SmoothShading
)
data
.
shading
=
this
.
shading
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
return
data
;
};
\ No newline at end of file
};
src/materials/PointCloudMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -69,12 +69,12 @@ THREE.MeshDepthMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
data
.
size
=
this
.
size
;
data
.
sizeAttenuation
=
this
.
sizeAttenuation
;
data
.
color
=
this
.
color
.
getHex
();
data
.
size
=
this
.
size
;
data
.
sizeAttenuation
=
this
.
sizeAttenuation
;
data
.
color
=
this
.
color
.
getHex
();
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
return
data
;
...
...
src/materials/ShaderMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -114,9 +114,9 @@ THREE.ShaderMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
data
.
uniforms
=
this
.
uniforms
;
data
.
vertexShader
=
this
.
vertexShader
;
data
.
fragmentShader
=
this
.
fragmentShader
;
data
.
uniforms
=
this
.
uniforms
;
data
.
vertexShader
=
this
.
vertexShader
;
data
.
fragmentShader
=
this
.
fragmentShader
;
return
data
;
...
...
src/materials/SpriteMaterial.js
浏览文件 @
c1faad5b
...
...
@@ -60,7 +60,7 @@ THREE.SpriteMaterial.prototype.toJSON = function () {
var
data
=
THREE
.
Material
.
prototype
.
toJSON
.
call
(
this
);
data
.
color
=
this
.
color
.
getHex
();
data
.
color
=
this
.
color
.
getHex
();
return
data
;
...
...
src/objects/Line.js
浏览文件 @
c1faad5b
...
...
@@ -194,7 +194,7 @@ THREE.Line.prototype.clone = function ( object ) {
THREE
.
Line
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
data
.
object
.
mode
=
this
.
mode
;
...
...
@@ -211,6 +211,6 @@ THREE.Line.prototype.toJSON = function ( meta ) {
data
.
object
.
geometry
=
this
.
geometry
.
uuid
;
data
.
object
.
material
=
this
.
material
.
uuid
;
return
data
;
return
data
;
};
\ No newline at end of file
};
src/objects/Mesh.js
浏览文件 @
c1faad5b
...
...
@@ -326,7 +326,7 @@ THREE.Mesh.prototype.clone = function ( object, recursive ) {
THREE
.
Mesh
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
// only serialize if not in meta geometries cache
if
(
meta
.
geometries
[
this
.
geometry
.
uuid
]
===
undefined
)
{
...
...
@@ -341,6 +341,6 @@ THREE.Mesh.prototype.toJSON = function ( meta ) {
data
.
object
.
geometry
=
this
.
geometry
.
uuid
;
data
.
object
.
material
=
this
.
material
.
uuid
;
return
data
;
return
data
;
};
\ No newline at end of file
};
src/objects/PointCloud.js
浏览文件 @
c1faad5b
...
...
@@ -155,7 +155,7 @@ THREE.PointCloud.prototype.clone = function ( object ) {
THREE
.
PointCloud
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
// only serialize if not in meta geometries cache
if
(
meta
.
geometries
[
this
.
geometry
.
uuid
]
===
undefined
)
{
...
...
@@ -170,7 +170,7 @@ THREE.PointCloud.prototype.toJSON = function ( meta ) {
data
.
object
.
geometry
=
this
.
geometry
.
uuid
;
data
.
object
.
material
=
this
.
material
.
uuid
;
return
data
;
return
data
;
};
...
...
src/objects/Sprite.js
浏览文件 @
c1faad5b
...
...
@@ -71,7 +71,7 @@ THREE.Sprite.prototype.clone = function ( object ) {
THREE
.
Sprite
.
prototype
.
toJSON
=
function
(
meta
)
{
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
var
data
=
THREE
.
Object3D
.
prototype
.
toJSON
.
call
(
this
,
meta
);
// only serialize if not in meta materials cache
if
(
meta
.
materials
[
this
.
material
.
uuid
]
===
undefined
)
{
...
...
@@ -80,7 +80,7 @@ THREE.Sprite.prototype.toJSON = function ( meta ) {
data
.
object
.
material
=
this
.
material
.
uuid
;
return
data
;
return
data
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录