@immugio/three-math-extensions
v0.2.24
Published
Set of utilities for 2d and 3d line math built on top of three.js
Downloads
141
Readme
Set of utilities for 2d and 3d math built on top of three.js
@immugio/three-math-extensions / Exports
@immugio/three-math-extensions
Table of contents
Classes
Interfaces
Variables
Functions
Variables
HalfPI
• Const
HalfPI: number
Defined in
TwoPI
• Const
TwoPI: number
Defined in
directions
• Const
directions: Object
Type declaration
| Name | Type |
| :------ | :------ |
| Down
| Vec3
|
| East
| Vec3
|
| North
| Vec3
|
| South
| Vec3
|
| Up
| Vec3
|
| West
| Vec3
|
Defined in
directions2d
• Const
directions2d: Object
Type declaration
| Name | Type |
| :------ | :------ |
| Down
| Vec2
|
| Left
| Vec2
|
| Right
| Vec2
|
| Up
| Vec2
|
Defined in
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
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