瀏覽代碼

Updated builds.

Mr.doob 10 年之前
父節點
當前提交
ddedfe29ab
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 2 1
      build/three.js
  2. 2 2
      build/three.min.js

+ 2 - 1
build/three.js

@@ -16858,7 +16858,8 @@ THREE.Line = function ( geometry, material, mode ) {
 
 	if ( mode === 1 ) {
 
-		console.error( 'THREE.Line: THREE.LinePieces mode has been removed. Use THREE.LineSegments instead.' );
+		console.warn( 'THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead.' );
+		return new THREE.LineSegments( geometry, material );
 
 	}
 

+ 2 - 2
build/three.min.js

@@ -380,8 +380,8 @@ THREE.PointCloud=function(a,b){THREE.Object3D.call(this);this.type="PointCloud";
 THREE.PointCloud.prototype.raycast=function(){var a=new THREE.Matrix4,b=new THREE.Ray;return function(c,d){var e=this,g=e.geometry,f=c.params.PointCloud.threshold;a.getInverse(this.matrixWorld);b.copy(c.ray).applyMatrix4(a);if(null===g.boundingBox||!1!==b.isIntersectionBox(g.boundingBox)){var f=f/((this.scale.x+this.scale.y+this.scale.z)/3),h=f*f,k=new THREE.Vector3,f=function(a,f){var g=b.distanceSqToPoint(a);if(g<h){var k=b.closestPointToPoint(a);k.applyMatrix4(e.matrixWorld);var l=c.ray.origin.distanceTo(k);
 l<c.near||l>c.far||d.push({distance:l,distanceToRay:Math.sqrt(g),point:k.clone(),index:f,face:null,object:e})}};if(g instanceof THREE.BufferGeometry){var m=g.attributes,n=m.position.array;if(void 0!==m.index){var m=m.index.array,p=g.groups;0===p.length&&(p=[{start:0,count:m.length}]);for(var l=0,q=p.length;l<q;++l)for(var s=p[l],r=s.start,g=r,s=r+s.count;g<s;g++)r=m[g],k.fromArray(n,3*r),f(k,r)}else for(g=0,m=n.length/3;g<m;g++)k.fromArray(n,3*g),f(k,g)}else for(k=g.vertices,g=0,m=k.length;g<m;g++)f(k[g],
 g)}}}();THREE.PointCloud.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.PointCloud.prototype.toJSON=function(a){var b=THREE.Object3D.prototype.toJSON.call(this,a);void 0===a.geometries[this.geometry.uuid]&&(a.geometries[this.geometry.uuid]=this.geometry.toJSON());void 0===a.materials[this.material.uuid]&&(a.materials[this.material.uuid]=this.material.toJSON());b.object.geometry=this.geometry.uuid;b.object.material=this.material.uuid;return b};
-THREE.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.PointCloud.");return new THREE.PointCloud(a,b)};THREE.Line=function(a,b,c){1===c&&console.error("THREE.Line: THREE.LinePieces mode has been removed. Use THREE.LineSegments instead.");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.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.PointCloud.");return new THREE.PointCloud(a,b)};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 g=d.linePrecision,g=g*g,f=this.geometry;null===f.boundingSphere&&f.computeBoundingSphere();c.copy(f.boundingSphere);c.applyMatrix4(this.matrixWorld);if(!1!==d.ray.isIntersectionSphere(c)){a.getInverse(this.matrixWorld);b.copy(d.ray).applyMatrix4(a);var h=new THREE.Vector3,k=new THREE.Vector3,m=new THREE.Vector3,n=new THREE.Vector3,p=this instanceof THREE.LineSegments?2:1;if(f instanceof
 THREE.BufferGeometry){var l=f.attributes;if(void 0!==l.index){var q=l.index.array,l=l.position.array,s=f.groups;0===s.length&&(s=[{start:0,count:q.length}]);for(var r=0;r<s.length;r++)for(var f=s[r],u=f.start,x=f.count,f=u;f<u+x-1;f+=p){var v=q[f+1];h.fromArray(l,3*q[f]);k.fromArray(l,3*v);v=b.distanceSqToSegment(h,k,n,m);v>g||(v=b.origin.distanceTo(n),v<d.near||v>d.far||e.push({distance:v,point:m.clone().applyMatrix4(this.matrixWorld),index:f,offsetIndex:r,face:null,faceIndex:null,object:this}))}}else for(l=
 l.position.array,f=0;f<l.length/3-1;f+=p)h.fromArray(l,3*f),k.fromArray(l,3*f+3),v=b.distanceSqToSegment(h,k,n,m),v>g||(v=b.origin.distanceTo(n),v<d.near||v>d.far||e.push({distance:v,point:m.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(f instanceof THREE.Geometry)for(h=f.vertices,k=h.length,f=0;f<k-1;f+=p)v=b.distanceSqToSegment(h[f],h[f+1],n,m),v>g||(v=b.origin.distanceTo(n),v<d.near||v>d.far||e.push({distance:v,point:m.clone().applyMatrix4(this.matrixWorld),