Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
eaf0f0cd
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,发现更多精彩内容 >>
提交
eaf0f0cd
编写于
9月 29, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
74f28136
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
68 addition
and
139 deletion
+68
-139
build/three.js
build/three.js
+50
-120
build/three.min.js
build/three.min.js
+18
-19
未找到文件。
build/three.js
浏览文件 @
eaf0f0cd
...
...
@@ -8390,8 +8390,7 @@ THREE.Object3D.prototype = {
var isRootObject = ( meta === undefined );
var data = {};
var output = { object: data };
var output = {};
// meta is a hash used to collect geometries, materials.
// not providing it implies that this is the root object
...
...
@@ -8416,26 +8415,40 @@ THREE.Object3D.prototype = {
// standard Object3D serialization
data.uuid = this.uuid;
data.type = this.type;
var object = {};
if ( this.name !== '' ) data.name = this.name;
if ( JSON.stringify( this.userData ) !== '{}' ) data.userData = this.userData;
if ( this.visible !== true ) data.visible = this.visible;
object.uuid = this.uuid;
object.type = this.type;
if ( this.name !== '' ) object.name = this.name;
if ( JSON.stringify( this.userData ) !== '{}' ) object.userData = this.userData;
if ( this.visible !== true ) object.visible = this.visible;
data
.matrix = this.matrix.toArray();
object
.matrix = this.matrix.toArray();
//
if ( this.geometry && meta.geometries[ this.geometry.uuid ] === undefined ) {
if ( this.geometry !== undefined ) {
if ( meta.geometries[ this.geometry.uuid ] === undefined ) {
meta.geometries[ this.geometry.uuid ] = this.geometry.toJSON( meta );
}
meta.geometries[ this.geometry.uuid ] = this.geometry.toJSON( meta )
;
object.geometry = this.geometry.uuid
;
}
if ( this.material && meta.materials[ this.material.uuid ] === undefined ) {
if ( this.material !== undefined ) {
if ( meta.materials[ this.material.uuid ] === undefined ) {
meta.materials[ this.material.uuid ] = this.material.toJSON( meta );
meta.materials[ this.material.uuid ] = this.material.toJSON( meta );
}
object.material = this.material.uuid;
}
...
...
@@ -8443,11 +8456,11 @@ THREE.Object3D.prototype = {
if ( this.children.length > 0 ) {
data
.children = [];
object
.children = [];
for ( var i = 0; i < this.children.length; i ++ ) {
data
.children.push( this.children[ i ].toJSON( meta ).object );
object
.children.push( this.children[ i ].toJSON( meta ).object );
}
...
...
@@ -8467,6 +8480,8 @@ THREE.Object3D.prototype = {
}
output.object = object;
return output;
// extract data from the cache hash
...
...
@@ -14105,14 +14120,32 @@ THREE.Light.prototype = Object.create( THREE.Object3D.prototype );
THREE.Light.prototype.constructor = THREE.Light;
THREE.Light.prototype.copy = function ( source ) {
THREE.Object3D.prototype.copy.call( this, source );
this.color.copy( source.color );
return this;
};
THREE.Light.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.color = this.color.getHex();
if ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();
if ( this.intensity !== undefined ) data.object.intensity = this.intensity;
if ( this.distance !== undefined ) data.object.distance = this.distance;
if ( this.angle !== undefined ) data.object.angle = this.angle;
if ( this.decay !== undefined ) data.object.decay = this.decay;
if ( this.exponent !== undefined ) data.object.exponent = this.exponent;
return data;
};
// File:src/lights/AmbientLight.js
/**
...
...
@@ -14130,16 +14163,6 @@ THREE.AmbientLight = function ( color ) {
THREE.AmbientLight.prototype = Object.create( THREE.Light.prototype );
THREE.AmbientLight.prototype.constructor = THREE.AmbientLight;
THREE.AmbientLight.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.color = this.color.getHex();
return data;
};
// File:src/lights/DirectionalLight.js
/**
...
...
@@ -14219,17 +14242,6 @@ THREE.DirectionalLight.prototype.copy = function ( source ) {
};
THREE.DirectionalLight.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.color = this.color.getHex();
data.object.intensity = this.intensity;
return data;
};
// File:src/lights/HemisphereLight.js
/**
...
...
@@ -14264,18 +14276,6 @@ THREE.HemisphereLight.prototype.copy = function ( source ) {
};
THREE.HemisphereLight.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.color = this.color.getHex();
data.object.groundColor = this.groundColor.getHex();
data.object.intensity = this.intensity;
return data;
};
// File:src/lights/PointLight.js
/**
...
...
@@ -14349,19 +14349,6 @@ THREE.PointLight.prototype.copy = function ( source ) {
};
THREE.PointLight.prototype.toJSON = function ( 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;
};
// File:src/lights/SpotLight.js
/**
...
...
@@ -14438,20 +14425,6 @@ THREE.SpotLight.prototype.copy = function ( source ) {
this.shadowMapHeight = source.shadowMapHeight;
return this;
}
THREE.SpotLight.prototype.toJSON = function ( 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.angle = this.angle;
data.object.exponent = this.exponent;
data.object.decay = this.decay;
return data;
};
...
...
@@ -18701,17 +18674,6 @@ THREE.Points.prototype.clone = function () {
};
THREE.Points.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.geometry = this.geometry.uuid;
data.object.material = this.material.uuid;
return data;
};
// Backwards compatibility
THREE.PointCloud = function ( geometry, material ) {
...
...
@@ -18913,17 +18875,6 @@ THREE.Line.prototype.clone = function () {
};
THREE.Line.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.geometry = this.geometry.uuid;
data.object.material = this.material.uuid;
return data;
};
// DEPRECATED
THREE.LineStrip = 0;
...
...
@@ -19305,17 +19256,6 @@ THREE.Mesh.prototype.clone = function () {
};
THREE.Mesh.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.geometry = this.geometry.uuid;
data.object.material = this.material.uuid;
return data;
};
// File:src/objects/Bone.js
/**
...
...
@@ -19928,16 +19868,6 @@ THREE.Sprite.prototype.clone = function () {
};
THREE.Sprite.prototype.toJSON = function ( meta ) {
var data = THREE.Object3D.prototype.toJSON.call( this, meta );
data.object.material = this.material.uuid;
return data;
};
// Backwards compatibility
THREE.Particle = THREE.Sprite;
...
...
build/three.min.js
浏览文件 @
eaf0f0cd
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录