Set of utilities for 2d and 3d line math built on top of three.js
npm install @immugio/three-math-extensions
@immugio/three-math-extensions / Exports
- BoundingBox
- Line2D
- Line3D
- Polygon
- Rectangle
- Size2
- Vec2
- Vec3
- HalfPI
- TwoPI
- directions
- directions2d
- isContinuousClosedShape
- isPointInPolygon
- normalizeAngleDegrees
- normalizeAngleRadians
• Const HalfPI: number
#### Defined in
___
• Const TwoPI: number
#### Defined in
___
• Const directions: Object
#### Type declaration
| Name | Type |
| :------ | :------ |
| Down | Vec3 |
| East | Vec3 |
| North | Vec3 |
| South | Vec3 |
| Up | Vec3 |
| West | Vec3 |
#### Defined in
___
• Const directions2d: Object
#### Type declaration
| Name | Type |
| :------ | :------ |
| Down | Vec2 |
| Left | Vec2 |
| Right | Vec2 |
| Up | Vec2 |
#### Defined in
▸ 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(p, point): boolean
#### Parameters
| Name | Type |
| :------ | :------ |
| p | Point2[] |
| point | Point2 |
#### Returns
boolean
#### Defined in
___
▸ 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(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