123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- [page:Curve] →
- <h1>[name]</h1>
- <div class="desc">
- An abstract base class further extending [page:Curve]. A CurvePath is simply an array of connected curves,
- but retains the api of a curve.
- </div>
- <h2>Constructor</h2>
- <h3>[name]()</h3>
- <div>
- The constructor take no parameters.
- </div>
- <h2>Properties</h2>
- <h3>[property:array curves]</h3>
- <div>
- The array of [page:Curve]s
- </div>
- <h3>[property:array bends]</h3>
- <div>
- An array of [page:Curve]s used to transform and bend the curve using [page:CurvePath.getWrapPoints].
- </div>
- <h3>[property:boolean autoClose]</h3>
- <div>
- Whether or not to automatically close the path.
- </div>
- <h2>Methods</h2>
- <h3>[method:Array getWrapPoints]( [page:Array vertices], [page:Curve curve] )</h3>
- <div>
- vertices -- An array of [page:Vector2]s to modify<br />
- curve -- An array of 2d [page:Curve]s
- </div>
- <div>
- Modifies the array of vertices by warping it by the curve. The curve parameter also accepts objects with similar
- interfaces such as [page:CurvePath], [page:Path], [page:SplineCurve], etc. Returns the original vertices after
- modification.
- </div>
- <h3>[method:null addWrapPath]( [page:Curve curve] )</h3>
- <div>
- curve -- A [page:Curve] or object with a similar interface.
- </div>
- <div>
- Pushes a curve onto the bends array.
- </div>
- <h3>[method:Geometry createGeometry]( [page:Vector3 points] )</h3>
- <div>
- points -- An array of [page:Vector3]s
- </div>
- <div>
- Creates a geometry from points
- </div>
- <h3>[method:Geometry createPointsGeometry]( [page:Integer divisions] )</h3>
- <div>
- divisions -- How many segments to create with [page:Vector3]s. Defaults to 12.
- </div>
- <div>
- Creates a [page:Geometry] object comprised of [page:Vector3]s
- </div>
- <h3>[method:Geometry createSpacedPointsGeometry]( [page:Integer divisions] )</h3>
- <div>
- divisions -- How many segments to create with [page:Vector3]s. Defaults to 12.
- </div>
- <div>
- Creates a [page:Geometry] object comprised of [page:Vector3]s that are equidistant.
- </div>
- <h3>[method:null add]( [page:Curve curve] )</h3>
- <div>
- curve -- The [page:Curve curve] to add
- </div>
- <div>
- Pushes a curve onto the curves array.
- </div>
- <h3>[method:null closePath]()</h3>
- <div>
- Adds a curve to close the path.
- </div>
- <h3>[method:Object getBoundingBox]()</h3>
- <div>
- Returns an object with the keys minX, minY, maxX, maxY, (if 3d: maxZ, minZ)
- </div>
- <h3>[method:Float getCurveLengths]()</h3>
- <div>
- Adds together the length of the curves
- </div>
- <h3>[method:Array getTransformedPoints]( [page:Integer segments], [page:Array bends] )</h3>
- <div>
- segments -- The number of segments to create using the getPoints()<br />
- bends -- (optional) An array of [page:Curve]s used to transform the points. Defaults to this.bends if blank.
- </div>
- <div>
- Uses this CurvePath to generate a series of points transformed by the curves in the bends array. Returns an
- array of [page:Vector2]s.
- </div>
- <h3>[method:Array getTransformedSpacedPoints]( [page:Integer segments], [page:Array bends] )</h3>
- <div>
- segments -- The number of segments to create using the getPoints()<br />
- bends -- (optional) Defaults to this.bends if blank. An array of [page:Curve]s used to transform the points.
- </div>
- <div>
- Uses this CurvePath to generate a series equidistant points that are then transformed by the curves in the bends.
- Returns an array of [page:Vector2]s.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|