Skip to content

Commit dff36c0

Browse files
committed
Curve.Utils and Shape.Utils to CurveUtils and ShapeUtils.
1 parent d0582f1 commit dff36c0

11 files changed

+36
-36
lines changed

src/extras/FontUtils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ THREE.FontUtils = {
174174
for ( i2 = 1, divisions = this.divisions; i2 <= divisions; i2 ++ ) {
175175

176176
var t = i2 / divisions;
177-
THREE.Shape.Utils.b2( t, cpx0, cpx1, cpx );
178-
THREE.Shape.Utils.b2( t, cpy0, cpy1, cpy );
177+
THREE.ShapeUtils.b2( t, cpx0, cpx1, cpx );
178+
THREE.ShapeUtils.b2( t, cpy0, cpy1, cpy );
179179

180180
}
181181

@@ -206,8 +206,8 @@ THREE.FontUtils = {
206206
for ( i2 = 1, divisions = this.divisions; i2 <= divisions; i2 ++ ) {
207207

208208
var t = i2 / divisions;
209-
THREE.Shape.Utils.b3( t, cpx0, cpx1, cpx2, cpx );
210-
THREE.Shape.Utils.b3( t, cpy0, cpy1, cpy2, cpy );
209+
THREE.ShapeUtils.b3( t, cpx0, cpx1, cpx2, cpx );
210+
THREE.ShapeUtils.b3( t, cpy0, cpy1, cpy2, cpy );
211211

212212
}
213213

src/extras/core/Path.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) {
253253

254254
var t = j / divisions;
255255

256-
tx = THREE.Shape.Utils.b2( t, cpx0, cpx1, cpx );
257-
ty = THREE.Shape.Utils.b2( t, cpy0, cpy1, cpy );
256+
tx = THREE.ShapeUtils.b2( t, cpx0, cpx1, cpx );
257+
ty = THREE.ShapeUtils.b2( t, cpy0, cpy1, cpy );
258258

259259
points.push( new THREE.Vector2( tx, ty ) );
260260

@@ -591,7 +591,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
591591

592592
}
593593

594-
var holesFirst = ! THREE.Shape.Utils.isClockWise( subPaths[ 0 ].getPoints() );
594+
var holesFirst = ! THREE.ShapeUtils.isClockWise( subPaths[ 0 ].getPoints() );
595595
holesFirst = isCCW ? ! holesFirst : holesFirst;
596596

597597
// console.log("Holes first", holesFirst);
@@ -609,7 +609,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) {
609609

610610
tmpPath = subPaths[ i ];
611611
tmpPoints = tmpPath.getPoints();
612-
solid = THREE.Shape.Utils.isClockWise( tmpPoints );
612+
solid = THREE.ShapeUtils.isClockWise( tmpPoints );
613613
solid = isCCW ? ! solid : solid;
614614

615615
if ( solid ) {

src/extras/curves/ClosedSplineCurve3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ THREE.ClosedSplineCurve3 = THREE.Curve.create(
2828

2929
var vector = new THREE.Vector3();
3030

31-
vector.x = THREE.Curve.Utils.interpolate( point0.x, point1.x, point2.x, point3.x, weight );
32-
vector.y = THREE.Curve.Utils.interpolate( point0.y, point1.y, point2.y, point3.y, weight );
33-
vector.z = THREE.Curve.Utils.interpolate( point0.z, point1.z, point2.z, point3.z, weight );
31+
vector.x = THREE.CurveUtils.interpolate( point0.x, point1.x, point2.x, point3.x, weight );
32+
vector.y = THREE.CurveUtils.interpolate( point0.y, point1.y, point2.y, point3.y, weight );
33+
vector.z = THREE.CurveUtils.interpolate( point0.z, point1.z, point2.z, point3.z, weight );
3434

3535
return vector;
3636

src/extras/curves/CubicBezierCurve.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ THREE.CubicBezierCurve.prototype.getPoint = function ( t ) {
1818

1919
var tx, ty;
2020

21-
tx = THREE.Shape.Utils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
22-
ty = THREE.Shape.Utils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
21+
tx = THREE.ShapeUtils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
22+
ty = THREE.ShapeUtils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
2323

2424
return new THREE.Vector2( tx, ty );
2525

@@ -29,8 +29,8 @@ THREE.CubicBezierCurve.prototype.getTangent = function( t ) {
2929

3030
var tx, ty;
3131

32-
tx = THREE.Curve.Utils.tangentCubicBezier( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
33-
ty = THREE.Curve.Utils.tangentCubicBezier( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
32+
tx = THREE.CurveUtils.tangentCubicBezier( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
33+
ty = THREE.CurveUtils.tangentCubicBezier( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
3434

3535
var tangent = new THREE.Vector2( tx, ty );
3636
tangent.normalize();

src/extras/curves/CubicBezierCurve3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ THREE.CubicBezierCurve3 = THREE.Curve.create(
1717

1818
var vector = new THREE.Vector3();
1919

20-
vector.x = THREE.Shape.Utils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
21-
vector.y = THREE.Shape.Utils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
22-
vector.z = THREE.Shape.Utils.b3( t, this.v0.z, this.v1.z, this.v2.z, this.v3.z );
20+
vector.x = THREE.ShapeUtils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
21+
vector.y = THREE.ShapeUtils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
22+
vector.z = THREE.ShapeUtils.b3( t, this.v0.z, this.v1.z, this.v2.z, this.v3.z );
2323

2424
return vector;
2525

src/extras/curves/QuadraticBezierCurve.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ THREE.QuadraticBezierCurve.prototype.getPoint = function ( t ) {
1919

2020
var vector = new THREE.Vector2();
2121

22-
vector.x = THREE.Shape.Utils.b2( t, this.v0.x, this.v1.x, this.v2.x );
23-
vector.y = THREE.Shape.Utils.b2( t, this.v0.y, this.v1.y, this.v2.y );
22+
vector.x = THREE.ShapeUtils.b2( t, this.v0.x, this.v1.x, this.v2.x );
23+
vector.y = THREE.ShapeUtils.b2( t, this.v0.y, this.v1.y, this.v2.y );
2424

2525
return vector;
2626

@@ -31,8 +31,8 @@ THREE.QuadraticBezierCurve.prototype.getTangent = function( t ) {
3131

3232
var vector = new THREE.Vector2();
3333

34-
vector.x = THREE.Curve.Utils.tangentQuadraticBezier( t, this.v0.x, this.v1.x, this.v2.x );
35-
vector.y = THREE.Curve.Utils.tangentQuadraticBezier( t, this.v0.y, this.v1.y, this.v2.y );
34+
vector.x = THREE.CurveUtils.tangentQuadraticBezier( t, this.v0.x, this.v1.x, this.v2.x );
35+
vector.y = THREE.CurveUtils.tangentQuadraticBezier( t, this.v0.y, this.v1.y, this.v2.y );
3636

3737
// returns unit vector
3838

src/extras/curves/QuadraticBezierCurve3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ THREE.QuadraticBezierCurve3 = THREE.Curve.create(
1616

1717
var vector = new THREE.Vector3();
1818

19-
vector.x = THREE.Shape.Utils.b2( t, this.v0.x, this.v1.x, this.v2.x );
20-
vector.y = THREE.Shape.Utils.b2( t, this.v0.y, this.v1.y, this.v2.y );
21-
vector.z = THREE.Shape.Utils.b2( t, this.v0.z, this.v1.z, this.v2.z );
19+
vector.x = THREE.ShapeUtils.b2( t, this.v0.x, this.v1.x, this.v2.x );
20+
vector.y = THREE.ShapeUtils.b2( t, this.v0.y, this.v1.y, this.v2.y );
21+
vector.z = THREE.ShapeUtils.b2( t, this.v0.z, this.v1.z, this.v2.z );
2222

2323
return vector;
2424

src/extras/curves/SplineCurve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ THREE.SplineCurve.prototype.getPoint = function ( t ) {
2626

2727
var vector = new THREE.Vector2();
2828

29-
vector.x = THREE.Curve.Utils.interpolate( point0.x, point1.x, point2.x, point3.x, weight );
30-
vector.y = THREE.Curve.Utils.interpolate( point0.y, point1.y, point2.y, point3.y, weight );
29+
vector.x = THREE.CurveUtils.interpolate( point0.x, point1.x, point2.x, point3.x, weight );
30+
vector.y = THREE.CurveUtils.interpolate( point0.y, point1.y, point2.y, point3.y, weight );
3131

3232
return vector;
3333

src/extras/curves/SplineCurve3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ THREE.SplineCurve3 = THREE.Curve.create(
2727

2828
var vector = new THREE.Vector3();
2929

30-
vector.x = THREE.Curve.Utils.interpolate( point0.x, point1.x, point2.x, point3.x, weight );
31-
vector.y = THREE.Curve.Utils.interpolate( point0.y, point1.y, point2.y, point3.y, weight );
32-
vector.z = THREE.Curve.Utils.interpolate( point0.z, point1.z, point2.z, point3.z, weight );
30+
vector.x = THREE.CurveUtils.interpolate( point0.x, point1.x, point2.x, point3.x, weight );
31+
vector.y = THREE.CurveUtils.interpolate( point0.y, point1.y, point2.y, point3.y, weight );
32+
vector.z = THREE.CurveUtils.interpolate( point0.z, point1.z, point2.z, point3.z, weight );
3333

3434
return vector;
3535

src/extras/geometries/ExtrudeGeometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
135135
var vertices = shapePoints.shape;
136136
var holes = shapePoints.holes;
137137

138-
var reverse = ! THREE.Shape.Utils.isClockWise( vertices );
138+
var reverse = ! THREE.ShapeUtils.isClockWise( vertices );
139139

140140
if ( reverse ) {
141141

@@ -147,7 +147,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
147147

148148
ahole = holes[ h ];
149149

150-
if ( THREE.Shape.Utils.isClockWise( ahole ) ) {
150+
if ( THREE.ShapeUtils.isClockWise( ahole ) ) {
151151

152152
holes[ h ] = ahole.reverse();
153153

@@ -160,7 +160,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
160160
}
161161

162162

163-
var faces = THREE.Shape.Utils.triangulateShape ( vertices, holes );
163+
var faces = THREE.ShapeUtils.triangulateShape( vertices, holes );
164164

165165
/* Vertices */
166166

src/extras/geometries/ShapeGeometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
6767
var vertices = shapePoints.shape;
6868
var holes = shapePoints.holes;
6969

70-
var reverse = ! THREE.Shape.Utils.isClockWise( vertices );
70+
var reverse = ! THREE.ShapeUtils.isClockWise( vertices );
7171

7272
if ( reverse ) {
7373

@@ -79,7 +79,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
7979

8080
hole = holes[ i ];
8181

82-
if ( THREE.Shape.Utils.isClockWise( hole ) ) {
82+
if ( THREE.ShapeUtils.isClockWise( hole ) ) {
8383

8484
holes[ i ] = hole.reverse();
8585

@@ -91,7 +91,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) {
9191

9292
}
9393

94-
var faces = THREE.Shape.Utils.triangulateShape( vertices, holes );
94+
var faces = THREE.ShapeUtils.triangulateShape( vertices, holes );
9595

9696
// Vertices
9797

0 commit comments

Comments
 (0)