提交 44840a94 编写于 作者: M Mr.doob

Updated builds.

上级 18f14f8c
......@@ -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 = [];
......
......@@ -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;h<b.length;h++){var l=b[h];m=g.getObjectByProperty("uuid",l.object);void 0!==
m&&g.addLevel(m,l.distance)}return g}}()});Object.assign(Ba.prototype,{getPoint:function(a){console.warn("THREE.Curve: Warning, getPoint() not implemented!");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){isNaN(a)&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){isNaN(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){isNaN(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(0<m)h=d-1;else{h=d;break}d=h;if(c[d]===f)return d/(e-1);g=c[d];return(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new q,d=[],e=[],f=[],g=new q,h=new S,m,l;for(m=0;m<=a;m++)l=
m/a,d[m]=this.getTangentAt(l),d[m].normalize();e[0]=new q;f[0]=new q;m=Number.MAX_VALUE;l=Math.abs(d[0].x);var k=Math.abs(d[0].y),p=Math.abs(d[0].z);l<=m&&(m=l,c.set(1,0,0));k<=m&&(m=k,c.set(0,1,0));p<=m&&c.set(0,0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(m=1;m<=a;m++)e[m]=e[m-1].clone(),f[m]=f[m-1].clone(),g.crossVectors(d[m-1],d[m]),g.length()>Number.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(0<m)h=d-1;else{h=d;break}d=h;if(c[d]===f)return d/(e-1);g=c[d];return(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new q,d=[],e=[],f=[],g=new q,h=new S,m,l;
for(m=0;m<=a;m++)l=m/a,d[m]=this.getTangentAt(l),d[m].normalize();e[0]=new q;f[0]=new q;m=Number.MAX_VALUE;l=Math.abs(d[0].x);var k=Math.abs(d[0].y),p=Math.abs(d[0].z);l<=m&&(m=l,c.set(1,0,0));k<=m&&(m=k,c.set(0,1,0));p<=m&&c.set(0,0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(m=1;m<=a;m++)e[m]=e[m-1].clone(),f[m]=f[m-1].clone(),g.crossVectors(d[m-1],d[m]),g.length()>Number.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<d[0].dot(g.crossVectors(e[0],e[a]))&&(c=-c),m=1;m<=a;m++)e[m].applyMatrix4(h.makeRotationAxis(d[m],c*m)),f[m].crossVectors(d[m],e[m]);return{tangents:d,normals:e,binormals:f}}});Ta.prototype=Object.create(Ba.prototype);Ta.prototype.constructor=Ta;Ta.prototype.isLineCurve=!0;Ta.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);
return b};Ta.prototype.getPointAt=function(a){return this.getPoint(a)};Ta.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};Zc.prototype=Object.assign(Object.create(Ba.prototype),{constructor:Zc,add:function(a){this.curves.push(a)},closePath:function(){var a=this.curves[0].getPoint(0),b=this.curves[this.curves.length-1].getPoint(1);a.equals(b)||this.curves.push(new Ta(b,a))},getPoint:function(a){var b=a*this.getLength(),c=this.getCurveLengths();for(a=0;a<c.length;){if(c[a]>=
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;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){isNaN(a)&&
(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++)for(var f=e[d],f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&f.isLineCurve?1:f&&f.isSplineCurve?a*f.points.length:a),g=0;g<f.length;g++){var h=f[g];c&&c.equals(h)||(b.push(h),c=h)}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},createPointsGeometry:function(a){a=this.getPoints(a);return this.createGeometry(a)},
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;c<d;c++)b+=this.curves[c].getLength(),a.push(b);return this.cacheLengths=a},getSpacedPoints:function(a){void 0===
a&&(a=40);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var b=[],c,d=0,e=this.curves;d<e.length;d++)for(var f=e[d],f=f.getPoints(f&&f.isEllipseCurve?2*a:f&&f.isLineCurve?1:f&&f.isSplineCurve?a*f.points.length:a),g=0;g<f.length;g++){var h=f[g];c&&c.equals(h)||(b.push(h),c=h)}this.autoClose&&1<b.length&&!b[b.length-1].equals(b[0])&&b.push(b[0]);return b},createPointsGeometry:function(a){a=this.getPoints(a);return this.createGeometry(a)},
createSpacedPointsGeometry:function(a){a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){for(var b=new T,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new q(e.x,e.y,e.z||0))}return b}});Xa.prototype=Object.create(Ba.prototype);Xa.prototype.constructor=Xa;Xa.prototype.isEllipseCurve=!0;Xa.prototype.getPoint=function(a){for(var b=2*Math.PI,c=this.aEndAngle-this.aStartAngle,d=Math.abs(c)<Number.EPSILON;0>c;)c+=b;for(;c>b;)c-=b;c<Number.EPSILON&&(c=d?0:b);!0!==this.aClockwise||
d||(c=c===b?-b:c-b);b=this.aStartAngle+a*c;a=this.aX+this.xRadius*Math.cos(b);var e=this.aY+this.yRadius*Math.sin(b);0!==this.aRotation&&(b=Math.cos(this.aRotation),c=Math.sin(this.aRotation),d=a-this.aX,e-=this.aY,a=d*b-e*c+this.aX,e=d*c+e*b+this.aY);return new D(a,e)};Ab.prototype=Object.create(Ba.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isSplineCurve=!0;Ab.prototype.getPoint=function(a){var b=this.points,c=(b.length-1)*a;a=Math.floor(c);var c=c-a,d=b[0===a?a:a-1],e=b[a],f=b[a>b.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))};
......
......@@ -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 = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册