Browse Source

Updated builds.

Mr.doob 10 years ago
parent
commit
88dd3d95f3
2 changed files with 5 additions and 4 deletions
  1. 4 3
      build/three.js
  2. 1 1
      build/three.min.js

+ 4 - 3
build/three.js

@@ -15573,18 +15573,19 @@ THREE.Mesh.prototype.clone = function ( object, recursive ) {
  * @author ikerr / http://verold.com
  * @author ikerr / http://verold.com
  */
  */
 
 
-THREE.Bone = function ( belongsToSkin ) {
+THREE.Bone = function ( skin ) {
 
 
 	THREE.Object3D.call( this );
 	THREE.Object3D.call( this );
 
 
-	this.skin = belongsToSkin;
+	this.type = 'Bone';
+
+	this.skin = skin;
 
 
 };
 };
 
 
 THREE.Bone.prototype = Object.create( THREE.Object3D.prototype );
 THREE.Bone.prototype = Object.create( THREE.Object3D.prototype );
 THREE.Bone.prototype.constructor = THREE.Bone;
 THREE.Bone.prototype.constructor = THREE.Bone;
 
 
-
 // File:src/objects/Skeleton.js
 // File:src/objects/Skeleton.js
 
 
 /**
 /**

+ 1 - 1
build/three.min.js

@@ -354,7 +354,7 @@ this.material;if(void 0!==p){var n=k.attributes,q,m,s=g.precision;if(void 0!==n.
 var A=g.ray.origin.distanceTo(y);A<s||A<g.near||A>g.far||h.push({distance:A,point:y,face:new THREE.Face3(n,q,m,THREE.Triangle.normal(d,e,f)),faceIndex:null,object:this})}}}else for(r=n.position.array,t=k=0,w=r.length;k<w;k+=3,t+=9)n=k,q=k+1,m=k+2,d.fromArray(r,t),e.fromArray(r,t+3),f.fromArray(r,t+6),y=p.side===THREE.BackSide?b.intersectTriangle(f,e,d,!0):b.intersectTriangle(d,e,f,p.side!==THREE.DoubleSide),null!==y&&(y.applyMatrix4(this.matrixWorld),A=g.ray.origin.distanceTo(y),A<s||A<g.near||A>
 var A=g.ray.origin.distanceTo(y);A<s||A<g.near||A>g.far||h.push({distance:A,point:y,face:new THREE.Face3(n,q,m,THREE.Triangle.normal(d,e,f)),faceIndex:null,object:this})}}}else for(r=n.position.array,t=k=0,w=r.length;k<w;k+=3,t+=9)n=k,q=k+1,m=k+2,d.fromArray(r,t),e.fromArray(r,t+3),f.fromArray(r,t+6),y=p.side===THREE.BackSide?b.intersectTriangle(f,e,d,!0):b.intersectTriangle(d,e,f,p.side!==THREE.DoubleSide),null!==y&&(y.applyMatrix4(this.matrixWorld),A=g.ray.origin.distanceTo(y),A<s||A<g.near||A>
 g.far||h.push({distance:A,point:y,face:new THREE.Face3(n,q,m,THREE.Triangle.normal(d,e,f)),faceIndex:null,object:this}))}}else if(k instanceof THREE.Geometry)for(t=this.material instanceof THREE.MeshFaceMaterial,r=!0===t?this.material.materials:null,s=g.precision,u=k.vertices,v=0,x=k.faces.length;v<x;v++)if(C=k.faces[v],p=!0===t?r[C.materialIndex]:this.material,void 0!==p){n=u[C.a];q=u[C.b];m=u[C.c];if(!0===p.morphTargets){y=k.morphTargets;A=this.morphTargetInfluences;d.set(0,0,0);e.set(0,0,0);f.set(0,
 g.far||h.push({distance:A,point:y,face:new THREE.Face3(n,q,m,THREE.Triangle.normal(d,e,f)),faceIndex:null,object:this}))}}else if(k instanceof THREE.Geometry)for(t=this.material instanceof THREE.MeshFaceMaterial,r=!0===t?this.material.materials:null,s=g.precision,u=k.vertices,v=0,x=k.faces.length;v<x;v++)if(C=k.faces[v],p=!0===t?r[C.materialIndex]:this.material,void 0!==p){n=u[C.a];q=u[C.b];m=u[C.c];if(!0===p.morphTargets){y=k.morphTargets;A=this.morphTargetInfluences;d.set(0,0,0);e.set(0,0,0);f.set(0,
 0,0);for(var w=0,F=y.length;w<F;w++){var G=A[w];if(0!==G){var E=y[w].vertices;d.x+=(E[C.a].x-n.x)*G;d.y+=(E[C.a].y-n.y)*G;d.z+=(E[C.a].z-n.z)*G;e.x+=(E[C.b].x-q.x)*G;e.y+=(E[C.b].y-q.y)*G;e.z+=(E[C.b].z-q.z)*G;f.x+=(E[C.c].x-m.x)*G;f.y+=(E[C.c].y-m.y)*G;f.z+=(E[C.c].z-m.z)*G}}d.add(n);e.add(q);f.add(m);n=d;q=e;m=f}y=p.side===THREE.BackSide?b.intersectTriangle(m,q,n,!0):b.intersectTriangle(n,q,m,p.side!==THREE.DoubleSide);null!==y&&(y.applyMatrix4(this.matrixWorld),A=g.ray.origin.distanceTo(y),A<s||
 0,0);for(var w=0,F=y.length;w<F;w++){var G=A[w];if(0!==G){var E=y[w].vertices;d.x+=(E[C.a].x-n.x)*G;d.y+=(E[C.a].y-n.y)*G;d.z+=(E[C.a].z-n.z)*G;e.x+=(E[C.b].x-q.x)*G;e.y+=(E[C.b].y-q.y)*G;e.z+=(E[C.b].z-q.z)*G;f.x+=(E[C.c].x-m.x)*G;f.y+=(E[C.c].y-m.y)*G;f.z+=(E[C.c].z-m.z)*G}}d.add(n);e.add(q);f.add(m);n=d;q=e;m=f}y=p.side===THREE.BackSide?b.intersectTriangle(m,q,n,!0):b.intersectTriangle(n,q,m,p.side!==THREE.DoubleSide);null!==y&&(y.applyMatrix4(this.matrixWorld),A=g.ray.origin.distanceTo(y),A<s||
-A<g.near||A>g.far||h.push({distance:A,point:y,face:C,faceIndex:v,object:this}))}}}();THREE.Mesh.prototype.clone=function(a,b){void 0===a&&(a=new THREE.Mesh(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a,b);return a};THREE.Bone=function(a){THREE.Object3D.call(this);this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.constructor=THREE.Bone;
+A<g.near||A>g.far||h.push({distance:A,point:y,face:C,faceIndex:v,object:this}))}}}();THREE.Mesh.prototype.clone=function(a,b){void 0===a&&(a=new THREE.Mesh(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a,b);return a};THREE.Bone=function(a){THREE.Object3D.call(this);this.type="Bone";this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.constructor=THREE.Bone;
 THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(this.boneTextureHeight=this.boneTextureWidth=a=256<this.bones.length?64:64<this.bones.length?32:16<this.bones.length?16:8,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType),
 THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(this.boneTextureHeight=this.boneTextureWidth=a=256<this.bones.length?64:64<this.bones.length?32:16<this.bones.length?16:8,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType),
 this.boneTexture.minFilter=THREE.NearestFilter,this.boneTexture.magFilter=THREE.NearestFilter,this.boneTexture.generateMipmaps=!1,this.boneTexture.flipY=!1):this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(THREE.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],b=0,a=this.bones.length;b<a;b++)this.boneInverses.push(new THREE.Matrix4)};
 this.boneTexture.minFilter=THREE.NearestFilter,this.boneTexture.magFilter=THREE.NearestFilter,this.boneTexture.generateMipmaps=!1,this.boneTexture.flipY=!1):this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(THREE.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],b=0,a=this.bones.length;b<a;b++)this.boneInverses.push(new THREE.Matrix4)};
 THREE.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new THREE.Matrix4;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}};
 THREE.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var a=0,b=this.bones.length;a<b;a++){var c=new THREE.Matrix4;this.bones[a]&&c.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(c)}};