Browse Source

Updated builds.

Mr.doob 9 years ago
parent
commit
2027b09159
2 changed files with 4 additions and 6 deletions
  1. 1 3
      build/three.js
  2. 3 3
      build/three.min.js

+ 1 - 3
build/three.js

@@ -21921,11 +21921,11 @@ THREE.Line.prototype.raycast = ( function () {
 
 			var index = geometry.index;
 			var attributes = geometry.attributes;
+			var positions = attributes.position.array;
 
 			if ( index !== null ) {
 
 				var indices = index.array;
-				var positions = attributes.position.array;
 
 				for ( var i = 0, l = indices.length - 1; i < l; i += step ) {
 
@@ -21962,8 +21962,6 @@ THREE.Line.prototype.raycast = ( function () {
 
 			} else {
 
-				var positions = attributes.position.array;
-
 				for ( var i = 0, l = positions.length / 3 - 1; i < l; i += step ) {
 
 					vStart.fromArray( positions, 3 * i );

+ 3 - 3
build/three.min.js

@@ -478,9 +478,9 @@ c.applyMatrix4(k);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ra
 THREE.Points.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.Line=function(a,b,c){if(1===c)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new THREE.LineSegments(a,b);THREE.Object3D.call(this);this.type="Line";this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.LineBasicMaterial({color:16777215*Math.random()})};THREE.Line.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Line.prototype.constructor=THREE.Line;
 THREE.Line.prototype.raycast=function(){var a=new THREE.Matrix4,b=new THREE.Ray,c=new THREE.Sphere;return function(d,e){var f=d.linePrecision,f=f*f,g=this.geometry,h=this.matrixWorld;null===g.boundingSphere&&g.computeBoundingSphere();c.copy(g.boundingSphere);c.applyMatrix4(h);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(h);b.copy(d.ray).applyMatrix4(a);var k=new THREE.Vector3,l=new THREE.Vector3,h=new THREE.Vector3,m=new THREE.Vector3,p=this instanceof THREE.LineSegments?2:1;if(g instanceof THREE.BufferGeometry){var n=
-g.index,g=g.attributes;if(null!==n)for(var n=n.array,q=g.position.array,g=0,t=n.length-1;g<t;g+=p){var u=n[g+1];k.fromArray(q,3*n[g]);l.fromArray(q,3*u);u=b.distanceSqToSegment(k,l,m,h);u>f||(m.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(m),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(q=g.position.array,g=0,t=q.length/3-1;g<t;g+=p)k.fromArray(q,3*g),l.fromArray(q,3*g+3),u=b.distanceSqToSegment(k,
-l,m,h),u>f||(m.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(m),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g instanceof THREE.Geometry)for(k=g.vertices,l=k.length,g=0;g<l-1;g+=p)u=b.distanceSqToSegment(k[g],k[g+1],m,h),u>f||(m.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(m),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,
-object:this}))}}}();THREE.Line.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.LineStrip=0;THREE.LinePieces=1;THREE.LineSegments=function(a,b){THREE.Line.call(this,a,b);this.type="LineSegments"};THREE.LineSegments.prototype=Object.create(THREE.Line.prototype);THREE.LineSegments.prototype.constructor=THREE.LineSegments;
+g.index,q=g.attributes.position.array;if(null!==n)for(var n=n.array,g=0,t=n.length-1;g<t;g+=p){var u=n[g+1];k.fromArray(q,3*n[g]);l.fromArray(q,3*u);u=b.distanceSqToSegment(k,l,m,h);u>f||(m.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(m),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,t=q.length/3-1;g<t;g+=p)k.fromArray(q,3*g),l.fromArray(q,3*g+3),u=b.distanceSqToSegment(k,l,m,h),u>f||(m.applyMatrix4(this.matrixWorld),
+u=d.ray.origin.distanceTo(m),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g instanceof THREE.Geometry)for(k=g.vertices,l=k.length,g=0;g<l-1;g+=p)u=b.distanceSqToSegment(k[g],k[g+1],m,h),u>f||(m.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(m),u<d.near||u>d.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}();
+THREE.Line.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.LineStrip=0;THREE.LinePieces=1;THREE.LineSegments=function(a,b){THREE.Line.call(this,a,b);this.type="LineSegments"};THREE.LineSegments.prototype=Object.create(THREE.Line.prototype);THREE.LineSegments.prototype.constructor=THREE.LineSegments;
 THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.MeshBasicMaterial({color:16777215*Math.random()});this.drawMode=THREE.TrianglesDrawMode;this.updateMorphTargets()};THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype);THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.setDrawMode=function(a){this.drawMode=a};
 THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;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.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};