@immugio/three-math-extensions 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -16
- package/README.md +82 -2
- package/cjs/Line2D.js +33 -31
- package/cjs/MathConstants.js +4 -0
- package/cjs/Vec2.js +21 -0
- package/cjs/index.js +3 -1
- package/cjs/normalizeAngleDegrees.js +4 -0
- package/cjs/normalizeAngleRadians.js +7 -3
- package/docs/classes/BoundingBox.md +7 -7
- package/docs/classes/Line2D.md +80 -81
- package/docs/classes/Line3D.md +35 -35
- package/docs/classes/Polygon.md +38 -16
- package/docs/classes/Rectangle.md +18 -18
- package/docs/classes/Size2.md +3 -3
- package/docs/classes/Vec2.md +23 -6
- package/docs/classes/Vec3.md +12 -12
- package/docs/interfaces/Point2.md +30 -0
- package/docs/interfaces/Point3.md +41 -0
- package/docs/modules.md +68 -0
- package/esm/Line2D.js +33 -31
- package/esm/MathConstants.js +1 -0
- package/esm/Vec2.js +21 -0
- package/esm/index.js +1 -0
- package/esm/normalizeAngleDegrees.js +4 -0
- package/esm/normalizeAngleRadians.js +7 -3
- package/package.json +1 -1
- package/src/Line2D.ts +39 -34
- package/src/MathConstants.ts +1 -0
- package/src/Vec2.ts +26 -0
- package/src/index.ts +4 -1
- package/src/normalizeAngleDegrees.ts +4 -0
- package/src/normalizeAngleRadians.ts +11 -5
- package/types/Line2D.d.ts +10 -14
- package/types/MathConstants.d.ts +1 -0
- package/types/Vec2.d.ts +11 -0
- package/types/index.d.ts +3 -0
- package/types/normalizeAngleDegrees.d.ts +4 -0
- package/types/normalizeAngleRadians.d.ts +4 -0
- package/HowToRelease.txt +0 -13
package/docs/classes/Line3D.md
CHANGED
|
@@ -73,7 +73,7 @@ Line3.constructor
|
|
|
73
73
|
|
|
74
74
|
#### Defined in
|
|
75
75
|
|
|
76
|
-
[src/Line3D.ts:13](https://github.com/Immugio/three-math-extensions/blob/
|
|
76
|
+
[src/Line3D.ts:13](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L13)
|
|
77
77
|
|
|
78
78
|
## Properties
|
|
79
79
|
|
|
@@ -87,7 +87,7 @@ Line3.end
|
|
|
87
87
|
|
|
88
88
|
#### Defined in
|
|
89
89
|
|
|
90
|
-
[src/Line3D.ts:9](https://github.com/Immugio/three-math-extensions/blob/
|
|
90
|
+
[src/Line3D.ts:9](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L9)
|
|
91
91
|
|
|
92
92
|
___
|
|
93
93
|
|
|
@@ -101,7 +101,7 @@ Line3.start
|
|
|
101
101
|
|
|
102
102
|
#### Defined in
|
|
103
103
|
|
|
104
|
-
[src/Line3D.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
104
|
+
[src/Line3D.ts:8](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L8)
|
|
105
105
|
|
|
106
106
|
## Accessors
|
|
107
107
|
|
|
@@ -117,7 +117,7 @@ Returns the center of this line
|
|
|
117
117
|
|
|
118
118
|
#### Defined in
|
|
119
119
|
|
|
120
|
-
[src/Line3D.ts:270](https://github.com/Immugio/three-math-extensions/blob/
|
|
120
|
+
[src/Line3D.ts:270](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L270)
|
|
121
121
|
|
|
122
122
|
___
|
|
123
123
|
|
|
@@ -133,7 +133,7 @@ Returns the direction of this line.
|
|
|
133
133
|
|
|
134
134
|
#### Defined in
|
|
135
135
|
|
|
136
|
-
[src/Line3D.ts:263](https://github.com/Immugio/three-math-extensions/blob/
|
|
136
|
+
[src/Line3D.ts:263](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L263)
|
|
137
137
|
|
|
138
138
|
___
|
|
139
139
|
|
|
@@ -149,7 +149,7 @@ Returns the start and end points of the line as an array.
|
|
|
149
149
|
|
|
150
150
|
#### Defined in
|
|
151
151
|
|
|
152
|
-
[src/Line3D.ts:293](https://github.com/Immugio/three-math-extensions/blob/
|
|
152
|
+
[src/Line3D.ts:293](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L293)
|
|
153
153
|
|
|
154
154
|
___
|
|
155
155
|
|
|
@@ -165,7 +165,7 @@ Returns this line's length.
|
|
|
165
165
|
|
|
166
166
|
#### Defined in
|
|
167
167
|
|
|
168
|
-
[src/Line3D.ts:247](https://github.com/Immugio/three-math-extensions/blob/
|
|
168
|
+
[src/Line3D.ts:247](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L247)
|
|
169
169
|
|
|
170
170
|
## Methods
|
|
171
171
|
|
|
@@ -187,7 +187,7 @@ Divides the Line3D into a number of segments of the given length.
|
|
|
187
187
|
|
|
188
188
|
#### Defined in
|
|
189
189
|
|
|
190
|
-
[src/Line3D.ts:405](https://github.com/Immugio/three-math-extensions/blob/
|
|
190
|
+
[src/Line3D.ts:405](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L405)
|
|
191
191
|
|
|
192
192
|
___
|
|
193
193
|
|
|
@@ -216,7 +216,7 @@ Clones the line, does not modify this.
|
|
|
216
216
|
|
|
217
217
|
#### Defined in
|
|
218
218
|
|
|
219
|
-
[src/Line3D.ts:51](https://github.com/Immugio/three-math-extensions/blob/
|
|
219
|
+
[src/Line3D.ts:51](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L51)
|
|
220
220
|
|
|
221
221
|
___
|
|
222
222
|
|
|
@@ -242,7 +242,7 @@ Clones the line, does not modify this.
|
|
|
242
242
|
|
|
243
243
|
#### Defined in
|
|
244
244
|
|
|
245
|
-
[src/Line3D.ts:76](https://github.com/Immugio/three-math-extensions/blob/
|
|
245
|
+
[src/Line3D.ts:76](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L76)
|
|
246
246
|
|
|
247
247
|
___
|
|
248
248
|
|
|
@@ -262,7 +262,7 @@ Line3.clone
|
|
|
262
262
|
|
|
263
263
|
#### Defined in
|
|
264
264
|
|
|
265
|
-
[src/Line3D.ts:522](https://github.com/Immugio/three-math-extensions/blob/
|
|
265
|
+
[src/Line3D.ts:522](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L522)
|
|
266
266
|
|
|
267
267
|
___
|
|
268
268
|
|
|
@@ -285,7 +285,7 @@ Check that this line section contains provided point.
|
|
|
285
285
|
|
|
286
286
|
#### Defined in
|
|
287
287
|
|
|
288
|
-
[src/Line3D.ts:302](https://github.com/Immugio/three-math-extensions/blob/
|
|
288
|
+
[src/Line3D.ts:302](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L302)
|
|
289
289
|
|
|
290
290
|
___
|
|
291
291
|
|
|
@@ -312,7 +312,7 @@ line section.
|
|
|
312
312
|
|
|
313
313
|
#### Defined in
|
|
314
314
|
|
|
315
|
-
[src/Line3D.ts:200](https://github.com/Immugio/three-math-extensions/blob/
|
|
315
|
+
[src/Line3D.ts:200](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L200)
|
|
316
316
|
|
|
317
317
|
___
|
|
318
318
|
|
|
@@ -335,7 +335,7 @@ Distance from this line to provided point.
|
|
|
335
335
|
|
|
336
336
|
#### Defined in
|
|
337
337
|
|
|
338
|
-
[src/Line3D.ts:312](https://github.com/Immugio/three-math-extensions/blob/
|
|
338
|
+
[src/Line3D.ts:312](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L312)
|
|
339
339
|
|
|
340
340
|
___
|
|
341
341
|
|
|
@@ -362,7 +362,7 @@ Line3.equals
|
|
|
362
362
|
|
|
363
363
|
#### Defined in
|
|
364
364
|
|
|
365
|
-
[src/Line3D.ts:515](https://github.com/Immugio/three-math-extensions/blob/
|
|
365
|
+
[src/Line3D.ts:515](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L515)
|
|
366
366
|
|
|
367
367
|
___
|
|
368
368
|
|
|
@@ -394,7 +394,7 @@ Returns null if lines are not parallel.
|
|
|
394
394
|
|
|
395
395
|
#### Defined in
|
|
396
396
|
|
|
397
|
-
[src/Line3D.ts:323](https://github.com/Immugio/three-math-extensions/blob/
|
|
397
|
+
[src/Line3D.ts:323](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L323)
|
|
398
398
|
|
|
399
399
|
___
|
|
400
400
|
|
|
@@ -421,7 +421,7 @@ https://stackoverflow.com/questions/2316490/the-algorithm-to-find-the-point-of-i
|
|
|
421
421
|
|
|
422
422
|
#### Defined in
|
|
423
423
|
|
|
424
|
-
[src/Line3D.ts:456](https://github.com/Immugio/three-math-extensions/blob/
|
|
424
|
+
[src/Line3D.ts:456](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L456)
|
|
425
425
|
|
|
426
426
|
___
|
|
427
427
|
|
|
@@ -448,7 +448,7 @@ is parallel to this line.
|
|
|
448
448
|
|
|
449
449
|
#### Defined in
|
|
450
450
|
|
|
451
|
-
[src/Line3D.ts:344](https://github.com/Immugio/three-math-extensions/blob/
|
|
451
|
+
[src/Line3D.ts:344](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L344)
|
|
452
452
|
|
|
453
453
|
___
|
|
454
454
|
|
|
@@ -479,7 +479,7 @@ Clones the line, does not modify this.
|
|
|
479
479
|
|
|
480
480
|
#### Defined in
|
|
481
481
|
|
|
482
|
-
[src/Line3D.ts:111](https://github.com/Immugio/three-math-extensions/blob/
|
|
482
|
+
[src/Line3D.ts:111](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L111)
|
|
483
483
|
|
|
484
484
|
___
|
|
485
485
|
|
|
@@ -499,7 +499,7 @@ ___
|
|
|
499
499
|
|
|
500
500
|
#### Defined in
|
|
501
501
|
|
|
502
|
-
[src/Line3D.ts:380](https://github.com/Immugio/three-math-extensions/blob/
|
|
502
|
+
[src/Line3D.ts:380](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L380)
|
|
503
503
|
|
|
504
504
|
___
|
|
505
505
|
|
|
@@ -519,7 +519,7 @@ ___
|
|
|
519
519
|
|
|
520
520
|
#### Defined in
|
|
521
521
|
|
|
522
|
-
[src/Line3D.ts:368](https://github.com/Immugio/three-math-extensions/blob/
|
|
522
|
+
[src/Line3D.ts:368](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L368)
|
|
523
523
|
|
|
524
524
|
___
|
|
525
525
|
|
|
@@ -535,7 +535,7 @@ Project the line to 2D space, Y value is dropped
|
|
|
535
535
|
|
|
536
536
|
#### Defined in
|
|
537
537
|
|
|
538
|
-
[src/Line3D.ts:508](https://github.com/Immugio/three-math-extensions/blob/
|
|
538
|
+
[src/Line3D.ts:508](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L508)
|
|
539
539
|
|
|
540
540
|
___
|
|
541
541
|
|
|
@@ -563,7 +563,7 @@ line section.
|
|
|
563
563
|
|
|
564
564
|
#### Defined in
|
|
565
565
|
|
|
566
|
-
[src/Line3D.ts:210](https://github.com/Immugio/three-math-extensions/blob/
|
|
566
|
+
[src/Line3D.ts:210](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L210)
|
|
567
567
|
|
|
568
568
|
___
|
|
569
569
|
|
|
@@ -586,7 +586,7 @@ Returns a new line that is the projection of this line onto @other. Uses `closes
|
|
|
586
586
|
|
|
587
587
|
#### Defined in
|
|
588
588
|
|
|
589
|
-
[src/Line3D.ts:394](https://github.com/Immugio/three-math-extensions/blob/
|
|
589
|
+
[src/Line3D.ts:394](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L394)
|
|
590
590
|
|
|
591
591
|
___
|
|
592
592
|
|
|
@@ -606,7 +606,7 @@ ___
|
|
|
606
606
|
|
|
607
607
|
#### Defined in
|
|
608
608
|
|
|
609
|
-
[src/Line3D.ts:359](https://github.com/Immugio/three-math-extensions/blob/
|
|
609
|
+
[src/Line3D.ts:359](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L359)
|
|
610
610
|
|
|
611
611
|
___
|
|
612
612
|
|
|
@@ -628,7 +628,7 @@ Set the center of the line to the provided point. Length and direction remain un
|
|
|
628
628
|
|
|
629
629
|
#### Defined in
|
|
630
630
|
|
|
631
|
-
[src/Line3D.ts:278](https://github.com/Immugio/three-math-extensions/blob/
|
|
631
|
+
[src/Line3D.ts:278](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L278)
|
|
632
632
|
|
|
633
633
|
___
|
|
634
634
|
|
|
@@ -650,7 +650,7 @@ Set the length of this line. Center and direction remain unchanged.
|
|
|
650
650
|
|
|
651
651
|
#### Defined in
|
|
652
652
|
|
|
653
|
-
[src/Line3D.ts:255](https://github.com/Immugio/three-math-extensions/blob/
|
|
653
|
+
[src/Line3D.ts:255](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L255)
|
|
654
654
|
|
|
655
655
|
___
|
|
656
656
|
|
|
@@ -664,7 +664,7 @@ ___
|
|
|
664
664
|
|
|
665
665
|
#### Defined in
|
|
666
666
|
|
|
667
|
-
[src/Line3D.ts:526](https://github.com/Immugio/three-math-extensions/blob/
|
|
667
|
+
[src/Line3D.ts:526](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L526)
|
|
668
668
|
|
|
669
669
|
___
|
|
670
670
|
|
|
@@ -686,7 +686,7 @@ Move this line by the given vector.
|
|
|
686
686
|
|
|
687
687
|
#### Defined in
|
|
688
688
|
|
|
689
|
-
[src/Line3D.ts:441](https://github.com/Immugio/three-math-extensions/blob/
|
|
689
|
+
[src/Line3D.ts:441](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L441)
|
|
690
690
|
|
|
691
691
|
___
|
|
692
692
|
|
|
@@ -698,8 +698,8 @@ ___
|
|
|
698
698
|
|
|
699
699
|
| Name | Type |
|
|
700
700
|
| :------ | :------ |
|
|
701
|
-
| `start` | `Point3` |
|
|
702
|
-
| `end` | `Point3` |
|
|
701
|
+
| `start` | [`Point3`](../interfaces/Point3.md) |
|
|
702
|
+
| `end` | [`Point3`](../interfaces/Point3.md) |
|
|
703
703
|
|
|
704
704
|
#### Returns
|
|
705
705
|
|
|
@@ -707,7 +707,7 @@ ___
|
|
|
707
707
|
|
|
708
708
|
#### Defined in
|
|
709
709
|
|
|
710
|
-
[src/Line3D.ts:18](https://github.com/Immugio/three-math-extensions/blob/
|
|
710
|
+
[src/Line3D.ts:18](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L18)
|
|
711
711
|
|
|
712
712
|
___
|
|
713
713
|
|
|
@@ -723,7 +723,7 @@ The polygon will only be closed if either
|
|
|
723
723
|
|
|
724
724
|
| Name | Type | Default value |
|
|
725
725
|
| :------ | :------ | :------ |
|
|
726
|
-
| `polygon` | `Point3`[] | `undefined` |
|
|
726
|
+
| `polygon` | [`Point3`](../interfaces/Point3.md)[] | `undefined` |
|
|
727
727
|
| `forceClosedPolygon` | `boolean` | `false` |
|
|
728
728
|
|
|
729
729
|
#### Returns
|
|
@@ -732,7 +732,7 @@ The polygon will only be closed if either
|
|
|
732
732
|
|
|
733
733
|
#### Defined in
|
|
734
734
|
|
|
735
|
-
[src/Line3D.ts:27](https://github.com/Immugio/three-math-extensions/blob/
|
|
735
|
+
[src/Line3D.ts:27](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L27)
|
|
736
736
|
|
|
737
737
|
___
|
|
738
738
|
|
|
@@ -757,4 +757,4 @@ Lines must be parallel for joining.
|
|
|
757
757
|
|
|
758
758
|
#### Defined in
|
|
759
759
|
|
|
760
|
-
[src/Line3D.ts:165](https://github.com/Immugio/three-math-extensions/blob/
|
|
760
|
+
[src/Line3D.ts:165](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Line3D.ts#L165)
|
package/docs/classes/Polygon.md
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
- [toBoundingPolygon](Polygon.md#toboundingpolygon)
|
|
30
30
|
- [toRectangle](Polygon.md#torectangle)
|
|
31
31
|
- [fromPoints](Polygon.md#frompoints)
|
|
32
|
+
- [fromSize](Polygon.md#fromsize)
|
|
32
33
|
|
|
33
34
|
## Constructors
|
|
34
35
|
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
|
|
46
47
|
#### Defined in
|
|
47
48
|
|
|
48
|
-
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
49
|
+
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L8)
|
|
49
50
|
|
|
50
51
|
## Properties
|
|
51
52
|
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
|
|
56
57
|
#### Defined in
|
|
57
58
|
|
|
58
|
-
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
59
|
+
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L8)
|
|
59
60
|
|
|
60
61
|
___
|
|
61
62
|
|
|
@@ -65,7 +66,7 @@ ___
|
|
|
65
66
|
|
|
66
67
|
#### Defined in
|
|
67
68
|
|
|
68
|
-
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
69
|
+
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L8)
|
|
69
70
|
|
|
70
71
|
## Accessors
|
|
71
72
|
|
|
@@ -79,7 +80,7 @@ ___
|
|
|
79
80
|
|
|
80
81
|
#### Defined in
|
|
81
82
|
|
|
82
|
-
[src/Polygon.ts:
|
|
83
|
+
[src/Polygon.ts:24](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L24)
|
|
83
84
|
|
|
84
85
|
## Methods
|
|
85
86
|
|
|
@@ -93,7 +94,7 @@ ___
|
|
|
93
94
|
|
|
94
95
|
#### Defined in
|
|
95
96
|
|
|
96
|
-
[src/Polygon.ts:
|
|
97
|
+
[src/Polygon.ts:73](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L73)
|
|
97
98
|
|
|
98
99
|
___
|
|
99
100
|
|
|
@@ -107,7 +108,7 @@ ___
|
|
|
107
108
|
|
|
108
109
|
#### Defined in
|
|
109
110
|
|
|
110
|
-
[src/Polygon.ts:
|
|
111
|
+
[src/Polygon.ts:48](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L48)
|
|
111
112
|
|
|
112
113
|
___
|
|
113
114
|
|
|
@@ -121,7 +122,7 @@ ___
|
|
|
121
122
|
|
|
122
123
|
#### Defined in
|
|
123
124
|
|
|
124
|
-
[src/Polygon.ts:
|
|
125
|
+
[src/Polygon.ts:29](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L29)
|
|
125
126
|
|
|
126
127
|
___
|
|
127
128
|
|
|
@@ -135,7 +136,7 @@ ___
|
|
|
135
136
|
|
|
136
137
|
#### Defined in
|
|
137
138
|
|
|
138
|
-
[src/Polygon.ts:
|
|
139
|
+
[src/Polygon.ts:115](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L115)
|
|
139
140
|
|
|
140
141
|
___
|
|
141
142
|
|
|
@@ -149,7 +150,7 @@ ___
|
|
|
149
150
|
|
|
150
151
|
#### Defined in
|
|
151
152
|
|
|
152
|
-
[src/Polygon.ts:
|
|
153
|
+
[src/Polygon.ts:57](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L57)
|
|
153
154
|
|
|
154
155
|
___
|
|
155
156
|
|
|
@@ -169,7 +170,7 @@ ___
|
|
|
169
170
|
|
|
170
171
|
#### Defined in
|
|
171
172
|
|
|
172
|
-
[src/Polygon.ts:
|
|
173
|
+
[src/Polygon.ts:119](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L119)
|
|
173
174
|
|
|
174
175
|
___
|
|
175
176
|
|
|
@@ -183,7 +184,7 @@ ___
|
|
|
183
184
|
|
|
184
185
|
#### Defined in
|
|
185
186
|
|
|
186
|
-
[src/Polygon.ts:
|
|
187
|
+
[src/Polygon.ts:96](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L96)
|
|
187
188
|
|
|
188
189
|
___
|
|
189
190
|
|
|
@@ -197,7 +198,7 @@ ___
|
|
|
197
198
|
|
|
198
199
|
#### Defined in
|
|
199
200
|
|
|
200
|
-
[src/Polygon.ts:
|
|
201
|
+
[src/Polygon.ts:86](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L86)
|
|
201
202
|
|
|
202
203
|
___
|
|
203
204
|
|
|
@@ -211,7 +212,7 @@ ___
|
|
|
211
212
|
|
|
212
213
|
#### Defined in
|
|
213
214
|
|
|
214
|
-
[src/Polygon.ts:
|
|
215
|
+
[src/Polygon.ts:110](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L110)
|
|
215
216
|
|
|
216
217
|
___
|
|
217
218
|
|
|
@@ -223,8 +224,8 @@ ___
|
|
|
223
224
|
|
|
224
225
|
| Name | Type |
|
|
225
226
|
| :------ | :------ |
|
|
226
|
-
| `contour` | `Point2`[] |
|
|
227
|
-
| `holes?` | `Point2`[][] |
|
|
227
|
+
| `contour` | [`Point2`](../interfaces/Point2.md)[] |
|
|
228
|
+
| `holes?` | [`Point2`](../interfaces/Point2.md)[][] |
|
|
228
229
|
|
|
229
230
|
#### Returns
|
|
230
231
|
|
|
@@ -232,4 +233,25 @@ ___
|
|
|
232
233
|
|
|
233
234
|
#### Defined in
|
|
234
235
|
|
|
235
|
-
[src/Polygon.ts:11](https://github.com/Immugio/three-math-extensions/blob/
|
|
236
|
+
[src/Polygon.ts:11](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L11)
|
|
237
|
+
|
|
238
|
+
___
|
|
239
|
+
|
|
240
|
+
### fromSize
|
|
241
|
+
|
|
242
|
+
▸ `Static` **fromSize**(`width`, `height`): [`Polygon`](Polygon.md)
|
|
243
|
+
|
|
244
|
+
#### Parameters
|
|
245
|
+
|
|
246
|
+
| Name | Type |
|
|
247
|
+
| :------ | :------ |
|
|
248
|
+
| `width` | `number` |
|
|
249
|
+
| `height` | `number` |
|
|
250
|
+
|
|
251
|
+
#### Returns
|
|
252
|
+
|
|
253
|
+
[`Polygon`](Polygon.md)
|
|
254
|
+
|
|
255
|
+
#### Defined in
|
|
256
|
+
|
|
257
|
+
[src/Polygon.ts:15](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Polygon.ts#L15)
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
#### Defined in
|
|
52
52
|
|
|
53
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
53
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L7)
|
|
54
54
|
|
|
55
55
|
## Properties
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
#### Defined in
|
|
62
62
|
|
|
63
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
63
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L7)
|
|
64
64
|
|
|
65
65
|
___
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ ___
|
|
|
70
70
|
|
|
71
71
|
#### Defined in
|
|
72
72
|
|
|
73
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
73
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L7)
|
|
74
74
|
|
|
75
75
|
___
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ ___
|
|
|
80
80
|
|
|
81
81
|
#### Defined in
|
|
82
82
|
|
|
83
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
83
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L7)
|
|
84
84
|
|
|
85
85
|
___
|
|
86
86
|
|
|
@@ -90,7 +90,7 @@ ___
|
|
|
90
90
|
|
|
91
91
|
#### Defined in
|
|
92
92
|
|
|
93
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
93
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L7)
|
|
94
94
|
|
|
95
95
|
## Accessors
|
|
96
96
|
|
|
@@ -104,7 +104,7 @@ ___
|
|
|
104
104
|
|
|
105
105
|
#### Defined in
|
|
106
106
|
|
|
107
|
-
[src/Rectangle.ts:20](https://github.com/Immugio/three-math-extensions/blob/
|
|
107
|
+
[src/Rectangle.ts:20](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L20)
|
|
108
108
|
|
|
109
109
|
___
|
|
110
110
|
|
|
@@ -118,7 +118,7 @@ ___
|
|
|
118
118
|
|
|
119
119
|
#### Defined in
|
|
120
120
|
|
|
121
|
-
[src/Rectangle.ts:41](https://github.com/Immugio/three-math-extensions/blob/
|
|
121
|
+
[src/Rectangle.ts:41](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L41)
|
|
122
122
|
|
|
123
123
|
___
|
|
124
124
|
|
|
@@ -132,7 +132,7 @@ ___
|
|
|
132
132
|
|
|
133
133
|
#### Defined in
|
|
134
134
|
|
|
135
|
-
[src/Rectangle.ts:27](https://github.com/Immugio/three-math-extensions/blob/
|
|
135
|
+
[src/Rectangle.ts:27](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L27)
|
|
136
136
|
|
|
137
137
|
___
|
|
138
138
|
|
|
@@ -146,7 +146,7 @@ ___
|
|
|
146
146
|
|
|
147
147
|
#### Defined in
|
|
148
148
|
|
|
149
|
-
[src/Rectangle.ts:13](https://github.com/Immugio/three-math-extensions/blob/
|
|
149
|
+
[src/Rectangle.ts:13](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L13)
|
|
150
150
|
|
|
151
151
|
## Methods
|
|
152
152
|
|
|
@@ -160,7 +160,7 @@ ___
|
|
|
160
160
|
|
|
161
161
|
#### Defined in
|
|
162
162
|
|
|
163
|
-
[src/Rectangle.ts:54](https://github.com/Immugio/three-math-extensions/blob/
|
|
163
|
+
[src/Rectangle.ts:54](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L54)
|
|
164
164
|
|
|
165
165
|
___
|
|
166
166
|
|
|
@@ -174,7 +174,7 @@ ___
|
|
|
174
174
|
|
|
175
175
|
#### Defined in
|
|
176
176
|
|
|
177
|
-
[src/Rectangle.ts:9](https://github.com/Immugio/three-math-extensions/blob/
|
|
177
|
+
[src/Rectangle.ts:9](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L9)
|
|
178
178
|
|
|
179
179
|
___
|
|
180
180
|
|
|
@@ -194,7 +194,7 @@ ___
|
|
|
194
194
|
|
|
195
195
|
#### Defined in
|
|
196
196
|
|
|
197
|
-
[src/Rectangle.ts:90](https://github.com/Immugio/three-math-extensions/blob/
|
|
197
|
+
[src/Rectangle.ts:90](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L90)
|
|
198
198
|
|
|
199
199
|
___
|
|
200
200
|
|
|
@@ -214,7 +214,7 @@ ___
|
|
|
214
214
|
|
|
215
215
|
#### Defined in
|
|
216
216
|
|
|
217
|
-
[src/Rectangle.ts:80](https://github.com/Immugio/three-math-extensions/blob/
|
|
217
|
+
[src/Rectangle.ts:80](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L80)
|
|
218
218
|
|
|
219
219
|
___
|
|
220
220
|
|
|
@@ -234,7 +234,7 @@ ___
|
|
|
234
234
|
|
|
235
235
|
#### Defined in
|
|
236
236
|
|
|
237
|
-
[src/Rectangle.ts:34](https://github.com/Immugio/three-math-extensions/blob/
|
|
237
|
+
[src/Rectangle.ts:34](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L34)
|
|
238
238
|
|
|
239
239
|
___
|
|
240
240
|
|
|
@@ -250,7 +250,7 @@ The polygon is always constructed as "clockwise", assuming X axis to the right a
|
|
|
250
250
|
|
|
251
251
|
#### Defined in
|
|
252
252
|
|
|
253
|
-
[src/Rectangle.ts:71](https://github.com/Immugio/three-math-extensions/blob/
|
|
253
|
+
[src/Rectangle.ts:71](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L71)
|
|
254
254
|
|
|
255
255
|
___
|
|
256
256
|
|
|
@@ -264,7 +264,7 @@ ___
|
|
|
264
264
|
|
|
265
265
|
#### Defined in
|
|
266
266
|
|
|
267
|
-
[src/Rectangle.ts:64](https://github.com/Immugio/three-math-extensions/blob/
|
|
267
|
+
[src/Rectangle.ts:64](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L64)
|
|
268
268
|
|
|
269
269
|
___
|
|
270
270
|
|
|
@@ -276,7 +276,7 @@ ___
|
|
|
276
276
|
|
|
277
277
|
| Name | Type |
|
|
278
278
|
| :------ | :------ |
|
|
279
|
-
| `diff` | `Point2` |
|
|
279
|
+
| `diff` | [`Point2`](../interfaces/Point2.md) |
|
|
280
280
|
|
|
281
281
|
#### Returns
|
|
282
282
|
|
|
@@ -284,4 +284,4 @@ ___
|
|
|
284
284
|
|
|
285
285
|
#### Defined in
|
|
286
286
|
|
|
287
|
-
[src/Rectangle.ts:45](https://github.com/Immugio/three-math-extensions/blob/
|
|
287
|
+
[src/Rectangle.ts:45](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Rectangle.ts#L45)
|
package/docs/classes/Size2.md
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
#### Defined in
|
|
30
30
|
|
|
31
|
-
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/
|
|
31
|
+
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Size2.ts#L2)
|
|
32
32
|
|
|
33
33
|
## Properties
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
#### Defined in
|
|
40
40
|
|
|
41
|
-
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/
|
|
41
|
+
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Size2.ts#L2)
|
|
42
42
|
|
|
43
43
|
___
|
|
44
44
|
|
|
@@ -48,4 +48,4 @@ ___
|
|
|
48
48
|
|
|
49
49
|
#### Defined in
|
|
50
50
|
|
|
51
|
-
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/
|
|
51
|
+
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/151f214/src/Size2.ts#L2)
|