diff --git a/build/three.js b/build/three.js index de4515c8241caf756bfdcecf6c6d5676fdd2371c..8eec2058519c29ea0f337cd50fb97c34f716d804 100644 --- a/build/three.js +++ b/build/three.js @@ -33840,7 +33840,7 @@ // Virtual base class method to overwrite and implement in subclasses // - t [0 .. 1] - getPoint: function ( t ) { + getPoint: function () { console.warn( "THREE.Curve: Warning, getPoint() not implemented!" ); return null; @@ -33861,7 +33861,7 @@ getPoints: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = 5; + if ( divisions === undefined ) divisions = 5; var points = []; @@ -33879,7 +33879,7 @@ getSpacedPoints: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = 5; + if ( divisions === undefined ) divisions = 5; var points = []; @@ -33906,7 +33906,7 @@ getLengths: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200; + if ( divisions === undefined ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200; if ( this.cacheArcLengths && ( this.cacheArcLengths.length === divisions + 1 ) @@ -33927,7 +33927,7 @@ for ( p = 1; p <= divisions; p ++ ) { - current = this.getPoint ( p / divisions ); + current = this.getPoint( p / divisions ); sum += current.distanceTo( last ); cache.push( sum ); last = current; @@ -33940,7 +33940,7 @@ }, - updateArcLengths: function() { + updateArcLengths: function () { this.needsUpdate = true; this.getLengths(); @@ -34033,7 +34033,7 @@ // 2 points a small delta apart will be used to find its gradient // which seems to give a reasonable approximation - getTangent: function( t ) { + getTangent: function ( t ) { var delta = 0.0001; var t1 = t - delta; @@ -34357,7 +34357,7 @@ getSpacedPoints: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = 40; + if ( divisions === undefined ) divisions = 40; var points = []; diff --git a/build/three.min.js b/build/three.min.js index 1db838c6b3774955d4845fcd3d7d772e12f240b6..feab6893c8c3d745071ca74b4953c0b169fb4248 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -692,14 +692,14 @@ b.near,b.far);break;case "AmbientLight":g=new Ad(b.color,b.intensity);break;case case "Line":g=new Na(e(b.geometry),f(b.material),b.mode);break;case "LineLoop":g=new pd(e(b.geometry),f(b.material));break;case "LineSegments":g=new fa(e(b.geometry),f(b.material));break;case "PointCloud":case "Points":g=new Mb(e(b.geometry),f(b.material));break;case "Sprite":g=new Cc(f(b.material));break;case "Group":g=new Ec;break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh type. Instantiates Object3D instead.");default:g=new x}g.uuid=b.uuid;void 0!== b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.quaternion&&g.quaternion.fromArray(b.quaternion),void 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=b.receiveShadow);b.shadow&&(void 0!==b.shadow.bias&&(g.shadow.bias=b.shadow.bias), void 0!==b.shadow.radius&&(g.shadow.radius=b.shadow.radius),void 0!==b.shadow.mapSize&&g.shadow.mapSize.fromArray(b.shadow.mapSize),void 0!==b.shadow.camera&&(g.shadow.camera=this.parseObject(b.shadow.camera)));void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=b.userData);if(void 0!==b.children)for(var m in b.children)g.add(this.parseObject(b.children[m],c,d));if("LOD"===b.type)for(b=b.levels,h=0;hm)g=d+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(N.clamp(d[m-1].dot(d[m]),-1,1)),e[m].applyMatrix4(h.makeRotationAxis(g, +m&&g.addLevel(m,l.distance)}return g}}()});Object.assign(Ba.prototype,{getPoint:function(){console.warn("THREE.Curve: Warning, getPoint() not implemented!");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths(); +return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.__arcLengthDivisions?this.__arcLengthDivisions:200);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(), +d,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,h=e-1,m;g<=h;)if(d=Math.floor(g+(h-g)/2),m=c[d]-f,0>m)g=d+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(N.clamp(d[m-1].dot(d[m]),-1,1)),e[m].applyMatrix4(h.makeRotationAxis(g, c))),f[m].crossVectors(d[m],e[m]);if(!0===b)for(c=Math.acos(N.clamp(e[0].dot(e[a]),-1,1)),c/=a,0= -b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;cc;)c+=b;for(;c>b;)c-=b;cb.length- 2?b.length-1:a+1],b=b[a>b.length-3?b.length-1:a+2];return new D(Oe(c,d.x,e.x,f.x,b.x),Oe(c,d.y,e.y,f.y,b.y))};gc.prototype=Object.create(Ba.prototype);gc.prototype.constructor=gc;gc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new D(zb(a,b.x,c.x,d.x,e.x),zb(a,b.y,c.y,d.y,e.y))};hc.prototype=Object.create(Ba.prototype);hc.prototype.constructor=hc;hc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new D(yb(a,b.x,c.x,d.x),yb(a,b.y,c.y,d.y))}; diff --git a/build/three.module.js b/build/three.module.js index 85af9bfd8f23f45f70c431d36bf3fd95d1f7c081..f775c1ca13fe6c659d305d8dd53fa09dc1654e2e 100644 --- a/build/three.module.js +++ b/build/three.module.js @@ -33834,7 +33834,7 @@ Object.assign( Curve.prototype, { // Virtual base class method to overwrite and implement in subclasses // - t [0 .. 1] - getPoint: function ( t ) { + getPoint: function () { console.warn( "THREE.Curve: Warning, getPoint() not implemented!" ); return null; @@ -33855,7 +33855,7 @@ Object.assign( Curve.prototype, { getPoints: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = 5; + if ( divisions === undefined ) divisions = 5; var points = []; @@ -33873,7 +33873,7 @@ Object.assign( Curve.prototype, { getSpacedPoints: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = 5; + if ( divisions === undefined ) divisions = 5; var points = []; @@ -33900,7 +33900,7 @@ Object.assign( Curve.prototype, { getLengths: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200; + if ( divisions === undefined ) divisions = ( this.__arcLengthDivisions ) ? ( this.__arcLengthDivisions ) : 200; if ( this.cacheArcLengths && ( this.cacheArcLengths.length === divisions + 1 ) @@ -33921,7 +33921,7 @@ Object.assign( Curve.prototype, { for ( p = 1; p <= divisions; p ++ ) { - current = this.getPoint ( p / divisions ); + current = this.getPoint( p / divisions ); sum += current.distanceTo( last ); cache.push( sum ); last = current; @@ -33934,7 +33934,7 @@ Object.assign( Curve.prototype, { }, - updateArcLengths: function() { + updateArcLengths: function () { this.needsUpdate = true; this.getLengths(); @@ -34027,7 +34027,7 @@ Object.assign( Curve.prototype, { // 2 points a small delta apart will be used to find its gradient // which seems to give a reasonable approximation - getTangent: function( t ) { + getTangent: function ( t ) { var delta = 0.0001; var t1 = t - delta; @@ -34351,7 +34351,7 @@ CurvePath.prototype = Object.assign( Object.create( Curve.prototype ), { getSpacedPoints: function ( divisions ) { - if ( isNaN( divisions ) ) divisions = 40; + if ( divisions === undefined ) divisions = 40; var points = [];