diff --git a/src/extras/FontUtils.js b/src/extras/FontUtils.js index f45dfe696486018e9ded49074aaebee9590c1f08..4cca566c2290e87cae2b174bbd2b2956a3e7036a 100644 --- a/src/extras/FontUtils.js +++ b/src/extras/FontUtils.js @@ -174,8 +174,8 @@ THREE.FontUtils = { for ( i2 = 1, divisions = this.divisions; i2 <= divisions; i2 ++ ) { var t = i2 / divisions; - THREE.Shape.Utils.b2( t, cpx0, cpx1, cpx ); - THREE.Shape.Utils.b2( t, cpy0, cpy1, cpy ); + THREE.ShapeUtils.b2( t, cpx0, cpx1, cpx ); + THREE.ShapeUtils.b2( t, cpy0, cpy1, cpy ); } @@ -206,8 +206,8 @@ THREE.FontUtils = { for ( i2 = 1, divisions = this.divisions; i2 <= divisions; i2 ++ ) { var t = i2 / divisions; - THREE.Shape.Utils.b3( t, cpx0, cpx1, cpx2, cpx ); - THREE.Shape.Utils.b3( t, cpy0, cpy1, cpy2, cpy ); + THREE.ShapeUtils.b3( t, cpx0, cpx1, cpx2, cpx ); + THREE.ShapeUtils.b3( t, cpy0, cpy1, cpy2, cpy ); } diff --git a/src/extras/core/Path.js b/src/extras/core/Path.js index 43b69c834a02729563db65203d3dd37a51dd58c1..e8062cc2d0207c12855292df1296cf12382de5e2 100644 --- a/src/extras/core/Path.js +++ b/src/extras/core/Path.js @@ -253,8 +253,8 @@ THREE.Path.prototype.getPoints = function( divisions, closedPath ) { var t = j / divisions; - tx = THREE.Shape.Utils.b2( t, cpx0, cpx1, cpx ); - ty = THREE.Shape.Utils.b2( t, cpy0, cpy1, cpy ); + tx = THREE.ShapeUtils.b2( t, cpx0, cpx1, cpx ); + ty = THREE.ShapeUtils.b2( t, cpy0, cpy1, cpy ); points.push( new THREE.Vector2( tx, ty ) ); @@ -591,7 +591,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) { } - var holesFirst = ! THREE.Shape.Utils.isClockWise( subPaths[ 0 ].getPoints() ); + var holesFirst = ! THREE.ShapeUtils.isClockWise( subPaths[ 0 ].getPoints() ); holesFirst = isCCW ? ! holesFirst : holesFirst; // console.log("Holes first", holesFirst); @@ -609,7 +609,7 @@ THREE.Path.prototype.toShapes = function( isCCW, noHoles ) { tmpPath = subPaths[ i ]; tmpPoints = tmpPath.getPoints(); - solid = THREE.Shape.Utils.isClockWise( tmpPoints ); + solid = THREE.ShapeUtils.isClockWise( tmpPoints ); solid = isCCW ? ! solid : solid; if ( solid ) { diff --git a/src/extras/curves/ClosedSplineCurve3.js b/src/extras/curves/ClosedSplineCurve3.js index b250658d3d1211db5cd8c2138c82c3c89924e473..90b0115f6cc7b3f9471f9be2fe4394d2fcf412a6 100644 --- a/src/extras/curves/ClosedSplineCurve3.js +++ b/src/extras/curves/ClosedSplineCurve3.js @@ -28,9 +28,9 @@ THREE.ClosedSplineCurve3 = THREE.Curve.create( var vector = new THREE.Vector3(); - vector.x = THREE.Curve.Utils.interpolate( point0.x, point1.x, point2.x, point3.x, weight ); - vector.y = THREE.Curve.Utils.interpolate( point0.y, point1.y, point2.y, point3.y, weight ); - vector.z = THREE.Curve.Utils.interpolate( point0.z, point1.z, point2.z, point3.z, weight ); + vector.x = THREE.CurveUtils.interpolate( point0.x, point1.x, point2.x, point3.x, weight ); + vector.y = THREE.CurveUtils.interpolate( point0.y, point1.y, point2.y, point3.y, weight ); + vector.z = THREE.CurveUtils.interpolate( point0.z, point1.z, point2.z, point3.z, weight ); return vector; diff --git a/src/extras/curves/CubicBezierCurve.js b/src/extras/curves/CubicBezierCurve.js index f29a77d93cc5c9a104052ea784b756a00abac29e..16625f90d56bf66205958e6b57dc2a522ea8d843 100644 --- a/src/extras/curves/CubicBezierCurve.js +++ b/src/extras/curves/CubicBezierCurve.js @@ -18,8 +18,8 @@ THREE.CubicBezierCurve.prototype.getPoint = function ( t ) { var tx, ty; - tx = THREE.Shape.Utils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x ); - ty = THREE.Shape.Utils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y ); + tx = THREE.ShapeUtils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x ); + ty = THREE.ShapeUtils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y ); return new THREE.Vector2( tx, ty ); @@ -29,8 +29,8 @@ THREE.CubicBezierCurve.prototype.getTangent = function( t ) { var tx, ty; - tx = THREE.Curve.Utils.tangentCubicBezier( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x ); - ty = THREE.Curve.Utils.tangentCubicBezier( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y ); + tx = THREE.CurveUtils.tangentCubicBezier( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x ); + ty = THREE.CurveUtils.tangentCubicBezier( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y ); var tangent = new THREE.Vector2( tx, ty ); tangent.normalize(); diff --git a/src/extras/curves/CubicBezierCurve3.js b/src/extras/curves/CubicBezierCurve3.js index 06bc2bb57a77871b57abddb73bda3f4998a0c0a2..fe4fdfe6908a54619939f95ac897e80a1eec6371 100644 --- a/src/extras/curves/CubicBezierCurve3.js +++ b/src/extras/curves/CubicBezierCurve3.js @@ -17,9 +17,9 @@ THREE.CubicBezierCurve3 = THREE.Curve.create( var vector = new THREE.Vector3(); - vector.x = THREE.Shape.Utils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x ); - vector.y = THREE.Shape.Utils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y ); - vector.z = THREE.Shape.Utils.b3( t, this.v0.z, this.v1.z, this.v2.z, this.v3.z ); + vector.x = THREE.ShapeUtils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x ); + vector.y = THREE.ShapeUtils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y ); + vector.z = THREE.ShapeUtils.b3( t, this.v0.z, this.v1.z, this.v2.z, this.v3.z ); return vector; diff --git a/src/extras/curves/QuadraticBezierCurve.js b/src/extras/curves/QuadraticBezierCurve.js index a555e71c9e7a259259fa60492e6010f1e1cbf7bd..b8fb8655cc1c38e32f9f7e20c8c391f528c37e79 100644 --- a/src/extras/curves/QuadraticBezierCurve.js +++ b/src/extras/curves/QuadraticBezierCurve.js @@ -19,8 +19,8 @@ THREE.QuadraticBezierCurve.prototype.getPoint = function ( t ) { var vector = new THREE.Vector2(); - vector.x = THREE.Shape.Utils.b2( t, this.v0.x, this.v1.x, this.v2.x ); - vector.y = THREE.Shape.Utils.b2( t, this.v0.y, this.v1.y, this.v2.y ); + vector.x = THREE.ShapeUtils.b2( t, this.v0.x, this.v1.x, this.v2.x ); + vector.y = THREE.ShapeUtils.b2( t, this.v0.y, this.v1.y, this.v2.y ); return vector; @@ -31,8 +31,8 @@ THREE.QuadraticBezierCurve.prototype.getTangent = function( t ) { var vector = new THREE.Vector2(); - vector.x = THREE.Curve.Utils.tangentQuadraticBezier( t, this.v0.x, this.v1.x, this.v2.x ); - vector.y = THREE.Curve.Utils.tangentQuadraticBezier( t, this.v0.y, this.v1.y, this.v2.y ); + vector.x = THREE.CurveUtils.tangentQuadraticBezier( t, this.v0.x, this.v1.x, this.v2.x ); + vector.y = THREE.CurveUtils.tangentQuadraticBezier( t, this.v0.y, this.v1.y, this.v2.y ); // returns unit vector diff --git a/src/extras/curves/QuadraticBezierCurve3.js b/src/extras/curves/QuadraticBezierCurve3.js index ae3fec2b3f8adc83f053b5e5a86197c25e3421b0..645a6595f89e21377878d5a03f2e743a8c6c7d7c 100644 --- a/src/extras/curves/QuadraticBezierCurve3.js +++ b/src/extras/curves/QuadraticBezierCurve3.js @@ -16,9 +16,9 @@ THREE.QuadraticBezierCurve3 = THREE.Curve.create( var vector = new THREE.Vector3(); - vector.x = THREE.Shape.Utils.b2( t, this.v0.x, this.v1.x, this.v2.x ); - vector.y = THREE.Shape.Utils.b2( t, this.v0.y, this.v1.y, this.v2.y ); - vector.z = THREE.Shape.Utils.b2( t, this.v0.z, this.v1.z, this.v2.z ); + vector.x = THREE.ShapeUtils.b2( t, this.v0.x, this.v1.x, this.v2.x ); + vector.y = THREE.ShapeUtils.b2( t, this.v0.y, this.v1.y, this.v2.y ); + vector.z = THREE.ShapeUtils.b2( t, this.v0.z, this.v1.z, this.v2.z ); return vector; diff --git a/src/extras/curves/SplineCurve.js b/src/extras/curves/SplineCurve.js index 5cc1af9fe570c66bf864c82fcce454d56f19c4ed..818db409292ed6d3502be1a9e4b0df7f0d42b2fa 100644 --- a/src/extras/curves/SplineCurve.js +++ b/src/extras/curves/SplineCurve.js @@ -26,8 +26,8 @@ THREE.SplineCurve.prototype.getPoint = function ( t ) { var vector = new THREE.Vector2(); - vector.x = THREE.Curve.Utils.interpolate( point0.x, point1.x, point2.x, point3.x, weight ); - vector.y = THREE.Curve.Utils.interpolate( point0.y, point1.y, point2.y, point3.y, weight ); + vector.x = THREE.CurveUtils.interpolate( point0.x, point1.x, point2.x, point3.x, weight ); + vector.y = THREE.CurveUtils.interpolate( point0.y, point1.y, point2.y, point3.y, weight ); return vector; diff --git a/src/extras/curves/SplineCurve3.js b/src/extras/curves/SplineCurve3.js index afeed85a003684d3563e2e51607413c3e0258b33..9136c9efc801c600a2e987015d32253ac24e5992 100644 --- a/src/extras/curves/SplineCurve3.js +++ b/src/extras/curves/SplineCurve3.js @@ -27,9 +27,9 @@ THREE.SplineCurve3 = THREE.Curve.create( var vector = new THREE.Vector3(); - vector.x = THREE.Curve.Utils.interpolate( point0.x, point1.x, point2.x, point3.x, weight ); - vector.y = THREE.Curve.Utils.interpolate( point0.y, point1.y, point2.y, point3.y, weight ); - vector.z = THREE.Curve.Utils.interpolate( point0.z, point1.z, point2.z, point3.z, weight ); + vector.x = THREE.CurveUtils.interpolate( point0.x, point1.x, point2.x, point3.x, weight ); + vector.y = THREE.CurveUtils.interpolate( point0.y, point1.y, point2.y, point3.y, weight ); + vector.z = THREE.CurveUtils.interpolate( point0.z, point1.z, point2.z, point3.z, weight ); return vector; diff --git a/src/extras/geometries/ExtrudeGeometry.js b/src/extras/geometries/ExtrudeGeometry.js index d3586be48ee9af9325670b88bb8b4ea7e6c6fc45..0e88bfcc1c208e68ac174364c406574d4a9b9d88 100644 --- a/src/extras/geometries/ExtrudeGeometry.js +++ b/src/extras/geometries/ExtrudeGeometry.js @@ -135,7 +135,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { var vertices = shapePoints.shape; var holes = shapePoints.holes; - var reverse = ! THREE.Shape.Utils.isClockWise( vertices ); + var reverse = ! THREE.ShapeUtils.isClockWise( vertices ); if ( reverse ) { @@ -147,7 +147,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { ahole = holes[ h ]; - if ( THREE.Shape.Utils.isClockWise( ahole ) ) { + if ( THREE.ShapeUtils.isClockWise( ahole ) ) { holes[ h ] = ahole.reverse(); @@ -160,7 +160,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) { } - var faces = THREE.Shape.Utils.triangulateShape ( vertices, holes ); + var faces = THREE.ShapeUtils.triangulateShape( vertices, holes ); /* Vertices */ diff --git a/src/extras/geometries/ShapeGeometry.js b/src/extras/geometries/ShapeGeometry.js index 0ec4b59cd49167e50b0566f44d56e24658b026b8..f9989695f4ebcd42c03968ccc2563b699af40e3f 100644 --- a/src/extras/geometries/ShapeGeometry.js +++ b/src/extras/geometries/ShapeGeometry.js @@ -67,7 +67,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) { var vertices = shapePoints.shape; var holes = shapePoints.holes; - var reverse = ! THREE.Shape.Utils.isClockWise( vertices ); + var reverse = ! THREE.ShapeUtils.isClockWise( vertices ); if ( reverse ) { @@ -79,7 +79,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) { hole = holes[ i ]; - if ( THREE.Shape.Utils.isClockWise( hole ) ) { + if ( THREE.ShapeUtils.isClockWise( hole ) ) { holes[ i ] = hole.reverse(); @@ -91,7 +91,7 @@ THREE.ShapeGeometry.prototype.addShape = function ( shape, options ) { } - var faces = THREE.Shape.Utils.triangulateShape( vertices, holes ); + var faces = THREE.ShapeUtils.triangulateShape( vertices, holes ); // Vertices