提交 20a81f16 编写于 作者: M Mr.doob

Updated builds.

上级 85948663
......@@ -11437,7 +11437,7 @@ THREE.BufferGeometry.prototype = {
computeVertexNormals: function () {
var attributes = this.attributes;
var drawcalls = this.drawcalls;
var groups = this.groups;
if ( attributes.position ) {
......@@ -11478,18 +11478,18 @@ THREE.BufferGeometry.prototype = {
var indices = attributes.index.array;
if ( drawcalls.length === 0 ) {
if ( groups.length === 0 ) {
this.addDrawCall( 0, indices.length );
this.addGroup( 0, indices.length );
}
for ( var j = 0, jl = drawcalls.length; j < jl; ++ j ) {
for ( var j = 0, jl = groups.length; j < jl; ++ j ) {
var drawcall = drawcalls[ j ];
var group = groups[ j ];
var start = drawcall.start;
var count = drawcall.count;
var start = group.start;
var count = group.count;
for ( var i = start, il = start + count; i < il; i += 3 ) {
......@@ -11664,20 +11664,20 @@ THREE.BufferGeometry.prototype = {
var j, jl;
var iA, iB, iC;
if ( this.drawcalls.length === 0 ) {
if ( this.groups.length === 0 ) {
this.addDrawCall( 0, indices.length );
this.addGroup( 0, indices.length );
}
var drawcalls = this.drawcalls;
var groups = this.groups;
for ( j = 0, jl = drawcalls.length; j < jl; ++ j ) {
for ( j = 0, jl = groups.length; j < jl; ++ j ) {
var drawcall = drawcalls[ j ];
var group = groups[ j ];
var start = drawcall.start;
var count = drawcall.count;
var start = group.start;
var count = group.count;
for ( i = start, il = start + count; i < il; i += 3 ) {
......@@ -11720,12 +11720,12 @@ THREE.BufferGeometry.prototype = {
}
for ( j = 0, jl = drawcalls.length; j < jl; ++ j ) {
for ( j = 0, jl = groups.length; j < jl; ++ j ) {
var drawcall = drawcalls[ j ];
var group = groups[ j ];
var start = drawcall.start;
var count = drawcall.count;
var start = group.start;
var count = group.count;
for ( i = start, il = start + count; i < il; i += 3 ) {
......@@ -11841,7 +11841,8 @@ THREE.BufferGeometry.prototype = {
data.data = { attributes: {} };
var attributes = this.attributes;
var drawcalls = this.drawcalls;
var groups = this.groups;
var boundingSphere = this.boundingSphere;
for ( var key in attributes ) {
......@@ -11858,9 +11859,9 @@ THREE.BufferGeometry.prototype = {
}
if ( drawcalls.length > 0 ) {
if ( groups.length > 0 ) {
data.data.drawcalls = JSON.parse( JSON.stringify( drawcalls ) );
data.data.groups = JSON.parse( JSON.stringify( groups ) );
}
......@@ -11886,7 +11887,7 @@ THREE.BufferGeometry.prototype = {
copy: function ( source ) {
var attributes = source.attributes;
var drawcalls = source.drawcalls;
var groups = source.groups;
for ( var name in attributes ) {
......@@ -11895,10 +11896,11 @@ THREE.BufferGeometry.prototype = {
}
for ( var i = 0, l = drawcalls.length; i < l; i ++ ) {
for ( var i = 0, l = groups.length; i < l; i ++ ) {
var group = groups[ i ];
var drawcall = drawcalls[ i ];
this.addDrawCall( drawcall.start, drawcall.count );
this.addGroup( group.start, group.count );
}
......@@ -14010,14 +14012,15 @@ THREE.BufferGeometryLoader.prototype = {
}
var drawcalls = json.data.drawcalls || json.data.offsets;
var groups = json.data.groups || json.data.drawcalls || json.data.offsets;
if ( groups !== undefined ) {
if ( drawcalls !== undefined ) {
for ( var i = 0, n = groups.length; i !== n; ++ i ) {
for ( var i = 0, n = drawcalls.length; i !== n; ++ i ) {
var group = groups[ i ];
var drawcall = drawcalls[ i ];
geometry.addDrawcall( drawcall.start, drawcall.count );
geometry.addGroup( group.start, group.count );
}
......
......@@ -247,15 +247,15 @@ a.uvs.length),this.addAttribute("uv",(new THREE.BufferAttribute(b,2)).copyVector
4),this.addAttribute("skinWeight",c.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){var a=new THREE.Vector3;return function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var b=this.attributes.position.array;if(b){var c=this.boundingBox;c.makeEmpty();for(var d=0,e=b.length;d<e;d+=3)a.fromArray(b,d),c.expandByPoint(a)}if(void 0===
b||0===b.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0);(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}}(),computeBoundingSphere:function(){var a=new THREE.Box3,b=new THREE.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var c=this.attributes.position.array;
if(c){a.makeEmpty();for(var d=this.boundingSphere.center,e=0,g=c.length;e<g;e+=3)b.fromArray(c,e),a.expandByPoint(b);a.center(d);for(var f=0,e=0,g=c.length;e<g;e+=3)b.fromArray(c,e),f=Math.max(f,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(f);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=
this.attributes,b=this.drawcalls;if(a.position){var c=a.position.array;if(void 0===a.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(c.length),3));else for(var d=a.normal.array,e=0,g=d.length;e<g;e++)d[e]=0;var d=a.normal.array,f,h,k,m=new THREE.Vector3,n=new THREE.Vector3,p=new THREE.Vector3,l=new THREE.Vector3,q=new THREE.Vector3;if(a.index){var s=a.index.array;0===b.length&&this.addDrawCall(0,s.length);for(var r=0,u=b.length;r<u;++r)for(e=b[r],g=e.start,f=e.count,e=
g,g+=f;e<g;e+=3)f=3*s[e+0],h=3*s[e+1],k=3*s[e+2],m.fromArray(c,f),n.fromArray(c,h),p.fromArray(c,k),l.subVectors(p,n),q.subVectors(m,n),l.cross(q),d[f]+=l.x,d[f+1]+=l.y,d[f+2]+=l.z,d[h]+=l.x,d[h+1]+=l.y,d[h+2]+=l.z,d[k]+=l.x,d[k+1]+=l.y,d[k+2]+=l.z}else for(e=0,g=c.length;e<g;e+=9)m.fromArray(c,e),n.fromArray(c,e+3),p.fromArray(c,e+6),l.subVectors(p,n),q.subVectors(m,n),l.cross(q),d[e]=l.x,d[e+1]=l.y,d[e+2]=l.z,d[e+3]=l.x,d[e+4]=l.y,d[e+5]=l.z,d[e+6]=l.x,d[e+7]=l.y,d[e+8]=l.z;this.normalizeNormals();
a.normal.needsUpdate=!0}},computeTangents:function(){function a(a,b,c){p.fromArray(d,3*a);l.fromArray(d,3*b);q.fromArray(d,3*c);s.fromArray(g,2*a);r.fromArray(g,2*b);u.fromArray(g,2*c);x=l.x-p.x;v=q.x-p.x;A=l.y-p.y;w=q.y-p.y;C=l.z-p.z;y=q.z-p.z;z=r.x-s.x;B=u.x-s.x;N=r.y-s.y;J=u.y-s.y;E=1/(z*J-B*N);P.set((J*x-N*v)*E,(J*A-N*w)*E,(J*C-N*y)*E);K.set((z*v-B*x)*E,(z*w-B*A)*E,(z*y-B*C)*E);k[a].add(P);k[b].add(P);k[c].add(P);m[a].add(K);m[b].add(K);m[c].add(K)}function b(a){F.fromArray(e,3*a);$.copy(F);aa=
k[a];R.copy(aa);R.sub(F.multiplyScalar(F.dot(aa))).normalize();U.crossVectors($,aa);oa=U.dot(m[a]);ea=0>oa?-1:1;h[4*a]=R.x;h[4*a+1]=R.y;h[4*a+2]=R.z;h[4*a+3]=ea}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var c=this.attributes.index.array,d=this.attributes.position.array,e=this.attributes.normal.array,
g=this.attributes.uv.array,f=d.length/3;void 0===this.attributes.tangent&&this.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*f),4));for(var h=this.attributes.tangent.array,k=[],m=[],n=0;n<f;n++)k[n]=new THREE.Vector3,m[n]=new THREE.Vector3;var p=new THREE.Vector3,l=new THREE.Vector3,q=new THREE.Vector3,s=new THREE.Vector2,r=new THREE.Vector2,u=new THREE.Vector2,x,v,A,w,C,y,z,B,N,J,E,P=new THREE.Vector3,K=new THREE.Vector3,D,G,H,O,Q;0===this.drawcalls.length&&this.addDrawCall(0,
c.length);for(var T=this.drawcalls,f=0,n=T.length;f<n;++f)for(D=T[f],G=D.start,H=D.count,D=G,G+=H;D<G;D+=3)H=c[D+0],O=c[D+1],Q=c[D+2],a(H,O,Q);for(var R=new THREE.Vector3,U=new THREE.Vector3,F=new THREE.Vector3,$=new THREE.Vector3,ea,aa,oa,f=0,n=T.length;f<n;++f)for(D=T[f],G=D.start,H=D.count,D=G,G+=H;D<G;D+=3)H=c[D+0],O=c[D+1],Q=c[D+2],b(H),b(O),b(Q)}},computeOffsets:function(a){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},merge:function(a,b){if(!1===a instanceof THREE.BufferGeometry)console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",
this.attributes,b=this.groups;if(a.position){var c=a.position.array;if(void 0===a.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(c.length),3));else for(var d=a.normal.array,e=0,g=d.length;e<g;e++)d[e]=0;var d=a.normal.array,f,h,k,m=new THREE.Vector3,n=new THREE.Vector3,p=new THREE.Vector3,l=new THREE.Vector3,q=new THREE.Vector3;if(a.index){var s=a.index.array;0===b.length&&this.addGroup(0,s.length);for(var r=0,u=b.length;r<u;++r)for(e=b[r],g=e.start,f=e.count,e=g,g+=
f;e<g;e+=3)f=3*s[e+0],h=3*s[e+1],k=3*s[e+2],m.fromArray(c,f),n.fromArray(c,h),p.fromArray(c,k),l.subVectors(p,n),q.subVectors(m,n),l.cross(q),d[f]+=l.x,d[f+1]+=l.y,d[f+2]+=l.z,d[h]+=l.x,d[h+1]+=l.y,d[h+2]+=l.z,d[k]+=l.x,d[k+1]+=l.y,d[k+2]+=l.z}else for(e=0,g=c.length;e<g;e+=9)m.fromArray(c,e),n.fromArray(c,e+3),p.fromArray(c,e+6),l.subVectors(p,n),q.subVectors(m,n),l.cross(q),d[e]=l.x,d[e+1]=l.y,d[e+2]=l.z,d[e+3]=l.x,d[e+4]=l.y,d[e+5]=l.z,d[e+6]=l.x,d[e+7]=l.y,d[e+8]=l.z;this.normalizeNormals();a.normal.needsUpdate=
!0}},computeTangents:function(){function a(a,b,c){p.fromArray(d,3*a);l.fromArray(d,3*b);q.fromArray(d,3*c);s.fromArray(g,2*a);r.fromArray(g,2*b);u.fromArray(g,2*c);x=l.x-p.x;v=q.x-p.x;A=l.y-p.y;w=q.y-p.y;C=l.z-p.z;y=q.z-p.z;z=r.x-s.x;B=u.x-s.x;N=r.y-s.y;J=u.y-s.y;E=1/(z*J-B*N);P.set((J*x-N*v)*E,(J*A-N*w)*E,(J*C-N*y)*E);K.set((z*v-B*x)*E,(z*w-B*A)*E,(z*y-B*C)*E);k[a].add(P);k[b].add(P);k[c].add(P);m[a].add(K);m[b].add(K);m[c].add(K)}function b(a){F.fromArray(e,3*a);$.copy(F);aa=k[a];R.copy(aa);R.sub(F.multiplyScalar(F.dot(aa))).normalize();
U.crossVectors($,aa);oa=U.dot(m[a]);ea=0>oa?-1:1;h[4*a]=R.x;h[4*a+1]=R.y;h[4*a+2]=R.z;h[4*a+3]=ea}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var c=this.attributes.index.array,d=this.attributes.position.array,e=this.attributes.normal.array,g=this.attributes.uv.array,f=d.length/
3;void 0===this.attributes.tangent&&this.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*f),4));for(var h=this.attributes.tangent.array,k=[],m=[],n=0;n<f;n++)k[n]=new THREE.Vector3,m[n]=new THREE.Vector3;var p=new THREE.Vector3,l=new THREE.Vector3,q=new THREE.Vector3,s=new THREE.Vector2,r=new THREE.Vector2,u=new THREE.Vector2,x,v,A,w,C,y,z,B,N,J,E,P=new THREE.Vector3,K=new THREE.Vector3,D,G,H,O,Q;0===this.groups.length&&this.addGroup(0,c.length);for(var T=this.groups,f=0,n=T.length;f<
n;++f)for(D=T[f],G=D.start,H=D.count,D=G,G+=H;D<G;D+=3)H=c[D+0],O=c[D+1],Q=c[D+2],a(H,O,Q);for(var R=new THREE.Vector3,U=new THREE.Vector3,F=new THREE.Vector3,$=new THREE.Vector3,ea,aa,oa,f=0,n=T.length;f<n;++f)for(D=T[f],G=D.start,H=D.count,D=G,G+=H;D<G;D+=3)H=c[D+0],O=c[D+1],Q=c[D+2],b(H),b(O),b(Q)}},computeOffsets:function(a){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},merge:function(a,b){if(!1===a instanceof THREE.BufferGeometry)console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",
a);else{void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=c[d].array,g=a.attributes[d],f=g.array,h=0,g=g.itemSize*b;h<f.length;h++,g++)e[g]=f[h];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,g=a.length;e<g;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=
this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var b=this.attributes,d=this.drawcalls,e=this.boundingSphere;for(c in b){var g=b[c],f=Array.prototype.slice.call(g.array);a.data.attributes[c]={itemSize:g.itemSize,type:g.array.constructor.name,array:f}}0<d.length&&(a.data.drawcalls=JSON.parse(JSON.stringify(d)));null!==e&&(a.data.boundingSphere={center:e.center.toArray(),radius:e.radius});
return a},clone:function(){return(new this.constructor).copy(this)},copy:function(a){var b=a.attributes;a=a.drawcalls;for(var c in b)this.addAttribute(c,b[c].clone());b=0;for(c=a.length;b<c;b++){var d=a[b];this.addDrawCall(d.start,d.count)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.BufferGeometry.MaxIndex=65535;
this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var b=this.attributes,d=this.groups,e=this.boundingSphere;for(c in b){var g=b[c],f=Array.prototype.slice.call(g.array);a.data.attributes[c]={itemSize:g.itemSize,type:g.array.constructor.name,array:f}}0<d.length&&(a.data.groups=JSON.parse(JSON.stringify(d)));null!==e&&(a.data.boundingSphere={center:e.center.toArray(),radius:e.radius});
return a},clone:function(){return(new this.constructor).copy(this)},copy:function(a){var b=a.attributes;a=a.groups;for(var c in b)this.addAttribute(c,b[c].clone());b=0;for(c=a.length;b<c;b++){var d=a[b];this.addGroup(d.start,d.count)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.BufferGeometry.MaxIndex=65535;
THREE.InstancedBufferGeometry=function(){THREE.BufferGeometry.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0};THREE.InstancedBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.InstancedBufferGeometry.prototype.constructor=THREE.InstancedBufferGeometry;THREE.InstancedBufferGeometry.prototype.addDrawCall=function(a,b,c){this.drawcalls.push({start:a,count:b,instances:c})};
THREE.InstancedBufferGeometry.prototype.copy=function(a){for(var b in a.attributes)this.addAttribute(b,a.attributes[b].clone());b=0;for(var c=a.drawcalls.length;b<c;b++){var d=a.drawcalls[b];this.addDrawCall(d.start,d.count,d.instances)}return this};THREE.EventDispatcher.prototype.apply(THREE.InstancedBufferGeometry.prototype);THREE.Camera=function(){THREE.Object3D.call(this);this.type="Camera";this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=new THREE.Matrix4};
THREE.Camera.prototype=Object.create(THREE.Object3D.prototype);THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.getWorldDirection=function(){var a=new THREE.Quaternion;return function(b){b=b||new THREE.Vector3;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();THREE.Camera.prototype.lookAt=function(){var a=new THREE.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();THREE.Camera.prototype.clone=function(){return(new this.constructor).copy(this)};
......@@ -307,8 +307,8 @@ c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.leng
[],m=c.morphTargets[d].vertices,n=a.morphTargets[d].vertices,h=0,k=n.length;h<k;h+=3){var p=new THREE.Vector3;p.x=n[h]*b;p.y=n[h+1]*b;p.z=n[h+2]*b;m.push(p)}}if(void 0!==a.morphColors)for(d=0,f=a.morphColors.length;d<f;d++)for(c.morphColors[d]={},c.morphColors[d].name=a.morphColors[d].name,c.morphColors[d].colors=[],k=c.morphColors[d].colors,m=a.morphColors[d].colors,b=0,h=m.length;b<h;b+=3)n=new THREE.Color(16755200),n.setRGB(m[b],m[b+1],m[b+2]),k.push(n)})(d);c.computeFaceNormals();c.computeBoundingSphere();
if(void 0===a.materials||0===a.materials.length)return{geometry:c};d=THREE.Loader.prototype.initMaterials(a.materials,b,this.crossOrigin);THREE.Loader.prototype.needsTangents(d)&&c.computeTangents();return{geometry:c,materials:d}}};
THREE.LoadingManager=function(a,b,c){var d=this,e=!1,g=0,f=0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){f++;if(!1===e&&void 0!==d.onStart)d.onStart(a,g,f);e=!0};this.itemEnd=function(a){g++;if(void 0!==d.onProgress)d.onProgress(a,g,f);if(g===f&&(e=!1,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,g=new THREE.XHRLoader(e.manager);g.setCrossOrigin(this.crossOrigin);g.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],g=new self[e.type](e.array);b.addAttribute(d,new THREE.BufferAttribute(g,e.itemSize))}c=a.data.drawcalls||a.data.offsets;if(void 0!==
c)for(d=0,e=c.length;d!==e;++d)g=c[d],b.addDrawcall(g.start,g.count);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.BufferGeometryLoader.prototype={constructor:THREE.BufferGeometryLoader,load:function(a,b,c,d){var e=this,g=new THREE.XHRLoader(e.manager);g.setCrossOrigin(this.crossOrigin);g.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],g=new self[e.type](e.array);b.addAttribute(d,new THREE.BufferAttribute(g,e.itemSize))}c=a.data.groups||a.data.drawcalls||a.data.offsets;
if(void 0!==c)for(d=0,e=c.length;d!==e;++d)g=c[d],b.addGroup(g.start,g.count);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,g=new THREE.XHRLoader(e.manager);g.setCrossOrigin(this.crossOrigin);g.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.attributes&&(b.attributes=a.attributes);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.alphaTest&&
(b.alphaTest=a.alphaTest);void 0!==a.wireframe&&(b.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(b.wireframeLinewidth=a.wireframeLinewidth);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=""};
......
......@@ -1125,7 +1125,7 @@ THREE.BufferGeometry.prototype = {
var group = groups[ i ];
this.addGorup( group.start, group.count );
this.addGroup( group.start, group.count );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册