Skip to content

Commit 317346d

Browse files
committed
Updated builds.
1 parent 3e2a373 commit 317346d

File tree

4 files changed

+100
-58
lines changed

4 files changed

+100
-58
lines changed

build/three.cjs

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4837,9 +4837,7 @@ class Box3 {
48374837

48384838
distanceToPoint( point ) {
48394839

4840-
const clampedPoint = _vector$b.copy( point ).clamp( this.min, this.max );
4841-
4842-
return clampedPoint.sub( point ).length();
4840+
return this.clampPoint( point, _vector$b ).distanceTo( point );
48434841

48444842
}
48454843

@@ -5255,7 +5253,7 @@ class Ray {
52555253

52565254
at( t, target ) {
52575255

5258-
return target.copy( this.direction ).multiplyScalar( t ).add( this.origin );
5256+
return target.copy( this.origin ).addScaledVector( this.direction, t );
52595257

52605258
}
52615259

@@ -5287,7 +5285,7 @@ class Ray {
52875285

52885286
}
52895287

5290-
return target.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );
5288+
return target.copy( this.origin ).addScaledVector( this.direction, directionDistance );
52915289

52925290
}
52935291

@@ -5309,7 +5307,7 @@ class Ray {
53095307

53105308
}
53115309

5312-
_vector$a.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );
5310+
_vector$a.copy( this.origin ).addScaledVector( this.direction, directionDistance );
53135311

53145312
return _vector$a.distanceToSquared( point );
53155313

@@ -5420,13 +5418,13 @@ class Ray {
54205418

54215419
if ( optionalPointOnRay ) {
54225420

5423-
optionalPointOnRay.copy( this.direction ).multiplyScalar( s0 ).add( this.origin );
5421+
optionalPointOnRay.copy( this.origin ).addScaledVector( this.direction, s0 );
54245422

54255423
}
54265424

54275425
if ( optionalPointOnSegment ) {
54285426

5429-
optionalPointOnSegment.copy( _segDir ).multiplyScalar( s1 ).add( _segCenter );
5427+
optionalPointOnSegment.copy( _segCenter ).addScaledVector( _segDir, s1 );
54305428

54315429
}
54325430

@@ -12396,7 +12394,7 @@ class Plane {
1239612394

1239712395
projectPoint( point, target ) {
1239812396

12399-
return target.copy( this.normal ).multiplyScalar( - this.distanceToPoint( point ) ).add( point );
12397+
return target.copy( point ).addScaledVector( this.normal, - this.distanceToPoint( point ) );
1240012398

1240112399
}
1240212400

@@ -12428,7 +12426,7 @@ class Plane {
1242812426

1242912427
}
1243012428

12431-
return target.copy( direction ).multiplyScalar( t ).add( line.start );
12429+
return target.copy( line.start ).addScaledVector( direction, t );
1243212430

1243312431
}
1243412432

@@ -16833,7 +16831,7 @@ function WebGLMorphtargets( gl, capabilities, textures ) {
1683316831

1683416832
}
1683516833

16836-
function update( object, geometry, material, program ) {
16834+
function update( object, geometry, program ) {
1683716835

1683816836
const objectInfluences = object.morphTargetInfluences;
1683916837

@@ -28758,7 +28756,7 @@ function WebGLRenderer( parameters = {} ) {
2875828756

2875928757
if ( morphAttributes.position !== undefined || morphAttributes.normal !== undefined || ( morphAttributes.color !== undefined && capabilities.isWebGL2 === true ) ) {
2876028758

28761-
morphtargets.update( object, geometry, material, program );
28759+
morphtargets.update( object, geometry, program );
2876228760

2876328761
}
2876428762

@@ -32698,13 +32696,15 @@ class LineCurve extends Curve {
3269832696

3269932697
}
3270032698

32701-
getTangent( t, optionalTarget ) {
32699+
getTangent( t, optionalTarget = new Vector2() ) {
3270232700

32703-
const tangent = optionalTarget || new Vector2();
32701+
return optionalTarget.subVectors( this.v2, this.v1 ).normalize();
3270432702

32705-
tangent.copy( this.v2 ).sub( this.v1 ).normalize();
32703+
}
3270632704

32707-
return tangent;
32705+
getTangentAt( u, optionalTarget ) {
32706+
32707+
return this.getTangent( u, optionalTarget );
3270832708

3270932709
}
3271032710

@@ -32781,6 +32781,19 @@ class LineCurve3 extends Curve {
3278132781
return this.getPoint( u, optionalTarget );
3278232782

3278332783
}
32784+
32785+
getTangent( t, optionalTarget = new Vector3() ) {
32786+
32787+
return optionalTarget.subVectors( this.v2, this.v1 ).normalize();
32788+
32789+
}
32790+
32791+
getTangentAt( u, optionalTarget ) {
32792+
32793+
return this.getTangent( u, optionalTarget );
32794+
32795+
}
32796+
3278432797
copy( source ) {
3278532798

3278632799
super.copy( source );
@@ -35761,7 +35774,7 @@ class ExtrudeGeometry extends BufferGeometry {
3576135774

3576235775
if ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );
3576335776

35764-
return vec.clone().multiplyScalar( size ).add( pt );
35777+
return pt.clone().addScaledVector( vec, size );
3576535778

3576635779
}
3576735780

@@ -48334,8 +48347,7 @@ class Box2 {
4833448347

4833548348
distanceToPoint( point ) {
4833648349

48337-
const clampedPoint = _vector$4.copy( point ).clamp( this.min, this.max );
48338-
return clampedPoint.sub( point ).length();
48350+
return this.clampPoint( point, _vector$4 ).distanceTo( point );
4833948351

4834048352
}
4834148353

@@ -48344,6 +48356,8 @@ class Box2 {
4834448356
this.min.max( box.min );
4834548357
this.max.min( box.max );
4834648358

48359+
if ( this.isEmpty() ) this.makeEmpty();
48360+
4834748361
return this;
4834848362

4834948363
}

build/three.js

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4842,9 +4842,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
48424842

48434843
distanceToPoint( point ) {
48444844

4845-
const clampedPoint = _vector$b.copy( point ).clamp( this.min, this.max );
4846-
4847-
return clampedPoint.sub( point ).length();
4845+
return this.clampPoint( point, _vector$b ).distanceTo( point );
48484846

48494847
}
48504848

@@ -5260,7 +5258,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
52605258

52615259
at( t, target ) {
52625260

5263-
return target.copy( this.direction ).multiplyScalar( t ).add( this.origin );
5261+
return target.copy( this.origin ).addScaledVector( this.direction, t );
52645262

52655263
}
52665264

@@ -5292,7 +5290,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
52925290

52935291
}
52945292

5295-
return target.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );
5293+
return target.copy( this.origin ).addScaledVector( this.direction, directionDistance );
52965294

52975295
}
52985296

@@ -5314,7 +5312,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
53145312

53155313
}
53165314

5317-
_vector$a.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );
5315+
_vector$a.copy( this.origin ).addScaledVector( this.direction, directionDistance );
53185316

53195317
return _vector$a.distanceToSquared( point );
53205318

@@ -5425,13 +5423,13 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
54255423

54265424
if ( optionalPointOnRay ) {
54275425

5428-
optionalPointOnRay.copy( this.direction ).multiplyScalar( s0 ).add( this.origin );
5426+
optionalPointOnRay.copy( this.origin ).addScaledVector( this.direction, s0 );
54295427

54305428
}
54315429

54325430
if ( optionalPointOnSegment ) {
54335431

5434-
optionalPointOnSegment.copy( _segDir ).multiplyScalar( s1 ).add( _segCenter );
5432+
optionalPointOnSegment.copy( _segCenter ).addScaledVector( _segDir, s1 );
54355433

54365434
}
54375435

@@ -12401,7 +12399,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
1240112399

1240212400
projectPoint( point, target ) {
1240312401

12404-
return target.copy( this.normal ).multiplyScalar( - this.distanceToPoint( point ) ).add( point );
12402+
return target.copy( point ).addScaledVector( this.normal, - this.distanceToPoint( point ) );
1240512403

1240612404
}
1240712405

@@ -12433,7 +12431,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
1243312431

1243412432
}
1243512433

12436-
return target.copy( direction ).multiplyScalar( t ).add( line.start );
12434+
return target.copy( line.start ).addScaledVector( direction, t );
1243712435

1243812436
}
1243912437

@@ -16838,7 +16836,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
1683816836

1683916837
}
1684016838

16841-
function update( object, geometry, material, program ) {
16839+
function update( object, geometry, program ) {
1684216840

1684316841
const objectInfluences = object.morphTargetInfluences;
1684416842

@@ -28763,7 +28761,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2876328761

2876428762
if ( morphAttributes.position !== undefined || morphAttributes.normal !== undefined || ( morphAttributes.color !== undefined && capabilities.isWebGL2 === true ) ) {
2876528763

28766-
morphtargets.update( object, geometry, material, program );
28764+
morphtargets.update( object, geometry, program );
2876728765

2876828766
}
2876928767

@@ -32703,13 +32701,15 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
3270332701

3270432702
}
3270532703

32706-
getTangent( t, optionalTarget ) {
32704+
getTangent( t, optionalTarget = new Vector2() ) {
3270732705

32708-
const tangent = optionalTarget || new Vector2();
32706+
return optionalTarget.subVectors( this.v2, this.v1 ).normalize();
3270932707

32710-
tangent.copy( this.v2 ).sub( this.v1 ).normalize();
32708+
}
3271132709

32712-
return tangent;
32710+
getTangentAt( u, optionalTarget ) {
32711+
32712+
return this.getTangent( u, optionalTarget );
3271332713

3271432714
}
3271532715

@@ -32786,6 +32786,19 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
3278632786
return this.getPoint( u, optionalTarget );
3278732787

3278832788
}
32789+
32790+
getTangent( t, optionalTarget = new Vector3() ) {
32791+
32792+
return optionalTarget.subVectors( this.v2, this.v1 ).normalize();
32793+
32794+
}
32795+
32796+
getTangentAt( u, optionalTarget ) {
32797+
32798+
return this.getTangent( u, optionalTarget );
32799+
32800+
}
32801+
3278932802
copy( source ) {
3279032803

3279132804
super.copy( source );
@@ -35766,7 +35779,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
3576635779

3576735780
if ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );
3576835781

35769-
return vec.clone().multiplyScalar( size ).add( pt );
35782+
return pt.clone().addScaledVector( vec, size );
3577035783

3577135784
}
3577235785

@@ -48339,8 +48352,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
4833948352

4834048353
distanceToPoint( point ) {
4834148354

48342-
const clampedPoint = _vector$4.copy( point ).clamp( this.min, this.max );
48343-
return clampedPoint.sub( point ).length();
48355+
return this.clampPoint( point, _vector$4 ).distanceTo( point );
4834448356

4834548357
}
4834648358

@@ -48349,6 +48361,8 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
4834948361
this.min.max( box.min );
4835048362
this.max.min( box.max );
4835148363

48364+
if ( this.isEmpty() ) this.makeEmpty();
48365+
4835248366
return this;
4835348367

4835448368
}

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)