Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
f21c7a944b
2 changed files with 14 additions and 17 deletions
  1. 10 13
      build/three.js
  2. 4 4
      build/three.min.js

+ 10 - 13
build/three.js

@@ -9985,9 +9985,9 @@ THREE.BufferGeometryManipulator = function ( bufferGeometry ) {
 	this.uvs = [];
 	this.uvs = [];
 
 
 	var attributes = bufferGeometry.attributes;
 	var attributes = bufferGeometry.attributes;
-	var length = attributes.position.array.length;
+	var length = attributes.position.array.length / 3;
 
 
-	for ( var i = 0, l = length / 3; i < l; i ++ ) {
+	for ( var i = 0; i < length; i ++ ) {
 
 
 		this.vertices.push( new THREE.TypedVector3( attributes.position.array, i * 3 ) );
 		this.vertices.push( new THREE.TypedVector3( attributes.position.array, i * 3 ) );
 		this.normals.push( new THREE.TypedVector3( attributes.normal.array, i * 3 ) );
 		this.normals.push( new THREE.TypedVector3( attributes.normal.array, i * 3 ) );
@@ -15533,11 +15533,11 @@ THREE.Mesh.prototype.getMorphTargetIndexByName = function ( name ) {
 
 
 };
 };
 
 
-THREE.Mesh.prototype.clone = function ( object ) {
+THREE.Mesh.prototype.clone = function ( object, recursive ) {
 
 
 	if ( object === undefined ) object = new THREE.Mesh( this.geometry, this.material );
 	if ( object === undefined ) object = new THREE.Mesh( this.geometry, this.material );
 
 
-	THREE.Object3D.prototype.clone.call( this, object );
+	THREE.Object3D.prototype.clone.call( this, object, recursive );
 
 
 	return object;
 	return object;
 
 
@@ -15573,7 +15573,7 @@ THREE.Bone.prototype.update = function ( parentSkinMatrix, forceUpdate ) {
 
 
 	if ( forceUpdate || this.matrixWorldNeedsUpdate ) {
 	if ( forceUpdate || this.matrixWorldNeedsUpdate ) {
 
 
-		if( parentSkinMatrix ) {
+		if ( parentSkinMatrix ) {
 
 
 			this.skinMatrix.multiplyMatrices( parentSkinMatrix, this.matrix );
 			this.skinMatrix.multiplyMatrices( parentSkinMatrix, this.matrix );
 
 
@@ -15590,9 +15590,7 @@ THREE.Bone.prototype.update = function ( parentSkinMatrix, forceUpdate ) {
 
 
 	// update children
 	// update children
 
 
-	var child, i, l = this.children.length;
-
-	for ( i = 0; i < l; i ++ ) {
+	for ( var i = 0, l = this.children.length; i < l; i ++ ) {
 
 
 		this.children[ i ].update( this.skinMatrix, forceUpdate );
 		this.children[ i ].update( this.skinMatrix, forceUpdate );
 
 
@@ -32507,6 +32505,7 @@ THREE.BoxGeometry.prototype = Object.create( THREE.Geometry.prototype );
 
 
 /**
 /**
  * @author hughes
  * @author hughes
+ * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
 THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
 THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
@@ -32528,12 +32527,10 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
 
 
 	//
 	//
 
 
-	var length = segments + 2;
-
 	var indices = new Uint16Array( ( segments + 1 ) * 3 );
 	var indices = new Uint16Array( ( segments + 1 ) * 3 );
-	var vertices = new Float32Array( length * 3 );
-	var normals = new Float32Array( length * 3 );
-	var uvs = new Float32Array( length * 2 );
+	var vertices = new Float32Array( ( segments + 2 ) * 3 );
+	var normals = new Float32Array( ( segments + 2 ) * 3 );
+	var uvs = new Float32Array( ( segments + 2 ) * 2 );
 
 
 	normals[ 2 ] = 1;
 	normals[ 2 ] = 1;
 
 

+ 4 - 4
build/three.min.js

@@ -200,7 +200,7 @@ ia[n].start;S=ia[n].count;var ta=ia[n].index,g=X;for(X+=S;g<X;g+=3)S=ta+c[g],fa=
 3,e=new Uint16Array(a.length),f=0,g=0,h=[{start:0,count:0,index:0}],k=h[0],l=0,n=0,r=new Int32Array(6),p=new Int32Array(c.length),s=new Int32Array(c.length),u=0;u<c.length;u++)p[u]=-1,s[u]=-1;for(c=0;c<d;c++){for(var q=n=0;3>q;q++)u=a[3*c+q],-1==p[u]?(r[2*q]=u,r[2*q+1]=-1,n++):p[u]<k.index?(r[2*q]=u,r[2*q+1]=-1,l++):(r[2*q]=u,r[2*q+1]=p[u]);if(g+n>k.index+b)for(k={start:f,count:0,index:g},h.push(k),n=0;6>n;n+=2)q=r[n+1],-1<q&&q<k.index&&(r[n+1]=-1);for(n=0;6>n;n+=2)u=r[n],q=r[n+1],-1===q&&(q=g++),
 3,e=new Uint16Array(a.length),f=0,g=0,h=[{start:0,count:0,index:0}],k=h[0],l=0,n=0,r=new Int32Array(6),p=new Int32Array(c.length),s=new Int32Array(c.length),u=0;u<c.length;u++)p[u]=-1,s[u]=-1;for(c=0;c<d;c++){for(var q=n=0;3>q;q++)u=a[3*c+q],-1==p[u]?(r[2*q]=u,r[2*q+1]=-1,n++):p[u]<k.index?(r[2*q]=u,r[2*q+1]=-1,l++):(r[2*q]=u,r[2*q+1]=p[u]);if(g+n>k.index+b)for(k={start:f,count:0,index:g},h.push(k),n=0;6>n;n+=2)q=r[n+1],-1<q&&q<k.index&&(r[n+1]=-1);for(n=0;6>n;n+=2)u=r[n],q=r[n+1],-1===q&&(q=g++),
 p[u]=q,s[q]=u,e[f++]=q-k.index,k.count++}this.reorderBuffers(e,s,g);return this.offsets=h},reorderBuffers:function(a,b,c){var d={},e=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],f;for(f in this.attributes)if("index"!=f)for(var g=this.attributes[f].array,h=0,k=e.length;h<k;h++){var l=e[h];if(g instanceof l){d[f]=new l(this.attributes[f].itemSize*c);break}}for(e=0;e<c;e++)for(f in g=b[e],this.attributes)if("index"!=f)for(var h=this.attributes[f].array,
 p[u]=q,s[q]=u,e[f++]=q-k.index,k.count++}this.reorderBuffers(e,s,g);return this.offsets=h},reorderBuffers:function(a,b,c){var d={},e=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],f;for(f in this.attributes)if("index"!=f)for(var g=this.attributes[f].array,h=0,k=e.length;h<k;h++){var l=e[h];if(g instanceof l){d[f]=new l(this.attributes[f].itemSize*c);break}}for(e=0;e<c;e++)for(f in g=b[e],this.attributes)if("index"!=f)for(var h=this.attributes[f].array,
 k=this.attributes[f].itemSize,l=d[f],n=0;n<k;n++)l[e*k+n]=h[g*k+n];this.attributes.index.array=a;for(f in this.attributes)"index"!=f&&(this.attributes[f].array=d[f],this.attributes[f].numItems=this.attributes[f].itemSize*c)},clone:function(){var a=new THREE.BufferGeometry,b=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],c;for(c in this.attributes){for(var d=this.attributes[c],e=d.array,f={itemSize:d.itemSize,array:null},d=0,g=b.length;d<
 k=this.attributes[f].itemSize,l=d[f],n=0;n<k;n++)l[e*k+n]=h[g*k+n];this.attributes.index.array=a;for(f in this.attributes)"index"!=f&&(this.attributes[f].array=d[f],this.attributes[f].numItems=this.attributes[f].itemSize*c)},clone:function(){var a=new THREE.BufferGeometry,b=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],c;for(c in this.attributes){for(var d=this.attributes[c],e=d.array,f={itemSize:d.itemSize,array:null},d=0,g=b.length;d<
-g;d++){var h=b[d];if(e instanceof h){f.array=new h(e);break}}a.attributes[c]=f}d=0;for(g=this.offsets.length;d<g;d++)b=this.offsets[d],a.offsets.push({start:b.start,index:b.index,count:b.count});return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.BufferGeometryManipulator=function(a){this.vertices=[];this.normals=[];this.uvs=[];a=a.attributes;for(var b=0,c=a.position.array.length/3;b<c;b++)this.vertices.push(new THREE.TypedVector3(a.position.array,3*b)),this.normals.push(new THREE.TypedVector3(a.normal.array,3*b)),this.uvs.push(new THREE.TypedVector2(a.uv.array,2*b))};THREE.Geometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1;this.dynamic=!0;this.buffersNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.tangentsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=
+g;d++){var h=b[d];if(e instanceof h){f.array=new h(e);break}}a.attributes[c]=f}d=0;for(g=this.offsets.length;d<g;d++)b=this.offsets[d],a.offsets.push({start:b.start,index:b.index,count:b.count});return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.BufferGeometryManipulator=function(a){this.vertices=[];this.normals=[];this.uvs=[];a=a.attributes;for(var b=a.position.array.length/3,c=0;c<b;c++)this.vertices.push(new THREE.TypedVector3(a.position.array,3*c)),this.normals.push(new THREE.TypedVector3(a.normal.array,3*c)),this.uvs.push(new THREE.TypedVector2(a.uv.array,2*c))};THREE.Geometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1;this.dynamic=!0;this.buffersNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.tangentsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=
 this.elementsNeedUpdate=this.verticesNeedUpdate=!1};
 this.elementsNeedUpdate=this.verticesNeedUpdate=!1};
 THREE.Geometry.prototype={constructor:THREE.Geometry,applyMatrix:function(a){for(var b=(new THREE.Matrix3).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}this.boundingBox instanceof THREE.Box3&&this.computeBoundingBox();this.boundingSphere instanceof THREE.Sphere&&this.computeBoundingSphere()},
 THREE.Geometry.prototype={constructor:THREE.Geometry,applyMatrix:function(a){for(var b=(new THREE.Matrix3).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}this.boundingBox instanceof THREE.Box3&&this.computeBoundingBox();this.boundingSphere instanceof THREE.Sphere&&this.computeBoundingSphere()},
 computeFaceNormals:function(){for(var a=new THREE.Vector3,b=new THREE.Vector3,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){var b,c,d;d=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<c;b++)d[b]=new THREE.Vector3;if(a){var e,f,g,h=new THREE.Vector3,k=new THREE.Vector3;new THREE.Vector3;new THREE.Vector3;new THREE.Vector3;
 computeFaceNormals:function(){for(var a=new THREE.Vector3,b=new THREE.Vector3,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],g=this.vertices[e.b];a.subVectors(this.vertices[e.c],g);b.subVectors(f,g);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){var b,c,d;d=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<c;b++)d[b]=new THREE.Vector3;if(a){var e,f,g,h=new THREE.Vector3,k=new THREE.Vector3;new THREE.Vector3;new THREE.Vector3;new THREE.Vector3;
@@ -306,7 +306,7 @@ THREE.Texture.prototype={constructor:THREE.Texture,get needsUpdate(){return this
 this.generateMipmaps;a.premultiplyAlpha=this.premultiplyAlpha;a.flipY=this.flipY;a.unpackAlignment=this.unpackAlignment;return a},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.Texture.prototype);THREE.TextureIdCount=0;THREE.CompressedTexture=function(a,b,c,d,e,f,g,h,k,l,n){THREE.Texture.call(this,null,f,g,h,k,l,d,e,n);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=!1};THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CompressedTexture.prototype.clone=function(){var a=new THREE.CompressedTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.DataTexture=function(a,b,c,d,e,f,g,h,k,l,n){THREE.Texture.call(this,null,f,g,h,k,l,d,e,n);this.image={data:a,width:b,height:c}};THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DataTexture.prototype.clone=function(){var a=new THREE.DataTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.ParticleSystem=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.ParticleSystemMaterial({color:16777215*Math.random()});this.frustumCulled=this.sortParticles=!1};THREE.ParticleSystem.prototype=Object.create(THREE.Object3D.prototype);
 this.generateMipmaps;a.premultiplyAlpha=this.premultiplyAlpha;a.flipY=this.flipY;a.unpackAlignment=this.unpackAlignment;return a},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.Texture.prototype);THREE.TextureIdCount=0;THREE.CompressedTexture=function(a,b,c,d,e,f,g,h,k,l,n){THREE.Texture.call(this,null,f,g,h,k,l,d,e,n);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=!1};THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CompressedTexture.prototype.clone=function(){var a=new THREE.CompressedTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.DataTexture=function(a,b,c,d,e,f,g,h,k,l,n){THREE.Texture.call(this,null,f,g,h,k,l,d,e,n);this.image={data:a,width:b,height:c}};THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DataTexture.prototype.clone=function(){var a=new THREE.DataTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.ParticleSystem=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.ParticleSystemMaterial({color:16777215*Math.random()});this.frustumCulled=this.sortParticles=!1};THREE.ParticleSystem.prototype=Object.create(THREE.Object3D.prototype);
 THREE.ParticleSystem.prototype.clone=function(a){void 0===a&&(a=new THREE.ParticleSystem(this.geometry,this.material));a.sortParticles=this.sortParticles;THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Line=function(a,b,c){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.LineBasicMaterial({color:16777215*Math.random()});this.type=void 0!==c?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=Object.create(THREE.Object3D.prototype);THREE.Line.prototype.clone=function(a){void 0===a&&(a=new THREE.Line(this.geometry,this.material,this.type));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.MeshBasicMaterial({color:16777215*Math.random()});this.updateMorphTargets()};THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype);
 THREE.ParticleSystem.prototype.clone=function(a){void 0===a&&(a=new THREE.ParticleSystem(this.geometry,this.material));a.sortParticles=this.sortParticles;THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Line=function(a,b,c){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.LineBasicMaterial({color:16777215*Math.random()});this.type=void 0!==c?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=Object.create(THREE.Object3D.prototype);THREE.Line.prototype.clone=function(a){void 0===a&&(a=new THREE.Line(this.geometry,this.material,this.type));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.MeshBasicMaterial({color:16777215*Math.random()});this.updateMorphTargets()};THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetForcedOrder=[];this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}};
 THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetForcedOrder=[];this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}};
-THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.log("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};THREE.Mesh.prototype.clone=function(a){void 0===a&&(a=new THREE.Mesh(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Bone=function(a){THREE.Object3D.call(this);this.skin=a;this.skinMatrix=new THREE.Matrix4};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.update=function(a,b){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate)a?this.skinMatrix.multiplyMatrices(a,this.matrix):this.skinMatrix.copy(this.matrix),this.matrixWorldNeedsUpdate=!1,b=!0;var c,d=this.children.length;for(c=0;c<d;c++)this.children[c].update(this.skinMatrix,b)};THREE.SkinnedMesh=function(a,b,c){THREE.Mesh.call(this,a,b);this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;this.bones=[];this.boneMatrices=[];var d,e,f;if(this.geometry&&void 0!==this.geometry.bones){for(a=0;a<this.geometry.bones.length;a++)c=this.geometry.bones[a],d=c.pos,e=c.rotq,f=c.scl,b=this.addBone(),b.name=c.name,b.position.set(d[0],d[1],d[2]),b.quaternion.set(e[0],e[1],e[2],e[3]),void 0!==f?b.scale.set(f[0],f[1],f[2]):b.scale.set(1,1,1);for(a=0;a<this.bones.length;a++)c=
+THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.log("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};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;this.skinMatrix=new THREE.Matrix4};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.update=function(a,b){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate)a?this.skinMatrix.multiplyMatrices(a,this.matrix):this.skinMatrix.copy(this.matrix),this.matrixWorldNeedsUpdate=!1,b=!0;for(var c=0,d=this.children.length;c<d;c++)this.children[c].update(this.skinMatrix,b)};THREE.SkinnedMesh=function(a,b,c){THREE.Mesh.call(this,a,b);this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;this.bones=[];this.boneMatrices=[];var d,e,f;if(this.geometry&&void 0!==this.geometry.bones){for(a=0;a<this.geometry.bones.length;a++)c=this.geometry.bones[a],d=c.pos,e=c.rotq,f=c.scl,b=this.addBone(),b.name=c.name,b.position.set(d[0],d[1],d[2]),b.quaternion.set(e[0],e[1],e[2],e[3]),void 0!==f?b.scale.set(f[0],f[1],f[2]):b.scale.set(1,1,1);for(a=0;a<this.bones.length;a++)c=
 this.geometry.bones[a],b=this.bones[a],-1===c.parent?this.add(b):this.bones[c.parent].add(b);a=this.bones.length;this.useVertexTexture?(this.boneTextureHeight=this.boneTextureWidth=a=256<a?64:64<a?32:16<a?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=
 this.geometry.bones[a],b=this.bones[a],-1===c.parent?this.add(b):this.bones[c.parent].add(b);a=this.bones.length;this.useVertexTexture?(this.boneTextureHeight=this.boneTextureWidth=a=256<a?64:64<a?32:16<a?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*a);this.pose()}};THREE.SkinnedMesh.prototype=Object.create(THREE.Mesh.prototype);THREE.SkinnedMesh.prototype.addBone=function(a){void 0===a&&(a=new THREE.Bone(this));this.bones.push(a);return a};
 THREE.NearestFilter,this.boneTexture.generateMipmaps=!1,this.boneTexture.flipY=!1):this.boneMatrices=new Float32Array(16*a);this.pose()}};THREE.SkinnedMesh.prototype=Object.create(THREE.Mesh.prototype);THREE.SkinnedMesh.prototype.addBone=function(a){void 0===a&&(a=new THREE.Bone(this));this.bones.push(a);return a};
 THREE.SkinnedMesh.prototype.updateMatrixWorld=function(){var a=new THREE.Matrix4;return function(b){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||b)this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldNeedsUpdate=!1;b=0;for(var c=this.children.length;b<c;b++){var d=this.children[b];d instanceof THREE.Bone?d.update(this.identityMatrix,!1):d.updateMatrixWorld(!0)}if(void 0==this.boneInverses)for(this.boneInverses=
 THREE.SkinnedMesh.prototype.updateMatrixWorld=function(){var a=new THREE.Matrix4;return function(b){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||b)this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldNeedsUpdate=!1;b=0;for(var c=this.children.length;b<c;b++){var d=this.children[b];d instanceof THREE.Bone?d.update(this.identityMatrix,!1):d.updateMatrixWorld(!0)}if(void 0==this.boneInverses)for(this.boneInverses=
@@ -617,8 +617,8 @@ THREE.CombinedCamera.prototype.setLens=function(a,b){void 0===b&&(b=24);var c=2*
 THREE.CombinedCamera.prototype.toBackView=function(){this.rotation.x=0;this.rotation.y=Math.PI;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.CombinedCamera.prototype.toLeftView=function(){this.rotation.x=0;this.rotation.y=-Math.PI/2;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.CombinedCamera.prototype.toRightView=function(){this.rotation.x=0;this.rotation.y=Math.PI/2;this.rotation.z=0;this.rotationAutoUpdate=!1};
 THREE.CombinedCamera.prototype.toBackView=function(){this.rotation.x=0;this.rotation.y=Math.PI;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.CombinedCamera.prototype.toLeftView=function(){this.rotation.x=0;this.rotation.y=-Math.PI/2;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.CombinedCamera.prototype.toRightView=function(){this.rotation.x=0;this.rotation.y=Math.PI/2;this.rotation.z=0;this.rotationAutoUpdate=!1};
 THREE.CombinedCamera.prototype.toTopView=function(){this.rotation.x=-Math.PI/2;this.rotation.y=0;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.CombinedCamera.prototype.toBottomView=function(){this.rotation.x=Math.PI/2;this.rotation.y=0;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.BoxGeometry=function(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,q){var v,w=h.widthSegments,t=h.heightSegments,x=e/2,G=f/2,E=h.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)v="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)v="y",t=h.depthSegments;else if("z"===a&&"y"===b||"y"===a&&"z"===b)v="x",w=h.depthSegments;var P=w+1,H=t+1,C=e/w,L=f/t,A=new THREE.Vector3;A[v]=0<g?1:-1;for(e=0;e<H;e++)for(f=0;f<P;f++){var z=new THREE.Vector3;z[a]=(f*C-x)*c;z[b]=(e*L-G)*d;z[v]=g;h.vertices.push(z)}for(e=
 THREE.CombinedCamera.prototype.toTopView=function(){this.rotation.x=-Math.PI/2;this.rotation.y=0;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.CombinedCamera.prototype.toBottomView=function(){this.rotation.x=Math.PI/2;this.rotation.y=0;this.rotation.z=0;this.rotationAutoUpdate=!1};THREE.BoxGeometry=function(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,q){var v,w=h.widthSegments,t=h.heightSegments,x=e/2,G=f/2,E=h.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)v="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)v="y",t=h.depthSegments;else if("z"===a&&"y"===b||"y"===a&&"z"===b)v="x",w=h.depthSegments;var P=w+1,H=t+1,C=e/w,L=f/t,A=new THREE.Vector3;A[v]=0<g?1:-1;for(e=0;e<H;e++)for(f=0;f<P;f++){var z=new THREE.Vector3;z[a]=(f*C-x)*c;z[b]=(e*L-G)*d;z[v]=g;h.vertices.push(z)}for(e=
 0;e<t;e++)for(f=0;f<w;f++)G=f+P*e,a=f+P*(e+1),b=f+1+P*(e+1),c=f+1+P*e,d=new THREE.Vector2(f/w,1-e/t),g=new THREE.Vector2(f/w,1-(e+1)/t),v=new THREE.Vector2((f+1)/w,1-(e+1)/t),x=new THREE.Vector2((f+1)/w,1-e/t),G=new THREE.Face3(G+E,a+E,c+E),G.normal.copy(A),G.vertexNormals.push(A.clone(),A.clone(),A.clone()),G.materialIndex=q,h.faces.push(G),h.faceVertexUvs[0].push([d,g,x]),G=new THREE.Face3(a+E,b+E,c+E),G.normal.copy(A),G.vertexNormals.push(A.clone(),A.clone(),A.clone()),G.materialIndex=q,h.faces.push(G),
 0;e<t;e++)for(f=0;f<w;f++)G=f+P*e,a=f+P*(e+1),b=f+1+P*(e+1),c=f+1+P*e,d=new THREE.Vector2(f/w,1-e/t),g=new THREE.Vector2(f/w,1-(e+1)/t),v=new THREE.Vector2((f+1)/w,1-(e+1)/t),x=new THREE.Vector2((f+1)/w,1-e/t),G=new THREE.Face3(G+E,a+E,c+E),G.normal.copy(A),G.vertexNormals.push(A.clone(),A.clone(),A.clone()),G.materialIndex=q,h.faces.push(G),h.faceVertexUvs[0].push([d,g,x]),G=new THREE.Face3(a+E,b+E,c+E),G.normal.copy(A),G.vertexNormals.push(A.clone(),A.clone(),A.clone()),G.materialIndex=q,h.faces.push(G),
-h.faceVertexUvs[0].push([g.clone(),v,x.clone()])}THREE.Geometry.call(this);this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.widthSegments=d||1;this.heightSegments=e||1;this.depthSegments=f||1;var h=this;d=a/2;e=b/2;f=c/2;g("z","y",-1,-1,c,b,d,0);g("z","y",1,-1,c,b,-d,1);g("x","z",1,1,a,c,e,2);g("x","z",1,-1,a,c,-e,3);g("x","y",1,-1,a,b,f,4);g("x","y",-1,-1,a,b,-f,5);this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CircleGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=b+2,f=new Uint16Array(3*(b+1)),g=new Float32Array(3*e),h=new Float32Array(3*e),e=new Float32Array(2*e);h[2]=1;e[0]=0.5;e[1]=0.5;for(var k=3,l=2,n=0;n<=b;n++){f[k]=n+1;f[k+1]=n+2;f[k+2]=0;var r=c+n/b*d,p=a*Math.cos(r),r=a*Math.sin(r);g[k]=p;g[k+1]=r;h[k+2]=1;e[l]=(p/a+1)/2;e[l+1]=
-(r/a+1)/2;k+=3;l+=2}for(n=1;n<=b;n++)f[k]=n,f[k+1]=n+1,f[k+2]=0;this.attributes.index={array:f,itemSize:1};this.attributes.position={array:g,itemSize:3};this.attributes.normal={array:h,itemSize:3};this.attributes.uv={array:e,itemSize:2};this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.CircleGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.CubeGeometry=function(a,b,c,d,e,f){console.warn("DEPRECATED: THREE.CubeGeometry is deprecated. Use THREE.BoxGeometry instead.");return new THREE.BoxGeometry(a,b,c,d,e,f)};THREE.CylinderGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f};a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=d||8;e=e||1;f=void 0!==f?f:!1;var g=c/2,h,k,l=[],n=[];for(k=0;k<=e;k++){var r=[],p=[],s=k/e,u=s*(b-a)+a;for(h=0;h<=d;h++){var q=h/d,v=new THREE.Vector3;v.x=u*Math.sin(q*Math.PI*2);v.y=-s*c+g;v.z=u*Math.cos(q*Math.PI*2);this.vertices.push(v);r.push(this.vertices.length-1);p.push(new THREE.Vector2(q,
+h.faceVertexUvs[0].push([g.clone(),v,x.clone()])}THREE.Geometry.call(this);this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.widthSegments=d||1;this.heightSegments=e||1;this.depthSegments=f||1;var h=this;d=a/2;e=b/2;f=c/2;g("z","y",-1,-1,c,b,d,0);g("z","y",1,-1,c,b,-d,1);g("x","z",1,1,a,c,e,2);g("x","z",1,-1,a,c,-e,3);g("x","y",1,-1,a,b,f,4);g("x","y",-1,-1,a,b,-f,5);this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CircleGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=new Uint16Array(3*(b+1)),f=new Float32Array(3*(b+2)),g=new Float32Array(3*(b+2)),h=new Float32Array(2*(b+2));g[2]=1;h[0]=0.5;h[1]=0.5;for(var k=3,l=2,n=0;n<=b;n++){e[k]=n+1;e[k+1]=n+2;e[k+2]=0;var r=c+n/b*d,p=a*Math.cos(r),r=a*Math.sin(r);f[k]=p;f[k+1]=r;g[k+2]=1;h[l]=(p/a+1)/2;h[l+
+1]=(r/a+1)/2;k+=3;l+=2}for(n=1;n<=b;n++)e[k]=n,e[k+1]=n+1,e[k+2]=0;this.attributes.index={array:e,itemSize:1};this.attributes.position={array:f,itemSize:3};this.attributes.normal={array:g,itemSize:3};this.attributes.uv={array:h,itemSize:2};this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.CircleGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.CubeGeometry=function(a,b,c,d,e,f){console.warn("DEPRECATED: THREE.CubeGeometry is deprecated. Use THREE.BoxGeometry instead.");return new THREE.BoxGeometry(a,b,c,d,e,f)};THREE.CylinderGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f};a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=d||8;e=e||1;f=void 0!==f?f:!1;var g=c/2,h,k,l=[],n=[];for(k=0;k<=e;k++){var r=[],p=[],s=k/e,u=s*(b-a)+a;for(h=0;h<=d;h++){var q=h/d,v=new THREE.Vector3;v.x=u*Math.sin(q*Math.PI*2);v.y=-s*c+g;v.z=u*Math.cos(q*Math.PI*2);this.vertices.push(v);r.push(this.vertices.length-1);p.push(new THREE.Vector2(q,
 1-s))}l.push(r);n.push(p)}c=(b-a)/c;for(h=0;h<d;h++)for(0!==a?(r=this.vertices[l[0][h]].clone(),p=this.vertices[l[0][h+1]].clone()):(r=this.vertices[l[1][h]].clone(),p=this.vertices[l[1][h+1]].clone()),r.setY(Math.sqrt(r.x*r.x+r.z*r.z)*c).normalize(),p.setY(Math.sqrt(p.x*p.x+p.z*p.z)*c).normalize(),k=0;k<e;k++){var s=l[k][h],u=l[k+1][h],q=l[k+1][h+1],v=l[k][h+1],w=r.clone(),t=r.clone(),x=p.clone(),G=p.clone(),E=n[k][h].clone(),P=n[k+1][h].clone(),H=n[k+1][h+1].clone(),C=n[k][h+1].clone();this.faces.push(new THREE.Face3(s,
 1-s))}l.push(r);n.push(p)}c=(b-a)/c;for(h=0;h<d;h++)for(0!==a?(r=this.vertices[l[0][h]].clone(),p=this.vertices[l[0][h+1]].clone()):(r=this.vertices[l[1][h]].clone(),p=this.vertices[l[1][h+1]].clone()),r.setY(Math.sqrt(r.x*r.x+r.z*r.z)*c).normalize(),p.setY(Math.sqrt(p.x*p.x+p.z*p.z)*c).normalize(),k=0;k<e;k++){var s=l[k][h],u=l[k+1][h],q=l[k+1][h+1],v=l[k][h+1],w=r.clone(),t=r.clone(),x=p.clone(),G=p.clone(),E=n[k][h].clone(),P=n[k+1][h].clone(),H=n[k+1][h+1].clone(),C=n[k][h+1].clone();this.faces.push(new THREE.Face3(s,
 u,v,[w,t,G]));this.faceVertexUvs[0].push([E,P,C]);this.faces.push(new THREE.Face3(u,q,v,[t.clone(),x,G.clone()]));this.faceVertexUvs[0].push([P.clone(),H,C.clone()])}if(!1===f&&0<a)for(this.vertices.push(new THREE.Vector3(0,g,0)),h=0;h<d;h++)s=l[0][h],u=l[0][h+1],q=this.vertices.length-1,w=new THREE.Vector3(0,1,0),t=new THREE.Vector3(0,1,0),x=new THREE.Vector3(0,1,0),E=n[0][h].clone(),P=n[0][h+1].clone(),H=new THREE.Vector2(P.x,0),this.faces.push(new THREE.Face3(s,u,q,[w,t,x])),this.faceVertexUvs[0].push([E,
 u,v,[w,t,G]));this.faceVertexUvs[0].push([E,P,C]);this.faces.push(new THREE.Face3(u,q,v,[t.clone(),x,G.clone()]));this.faceVertexUvs[0].push([P.clone(),H,C.clone()])}if(!1===f&&0<a)for(this.vertices.push(new THREE.Vector3(0,g,0)),h=0;h<d;h++)s=l[0][h],u=l[0][h+1],q=this.vertices.length-1,w=new THREE.Vector3(0,1,0),t=new THREE.Vector3(0,1,0),x=new THREE.Vector3(0,1,0),E=n[0][h].clone(),P=n[0][h+1].clone(),H=new THREE.Vector2(P.x,0),this.faces.push(new THREE.Face3(s,u,q,[w,t,x])),this.faceVertexUvs[0].push([E,
 P,H]);if(!1===f&&0<b)for(this.vertices.push(new THREE.Vector3(0,-g,0)),h=0;h<d;h++)s=l[k][h+1],u=l[k][h],q=this.vertices.length-1,w=new THREE.Vector3(0,-1,0),t=new THREE.Vector3(0,-1,0),x=new THREE.Vector3(0,-1,0),E=n[k][h+1].clone(),P=n[k][h].clone(),H=new THREE.Vector2(P.x,1),this.faces.push(new THREE.Face3(s,u,q,[w,t,x])),this.faceVertexUvs[0].push([E,P,H]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),a=a instanceof Array?a:[a],this.shapebb=a[a.length-1].getBoundingBox(),this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};
 P,H]);if(!1===f&&0<b)for(this.vertices.push(new THREE.Vector3(0,-g,0)),h=0;h<d;h++)s=l[k][h+1],u=l[k][h],q=this.vertices.length-1,w=new THREE.Vector3(0,-1,0),t=new THREE.Vector3(0,-1,0),x=new THREE.Vector3(0,-1,0),E=n[k][h+1].clone(),P=n[k][h].clone(),H=new THREE.Vector2(P.x,1),this.faces.push(new THREE.Face3(s,u,q,[w,t,x])),this.faceVertexUvs[0].push([E,P,H]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),a=a instanceof Array?a:[a],this.shapebb=a[a.length-1].getBoundingBox(),this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};