Immugio / three-math-extensions

11 stars 0 forks source link

Set of utilities for 2d and 3d math built on top of three.js

Build

@immugio/three-math-extensions / Exports

@immugio/three-math-extensions

Table of contents

Classes

Interfaces

Variables

Functions

Variables

HalfPI

Const HalfPI: number

Defined in

src/MathConstants.ts:2


TwoPI

Const TwoPI: number

Defined in

src/MathConstants.ts:1


directions

Const directions: Object

Type declaration

Name Type
Down Vec3
East Vec3
North Vec3
South Vec3
Up Vec3
West Vec3

Defined in

src/directions.ts:3


directions2d

Const directions2d: Object

Type declaration

Name Type
Down Vec2
Left Vec2
Right Vec2
Up Vec2

Defined in

src/directions2d.ts:3

Functions

isContinuousClosedShape

isContinuousClosedShape\<T>(lines, tolerance?): boolean

Type parameters

Name Type
T extends Line3D | Line2D

Parameters

Name Type Default value
lines T[] undefined
tolerance number 0

Returns

boolean

Defined in

src/isContinuousClosedShape.ts:4


isPointInPolygon

isPointInPolygon(p, point): boolean

Parameters

Name Type
p Point2[]
point Point2

Returns

boolean

Defined in

src/isPointInPolygon.ts:3


normalizeAngleDegrees

normalizeAngleDegrees(angle): number

Normalizes an angle in degrees to the range [0, 360].

Parameters

Name Type Description
angle number in degrees

Returns

number

Defined in

src/normalizeAngleDegrees.ts:5


normalizeAngleRadians

normalizeAngleRadians(angle): number

Normalize an angle in radians to the range of 0 to 2π.

Parameters

Name Type Description
angle number in radians

Returns

number

Defined in

src/normalizeAngleRadians.ts:7