Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
8fc585c6
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,发现更多精彩内容 >>
提交
8fc585c6
编写于
3月 10, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
4dbc5aaa
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
8 deletion
+8
-8
build/three.js
build/three.js
+4
-4
build/three.min.js
build/three.min.js
+4
-4
未找到文件。
build/three.js
浏览文件 @
8fc585c6
...
...
@@ -12475,7 +12475,7 @@ THREE.BufferGeometryLoader.prototype = {
var geometry = new THREE.BufferGeometry();
var attributes = json.attributes;
var attributes = json.
data.
attributes;
for ( var key in attributes ) {
...
...
@@ -12486,7 +12486,7 @@ THREE.BufferGeometryLoader.prototype = {
}
var offsets = json.offsets;
var offsets = json.
data.
offsets;
if ( offsets !== undefined ) {
...
...
@@ -12494,7 +12494,7 @@ THREE.BufferGeometryLoader.prototype = {
}
var boundingSphere = json.boundingSphere;
var boundingSphere = json.
data.
boundingSphere;
if ( boundingSphere !== undefined ) {
...
...
@@ -12778,7 +12778,7 @@ THREE.ObjectLoader.prototype = {
case 'BufferGeometry':
geometry = bufferGeometryLoader.parse( data
.data
);
geometry = bufferGeometryLoader.parse( data );
break;
...
...
build/three.min.js
浏览文件 @
8fc585c6
...
...
@@ -274,16 +274,16 @@ v=new THREE.Vector2(v,n),c.faceVertexUvs[d][h].push(v);q&&(q=3*x[k++],t.normal.s
c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.");c.animation=a.animation;c.animations=a.animations})();(function(b){if(void 0!==a.morphTargets){var d,g,h,k,l,p;d=0;for(g=a.morphTargets.length;d<g;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=a.morphTargets[d].name,c.morphTargets[d].vertices=[],l=c.morphTargets[d].vertices,p=a.morphTargets[d].vertices,h=0,k=p.length;h<k;h+=3){var q=new THREE.Vector3;q.x=p[h]*b;q.y=p[h+1]*b;q.z=p[h+2]*b;l.push(q)}}if(void 0!==
a.morphColors)for(d=0,g=a.morphColors.length;d<g;d++)for(c.morphColors[d]={},c.morphColors[d].name=a.morphColors[d].name,c.morphColors[d].colors=[],k=c.morphColors[d].colors,l=a.morphColors[d].colors,b=0,h=l.length;b<h;b+=3)p=new THREE.Color(16755200),p.setRGB(l[b],l[b+1],l[b+2]),k.push(p)})(d);c.computeFaceNormals();c.computeBoundingSphere();if(void 0===a.materials||0===a.materials.length)return{geometry:c};d=this.initMaterials(a.materials,b);this.needsTangents(d)&&c.computeTangents();return{geometry:c,
materials:d}};THREE.LoadingManager=function(a,b,c){var d=this,e=0,f=0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){f++};this.itemEnd=function(a){e++;if(void 0!==d.onProgress)d.onProgress(a,e,f);if(e===f&&void 0!==d.onLoad)d.onLoad()}};THREE.DefaultLoadingManager=new THREE.LoadingManager;THREE.BufferGeometryLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
THREE
.
BufferGeometryLoader
.
prototype
=
{
constructor
:
THREE
.
BufferGeometryLoader
,
load
:
function
(
a
,
b
,
c
,
d
){
var
e
=
this
,
f
=
new
THREE
.
XHRLoader
(
e
.
manager
);
f
.
setCrossOrigin
(
this
.
crossOrigin
);
f
.
load
(
a
,
function
(
a
){
b
(
e
.
parse
(
JSON
.
parse
(
a
)))},
c
,
d
)},
setCrossOrigin
:
function
(
a
){
this
.
crossOrigin
=
a
},
parse
:
function
(
a
){
var
b
=
new
THREE
.
BufferGeometry
,
c
=
a
.
attributes
,
d
;
for
(
d
in
c
){
var
e
=
c
[
d
],
f
=
new
self
[
e
.
type
](
e
.
array
);
b
.
addAttribute
(
d
,
new
THREE
.
BufferAttribute
(
f
,
e
.
itemSize
))}
c
=
a
.
offsets
;
void
0
!==
c
&&
(
b
.
offsets
=
JSON
.
parse
(
JSON
.
stringify
(
c
)));
a
=
a
.
boundingSphere
;
void
0
!==
a
&&
(
c
=
new
THREE
.
Vector3
,
void
0
!==
a
.
center
&&
c
.
fromArray
(
a
.
center
),
b
.
boundingSphere
=
new
THREE
.
Sphere
(
c
,
a
.
radius
));
return
b
}};
THREE
.
MaterialLoader
=
function
(
a
){
this
.
manager
=
void
0
!==
a
?
a
:
THREE
.
DefaultLoadingManager
};
THREE.BufferGeometryLoader.prototype={constructor:THREE.BufferGeometryLoader,load:function(a,b,c,d){var e=this,f=new THREE.XHRLoader(e.manager);f.setCrossOrigin(this.crossOrigin);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a){var b=new THREE.BufferGeometry,c=a.
data.attributes,d;for(d in c){var e=c[d],f=new self[e.type](e.array);b.addAttribute(d,new THREE.BufferAttribute(f,e.itemSize))}c=a.dat
a.offsets;void 0!==c&&(b.offsets=JSON.parse(JSON.stringify(c)));
a=a.
data.
boundingSphere;void 0!==a&&(c=new THREE.Vector3,void 0!==a.center&&c.fromArray(a.center),b.boundingSphere=new THREE.Sphere(c,a.radius));return b}};THREE.MaterialLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(a,b,c,d){var e=this,f=new THREE.XHRLoader(e.manager);f.setCrossOrigin(this.crossOrigin);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a){var b=new THREE[a.type];void 0!==a.color&&b.color.setHex(a.color);void 0!==a.emissive&&b.emissive.setHex(a.emissive);void 0!==a.specular&&b.specular.setHex(a.specular);void 0!==a.shininess&&(b.shininess=a.shininess);
void 0!==a.uniforms&&(b.uniforms=a.uniforms);void 0!==a.vertexShader&&(b.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(b.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(b.vertexColors=a.vertexColors);void 0!==a.shading&&(b.shading=a.shading);void 0!==a.blending&&(b.blending=a.blending);void 0!==a.side&&(b.side=a.side);void 0!==a.opacity&&(b.opacity=a.opacity);void 0!==a.transparent&&(b.transparent=a.transparent);void 0!==a.wireframe&&(b.wireframe=a.wireframe);void 0!==a.size&&
(b.size=a.size);void 0!==a.sizeAttenuation&&(b.sizeAttenuation=a.sizeAttenuation);if(void 0!==a.materials)for(var c=0,d=a.materials.length;c<d;c++)b.materials.push(this.parse(a.materials[c]));return b}};THREE.ObjectLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.texturePath=""};
THREE.ObjectLoader.prototype={constructor:THREE.ObjectLoader,load:function(a,b,c,d){""===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf("/")+1));var e=this,f=new THREE.XHRLoader(e.manager);f.setCrossOrigin(this.crossOrigin);f.load(a,function(a){e.parse(JSON.parse(a),b)},c,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var c=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==b&&b(e)}),
d=this.parseTextures(a.textures,d),d=this.parseMaterials(a.materials,d),e=this.parseObject(a.object,c,d);void 0!==a.images&&0!==a.images.length||void 0===b||b(e);return e},parseGeometries:function(a){var b={};if(void 0!==a)for(var c=new THREE.JSONLoader,d=new THREE.BufferGeometryLoader,e=0,f=a.length;e<f;e++){var g,h=a[e];switch(h.type){case "PlaneGeometry":case "PlaneBufferGeometry":g=new THREE[h.type](h.width,h.height,h.widthSegments,h.heightSegments);break;case "BoxGeometry":case "CubeGeometry":g=
new THREE.BoxGeometry(h.width,h.height,h.depth,h.widthSegments,h.heightSegments,h.depthSegments);break;case "CircleGeometry":g=new THREE.CircleGeometry(h.radius,h.segments);break;case "CylinderGeometry":g=new THREE.CylinderGeometry(h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded);break;case "SphereGeometry":g=new THREE.SphereGeometry(h.radius,h.widthSegments,h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case "IcosahedronGeometry":g=new THREE.IcosahedronGeometry(h.radius,
h
.
detail
);
break
;
case
"
TorusGeometry
"
:
g
=
new
THREE
.
TorusGeometry
(
h
.
radius
,
h
.
tube
,
h
.
radialSegments
,
h
.
tubularSegments
,
h
.
arc
);
break
;
case
"
TorusKnotGeometry
"
:
g
=
new
THREE
.
TorusKnotGeometry
(
h
.
radius
,
h
.
tube
,
h
.
radialSegments
,
h
.
tubularSegments
,
h
.
p
,
h
.
q
,
h
.
heightScale
);
break
;
case
"
BufferGeometry
"
:
g
=
d
.
parse
(
h
.
data
);
break
;
case
"
Geometry
"
:
g
=
c
.
parse
(
h
.
data
).
geometry
}
g
.
uuid
=
h
.
uuid
;
void
0
!==
h
.
name
&&
(
g
.
name
=
h
.
name
);
b
[
h
.
uuid
]
=
g
}
return
b
},
parseMaterials
:
function
(
a
,
b
){
var
c
=
{};
if
(
void
0
!==
a
)
for
(
var
d
=
function
(
a
){
void
0
===
b
[
a
]
&&
THREE
.
warn
(
"
THREE.ObjectLoader: Undefined texture
"
,
a
);
return
b
[
a
]},
e
=
new
THREE
.
MaterialLoader
,
f
=
0
,
g
=
a
.
length
;
f
<
g
;
f
++
){
var
h
=
a
[
f
],
k
=
e
.
parse
(
h
);
k
.
uuid
=
h
.
uuid
;
void
0
!==
h
.
name
&&
(
k
.
name
=
h
.
name
);
void
0
!==
h
.
map
&&
(
k
.
map
=
d
(
h
.
map
));
void
0
!==
h
.
bumpMap
&&
(
k
.
bumpMap
=
d
(
h
.
bumpMap
),
h
.
bumpScale
&&
(
k
.
bumpScale
=
new
THREE
.
Vector2
(
h
.
bumpScale
,
h
.
bumpScale
)));
void
0
!==
h
.
alphaMap
&&
(
k
.
alphaMap
=
d
(
h
.
alphaMap
));
void
0
!==
h
.
envMap
&&
(
k
.
envMap
=
d
(
h
.
envMap
));
void
0
!==
h
.
normalMap
&&
(
k
.
normalMap
=
d
(
h
.
normalMap
),
h
.
normalScale
&&
(
k
.
normalScale
=
h.detail);break;case "TorusGeometry":g=new THREE.TorusGeometry(h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);break;case "TorusKnotGeometry":g=new THREE.TorusKnotGeometry(h.radius,h.tube,h.radialSegments,h.tubularSegments,h.p,h.q,h.heightScale);break;case "BufferGeometry":g=d.parse(h
);break;case "Geometry":g=c.parse(h.data).geometry}g.uuid=h.uuid;void 0!==h.name&&(g.name=h.name);b[h.uuid]=g}return b},parseMaterials:function(a,b){var c={};if(void 0!==a)for(var d=function(a){void 0===b[a]&&
THREE.warn("THREE.ObjectLoader: Undefined texture",a);return b[a]},e=new THREE.MaterialLoader,f=0,g=a.length;f<g;f++){var h=a[f],k=e.parse(h);k.uuid=h.uuid;void 0!==h.name&&(k.name=h.name);void 0!==h.map&&(k.map=d(h.map));void 0!==h.bumpMap&&(k.bumpMap=d(h.bumpMap),h.bumpScale&&(k.bumpScale=new THREE.Vector2(h.bumpScale,h.bumpScale)));void 0!==h.alphaMap&&(k.alphaMap=d(h.alphaMap));void 0!==h.envMap&&(k.envMap=d(h.envMap));void 0!==h.normalMap&&(k.normalMap=d(h.normalMap),h.normalScale&&(k.normalScale=
new THREE.Vector2(h.normalScale,h.normalScale)));void 0!==h.lightMap&&(k.lightMap=d(h.lightMap));void 0!==h.specularMap&&(k.specularMap=d(h.specularMap));c[h.uuid]=k}return c},parseImages:function(a,b){var c=this,d={};if(void 0!==a&&0<a.length){var e=new THREE.LoadingManager(b),f=new THREE.ImageLoader(e);f.setCrossOrigin(this.crossOrigin);for(var e=function(a){c.manager.itemStart(a);return f.load(a,function(){c.manager.itemEnd(a)})},g=0,h=a.length;g<h;g++){var k=a[g],l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(k.url)?
k.url:c.texturePath+k.url;d[k.uuid]=e(l)}}return d},parseTextures:function(a,b){var c={};if(void 0!==a)for(var d=0,e=a.length;d<e;d++){var f=a[d];void 0===f.image&&THREE.warn('THREE.ObjectLoader: No "image" speficied for',f.uuid);void 0===b[f.image]&&THREE.warn("THREE.ObjectLoader: Undefined image",f.image);var g=new THREE.Texture(b[f.image]);g.needsUpdate=!0;g.uuid=f.uuid;void 0!==f.name&&(g.name=f.name);void 0!==f.repeat&&(g.repeat=new THREE.Vector2(f.repeat[0],f.repeat[1]));void 0!==f.minFilter&&
(g.minFilter=THREE[f.minFilter]);void 0!==f.magFilter&&(g.magFilter=THREE[f.magFilter]);void 0!==f.anisotropy&&(g.anisotropy=f.anisotropy);f.wrap instanceof Array&&(g.wrapS=THREE[f.wrap[0]],g.wrapT=THREE[f.wrap[1]]);c[f.uuid]=g}return c},parseObject:function(){var a=new THREE.Matrix4;return function(b,c,d){var e;e=function(a){void 0===c[a]&&THREE.warn("THREE.ObjectLoader: Undefined geometry",a);return c[a]};var f=function(a){void 0===d[a]&&THREE.warn("THREE.ObjectLoader: Undefined material",a);return d[a]};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录