|
@@ -0,0 +1,88 @@
|
|
|
+<!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>
|
|
|
+ <h1>[name]</h1>
|
|
|
+
|
|
|
+ <div class="desc">
|
|
|
+ A class containing utility functions for shapes.<br />
|
|
|
+
|
|
|
+ Note that these are all linear functions so it is neccessary to calculate seperately for
|
|
|
+ x, y (an z, w if present) components of a vector.
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <h2>Methods</h2>
|
|
|
+
|
|
|
+ <h3>[method:Number area]( contour )</h3>
|
|
|
+ <div>
|
|
|
+ contour -- 2D polygon.<br /><br />
|
|
|
+
|
|
|
+ Calculate area of a ( 2D ) contour polygon.<br /><br />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:Number b2]( t, p0, p1, p2 )</h3>
|
|
|
+ <div>
|
|
|
+ t -- number<br />
|
|
|
+ p0, p1, p2 -- x, y, z or w components of a quadratic bezier curve.<br /><br />
|
|
|
+
|
|
|
+ Note that this is a linear function so it is neccessary to calculate seperately for
|
|
|
+ x, y (and z for 3D curves) components of a curve.<br /><br />
|
|
|
+
|
|
|
+ Used internally by [page:QuadraticBezierCurve QuadraticBezierCurve],
|
|
|
+ [page:QuadraticBezierCurve3 QuadraticBezierCurve3] and [page:Font Font].
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:Number b3]( t, p0, p1, p2, p3 )</h3>
|
|
|
+ <div>
|
|
|
+ t -- number. <br />
|
|
|
+ p0, p1, p2, p3 -- x, y or z components of a cubic bezier curve..<br /><br />
|
|
|
+
|
|
|
+ Note that this is a linear function so it is neccessary to calculate seperately for
|
|
|
+ x, y (and z for 3D curves) components of a curve.<br /><br />
|
|
|
+
|
|
|
+ Used internally by [page:CubicBezierCurve CubicBezierCurve],
|
|
|
+ [page:CubicBezierCurve3 CubicBezierCurve3] and [page:Font Font].
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:Boolean isClockwise]( pts )</h3>
|
|
|
+ <div>
|
|
|
+ pts -- points defining a 2D polygon<br /><br />
|
|
|
+
|
|
|
+ Note that this is a linear function so it is neccessary to calculate seperately for
|
|
|
+ x, y components of a polygon.<br /><br />
|
|
|
+
|
|
|
+ Used internally by [page:Path Path],
|
|
|
+ [page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeBufferGeometry ShapeBufferGeometry].
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:null triangulate]( contour, indices )</h3>
|
|
|
+ <div>
|
|
|
+ contour -- 2D polygon.<br />
|
|
|
+ indices -- <br /><br />
|
|
|
+
|
|
|
+ Used internally by [page:ExtrudeGeometry ExtrudeGeometry]
|
|
|
+ and [page:ShapeBufferGeometry ShapeBufferGeometry] to calculate faces.
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:null triangulateShape]( contour, holes )</h3>
|
|
|
+ <div>
|
|
|
+ contour -- 2D polygon.<br />
|
|
|
+ holes -- array of holes<br /><br />
|
|
|
+
|
|
|
+ Used internally by [page:ExtrudeGeometry ExtrudeGeometry]
|
|
|
+ and [page:ShapeBufferGeometry ShapeBufferGeometry] to calculate faces in shapes with holes.
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h2>Source</h2>
|
|
|
+
|
|
|
+ [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
|
+ </body>
|
|
|
+</html>
|