# Global

### Type Definitions

#### bezier

Source:
##### Properties:
Name Type Description
`points` Array

The control points for the bezier curve. The first and last point will also be the start and end of the curve

`pointType` string

A reference to the type and dimensionality of the points that the curve was created from

`dimensions` number

The dimensionality of the bezier

`permutations` Array

A pre-calculation of the bezier algorithm's co-efficients

`tangentPermutations` Array

A pre-calculation of the bezier algorithm's tangent co-efficients

Represents a bezier easing function.

• Object
##### Example
``````const b = bezier.create([0,10]) // a linear progression from 0 to 10
const b = bezier.create([0, 0, 10, 10]) // a symmetrical cubic easing curve that starts slowly and ends slowly from 0 to 10
const b = bezier.create([0,0,0], [0,5,10], [10,0,-5], [10,10,10]]) // a cubic 3 dimensional easing curve that can generate position arrays for modelling
Usage:
let position = bezier.valueAt(t,b) // where 0 < t < 1
let tangent = bezier.tangentAt(t,b) // where 0 < t < 1``````

#### geom2

Source:
##### Properties:
Name Type Description
`sides` Array

list of sides, each side containing two points

`transforms` mat4

transforms to apply to the sides, see transform()

Represents a 2D geometry consisting of a list of sides.

• Object

#### geom3

Source:
##### Properties:
Name Type Description
`polygons` Array

list of polygons, each polygon containing three or more points

`isRetesselated` Boolean

true if retesselation has been performed

`transforms` mat4

transforms to apply to the sides, see transform()

Represents a 3D geometry consisting of a list of polygons.

• Object

#### line2

Source:

Represents a unbounded line in 2D space, positioned at a point of origin. A line is parametrized by a normal vector (perpendicular to the line, rotated 90 degrees counter clockwise) and distance from the origin.

Equation: A Point (P) is on Line (L) if dot(L.normal, P) == L.distance

The contents of the array are a normal [0,1] and a distance .

• Array

#### line3

Source:
See:

Represents a unbounded line in 3D space, positioned at a point of origin. A line is parametrized by a point of origin and a directional vector. The array contents are two 3D vectors; origin and directional vector.

• Array

#### mat4

Source:

Represents a 4x4 matrix which is column-major (when typed out it looks row-major). See fromValues().

• Array

#### path2

Source:
##### Properties:
Name Type Description
`points` Array

list of ordered points

`isClosed` Boolean

true if the path is closed where start and end points are the same

`transforms` mat4

transforms to apply to the points, see transform()

Represents a 2D geometry consisting of a list of ordered points.

• Object

#### plane

Source:
See:

Represents a plane in 3D coordinate space as determined by a normal (perpendicular to the plane) and distance from 0,0,0.

The contents of the array are a normal [0,1,2] and a distance .

• Array

#### poly2

Source:
##### Properties:
Name Type Description
`vertices` Array

list of ordered vertices (2D)

Represents a convex 2D polygon consisting of a list of ordered vertices.

• Object

#### poly3

Source:
##### Properties:
Name Type Description
`vertices` Array

list of ordered vertices (3D)

Represents a convex 3D polygon. The vertices used to initialize a polygon must be coplanar and form a convex shape. The vertices do not have to be `vec3` instances but they must behave similarly.

• Object

#### slice

Source:
##### Properties:
Name Type Description
`edges` Array

list of edges, each edge containing two points (3D)

Represents a 3D geometry consisting of a list of edges.

• Object

#### vec2

Source:

Represents a two dimensional vector. See fromValues().

• Array

#### vec3

Source:

Represents a three dimensional vector. See fromValues().

• Array

#### vec4

Source:

Represents a four dimensional vector. See fromValues().

• Array

#### VectorCharObject

Source:
##### Properties:
Name Type Description
`width` Float

character width

`height` Float

character height (uppercase)

`segments` Array

character segments [[[x, y], ...], ...]

Represents a character as a list of segments

• Object