@immugio/three-math-extensions 0.2.21 → 0.2.22
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 +11 -2
- package/README.md +183 -1
- package/cjs/Line2D.js +59 -8
- package/cjs/Line3D.js +1 -1
- package/docs/classes/BoundingBox.md +13 -9
- package/docs/classes/Line2D.md +292 -80
- package/docs/classes/Line3D.md +155 -84
- package/docs/classes/Polygon.md +23 -19
- package/docs/classes/Rectangle.md +23 -19
- package/docs/classes/Size2.md +8 -4
- package/docs/classes/Vec2.md +62 -12
- package/docs/classes/Vec3.md +65 -15
- package/docs/interfaces/Point2.md +3 -3
- package/docs/interfaces/Point3.md +4 -4
- package/docs/modules.md +86 -5
- package/esm/Line2D.js +59 -8
- package/esm/Line3D.js +1 -1
- package/package.json +1 -1
- package/src/Line2D.ts +69 -8
- package/src/Line3D.ts +1 -1
- package/types/Line2D.d.ts +21 -2
- package/types/Line3D.d.ts +1 -1
- package/docs/README.md +0 -90
package/docs/classes/Polygon.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@immugio/three-math-extensions](
|
|
1
|
+
[@immugio/three-math-extensions](../../README.md) / [Exports](../modules.md) / Polygon
|
|
2
2
|
|
|
3
3
|
# Class: Polygon
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
### constructor
|
|
37
37
|
|
|
38
|
-
• **new Polygon**(`contour`, `holes?`)
|
|
38
|
+
• **new Polygon**(`contour`, `holes?`): [`Polygon`](Polygon.md)
|
|
39
39
|
|
|
40
40
|
#### Parameters
|
|
41
41
|
|
|
@@ -44,9 +44,13 @@
|
|
|
44
44
|
| `contour` | [`Vec2`](Vec2.md)[] |
|
|
45
45
|
| `holes?` | [`Vec2`](Vec2.md)[][] |
|
|
46
46
|
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
[`Polygon`](Polygon.md)
|
|
50
|
+
|
|
47
51
|
#### Defined in
|
|
48
52
|
|
|
49
|
-
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
53
|
+
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L8)
|
|
50
54
|
|
|
51
55
|
## Properties
|
|
52
56
|
|
|
@@ -56,7 +60,7 @@
|
|
|
56
60
|
|
|
57
61
|
#### Defined in
|
|
58
62
|
|
|
59
|
-
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
63
|
+
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L8)
|
|
60
64
|
|
|
61
65
|
___
|
|
62
66
|
|
|
@@ -66,7 +70,7 @@ ___
|
|
|
66
70
|
|
|
67
71
|
#### Defined in
|
|
68
72
|
|
|
69
|
-
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/
|
|
73
|
+
[src/Polygon.ts:8](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L8)
|
|
70
74
|
|
|
71
75
|
## Accessors
|
|
72
76
|
|
|
@@ -80,7 +84,7 @@ ___
|
|
|
80
84
|
|
|
81
85
|
#### Defined in
|
|
82
86
|
|
|
83
|
-
[src/Polygon.ts:24](https://github.com/Immugio/three-math-extensions/blob/
|
|
87
|
+
[src/Polygon.ts:24](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L24)
|
|
84
88
|
|
|
85
89
|
## Methods
|
|
86
90
|
|
|
@@ -94,7 +98,7 @@ ___
|
|
|
94
98
|
|
|
95
99
|
#### Defined in
|
|
96
100
|
|
|
97
|
-
[src/Polygon.ts:73](https://github.com/Immugio/three-math-extensions/blob/
|
|
101
|
+
[src/Polygon.ts:73](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L73)
|
|
98
102
|
|
|
99
103
|
___
|
|
100
104
|
|
|
@@ -108,7 +112,7 @@ ___
|
|
|
108
112
|
|
|
109
113
|
#### Defined in
|
|
110
114
|
|
|
111
|
-
[src/Polygon.ts:48](https://github.com/Immugio/three-math-extensions/blob/
|
|
115
|
+
[src/Polygon.ts:48](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L48)
|
|
112
116
|
|
|
113
117
|
___
|
|
114
118
|
|
|
@@ -122,7 +126,7 @@ ___
|
|
|
122
126
|
|
|
123
127
|
#### Defined in
|
|
124
128
|
|
|
125
|
-
[src/Polygon.ts:29](https://github.com/Immugio/three-math-extensions/blob/
|
|
129
|
+
[src/Polygon.ts:29](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L29)
|
|
126
130
|
|
|
127
131
|
___
|
|
128
132
|
|
|
@@ -136,7 +140,7 @@ ___
|
|
|
136
140
|
|
|
137
141
|
#### Defined in
|
|
138
142
|
|
|
139
|
-
[src/Polygon.ts:115](https://github.com/Immugio/three-math-extensions/blob/
|
|
143
|
+
[src/Polygon.ts:115](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L115)
|
|
140
144
|
|
|
141
145
|
___
|
|
142
146
|
|
|
@@ -150,7 +154,7 @@ ___
|
|
|
150
154
|
|
|
151
155
|
#### Defined in
|
|
152
156
|
|
|
153
|
-
[src/Polygon.ts:57](https://github.com/Immugio/three-math-extensions/blob/
|
|
157
|
+
[src/Polygon.ts:57](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L57)
|
|
154
158
|
|
|
155
159
|
___
|
|
156
160
|
|
|
@@ -170,7 +174,7 @@ ___
|
|
|
170
174
|
|
|
171
175
|
#### Defined in
|
|
172
176
|
|
|
173
|
-
[src/Polygon.ts:119](https://github.com/Immugio/three-math-extensions/blob/
|
|
177
|
+
[src/Polygon.ts:119](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L119)
|
|
174
178
|
|
|
175
179
|
___
|
|
176
180
|
|
|
@@ -184,7 +188,7 @@ ___
|
|
|
184
188
|
|
|
185
189
|
#### Defined in
|
|
186
190
|
|
|
187
|
-
[src/Polygon.ts:96](https://github.com/Immugio/three-math-extensions/blob/
|
|
191
|
+
[src/Polygon.ts:96](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L96)
|
|
188
192
|
|
|
189
193
|
___
|
|
190
194
|
|
|
@@ -198,7 +202,7 @@ ___
|
|
|
198
202
|
|
|
199
203
|
#### Defined in
|
|
200
204
|
|
|
201
|
-
[src/Polygon.ts:86](https://github.com/Immugio/three-math-extensions/blob/
|
|
205
|
+
[src/Polygon.ts:86](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L86)
|
|
202
206
|
|
|
203
207
|
___
|
|
204
208
|
|
|
@@ -212,13 +216,13 @@ ___
|
|
|
212
216
|
|
|
213
217
|
#### Defined in
|
|
214
218
|
|
|
215
|
-
[src/Polygon.ts:110](https://github.com/Immugio/three-math-extensions/blob/
|
|
219
|
+
[src/Polygon.ts:110](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L110)
|
|
216
220
|
|
|
217
221
|
___
|
|
218
222
|
|
|
219
223
|
### fromPoints
|
|
220
224
|
|
|
221
|
-
▸
|
|
225
|
+
▸ **fromPoints**(`contour`, `holes?`): [`Polygon`](Polygon.md)
|
|
222
226
|
|
|
223
227
|
#### Parameters
|
|
224
228
|
|
|
@@ -233,13 +237,13 @@ ___
|
|
|
233
237
|
|
|
234
238
|
#### Defined in
|
|
235
239
|
|
|
236
|
-
[src/Polygon.ts:11](https://github.com/Immugio/three-math-extensions/blob/
|
|
240
|
+
[src/Polygon.ts:11](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L11)
|
|
237
241
|
|
|
238
242
|
___
|
|
239
243
|
|
|
240
244
|
### fromSize
|
|
241
245
|
|
|
242
|
-
▸
|
|
246
|
+
▸ **fromSize**(`width`, `height`): [`Polygon`](Polygon.md)
|
|
243
247
|
|
|
244
248
|
#### Parameters
|
|
245
249
|
|
|
@@ -254,4 +258,4 @@ ___
|
|
|
254
258
|
|
|
255
259
|
#### Defined in
|
|
256
260
|
|
|
257
|
-
[src/Polygon.ts:15](https://github.com/Immugio/three-math-extensions/blob/
|
|
261
|
+
[src/Polygon.ts:15](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Polygon.ts#L15)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@immugio/three-math-extensions](
|
|
1
|
+
[@immugio/three-math-extensions](../../README.md) / [Exports](../modules.md) / Rectangle
|
|
2
2
|
|
|
3
3
|
# Class: Rectangle
|
|
4
4
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
### constructor
|
|
39
39
|
|
|
40
|
-
• **new Rectangle**(`leftX`, `rightX`, `topY`, `bottomY`)
|
|
40
|
+
• **new Rectangle**(`leftX`, `rightX`, `topY`, `bottomY`): [`Rectangle`](Rectangle.md)
|
|
41
41
|
|
|
42
42
|
#### Parameters
|
|
43
43
|
|
|
@@ -48,9 +48,13 @@
|
|
|
48
48
|
| `topY` | `number` |
|
|
49
49
|
| `bottomY` | `number` |
|
|
50
50
|
|
|
51
|
+
#### Returns
|
|
52
|
+
|
|
53
|
+
[`Rectangle`](Rectangle.md)
|
|
54
|
+
|
|
51
55
|
#### Defined in
|
|
52
56
|
|
|
53
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
57
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L7)
|
|
54
58
|
|
|
55
59
|
## Properties
|
|
56
60
|
|
|
@@ -60,7 +64,7 @@
|
|
|
60
64
|
|
|
61
65
|
#### Defined in
|
|
62
66
|
|
|
63
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
67
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L7)
|
|
64
68
|
|
|
65
69
|
___
|
|
66
70
|
|
|
@@ -70,7 +74,7 @@ ___
|
|
|
70
74
|
|
|
71
75
|
#### Defined in
|
|
72
76
|
|
|
73
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
77
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L7)
|
|
74
78
|
|
|
75
79
|
___
|
|
76
80
|
|
|
@@ -80,7 +84,7 @@ ___
|
|
|
80
84
|
|
|
81
85
|
#### Defined in
|
|
82
86
|
|
|
83
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
87
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L7)
|
|
84
88
|
|
|
85
89
|
___
|
|
86
90
|
|
|
@@ -90,7 +94,7 @@ ___
|
|
|
90
94
|
|
|
91
95
|
#### Defined in
|
|
92
96
|
|
|
93
|
-
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/
|
|
97
|
+
[src/Rectangle.ts:7](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L7)
|
|
94
98
|
|
|
95
99
|
## Accessors
|
|
96
100
|
|
|
@@ -104,7 +108,7 @@ ___
|
|
|
104
108
|
|
|
105
109
|
#### Defined in
|
|
106
110
|
|
|
107
|
-
[src/Rectangle.ts:20](https://github.com/Immugio/three-math-extensions/blob/
|
|
111
|
+
[src/Rectangle.ts:20](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L20)
|
|
108
112
|
|
|
109
113
|
___
|
|
110
114
|
|
|
@@ -118,7 +122,7 @@ ___
|
|
|
118
122
|
|
|
119
123
|
#### Defined in
|
|
120
124
|
|
|
121
|
-
[src/Rectangle.ts:41](https://github.com/Immugio/three-math-extensions/blob/
|
|
125
|
+
[src/Rectangle.ts:41](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L41)
|
|
122
126
|
|
|
123
127
|
___
|
|
124
128
|
|
|
@@ -132,7 +136,7 @@ ___
|
|
|
132
136
|
|
|
133
137
|
#### Defined in
|
|
134
138
|
|
|
135
|
-
[src/Rectangle.ts:27](https://github.com/Immugio/three-math-extensions/blob/
|
|
139
|
+
[src/Rectangle.ts:27](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L27)
|
|
136
140
|
|
|
137
141
|
___
|
|
138
142
|
|
|
@@ -146,7 +150,7 @@ ___
|
|
|
146
150
|
|
|
147
151
|
#### Defined in
|
|
148
152
|
|
|
149
|
-
[src/Rectangle.ts:13](https://github.com/Immugio/three-math-extensions/blob/
|
|
153
|
+
[src/Rectangle.ts:13](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L13)
|
|
150
154
|
|
|
151
155
|
## Methods
|
|
152
156
|
|
|
@@ -160,7 +164,7 @@ ___
|
|
|
160
164
|
|
|
161
165
|
#### Defined in
|
|
162
166
|
|
|
163
|
-
[src/Rectangle.ts:54](https://github.com/Immugio/three-math-extensions/blob/
|
|
167
|
+
[src/Rectangle.ts:54](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L54)
|
|
164
168
|
|
|
165
169
|
___
|
|
166
170
|
|
|
@@ -174,7 +178,7 @@ ___
|
|
|
174
178
|
|
|
175
179
|
#### Defined in
|
|
176
180
|
|
|
177
|
-
[src/Rectangle.ts:9](https://github.com/Immugio/three-math-extensions/blob/
|
|
181
|
+
[src/Rectangle.ts:9](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L9)
|
|
178
182
|
|
|
179
183
|
___
|
|
180
184
|
|
|
@@ -194,7 +198,7 @@ ___
|
|
|
194
198
|
|
|
195
199
|
#### Defined in
|
|
196
200
|
|
|
197
|
-
[src/Rectangle.ts:90](https://github.com/Immugio/three-math-extensions/blob/
|
|
201
|
+
[src/Rectangle.ts:90](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L90)
|
|
198
202
|
|
|
199
203
|
___
|
|
200
204
|
|
|
@@ -214,7 +218,7 @@ ___
|
|
|
214
218
|
|
|
215
219
|
#### Defined in
|
|
216
220
|
|
|
217
|
-
[src/Rectangle.ts:80](https://github.com/Immugio/three-math-extensions/blob/
|
|
221
|
+
[src/Rectangle.ts:80](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L80)
|
|
218
222
|
|
|
219
223
|
___
|
|
220
224
|
|
|
@@ -234,7 +238,7 @@ ___
|
|
|
234
238
|
|
|
235
239
|
#### Defined in
|
|
236
240
|
|
|
237
|
-
[src/Rectangle.ts:34](https://github.com/Immugio/three-math-extensions/blob/
|
|
241
|
+
[src/Rectangle.ts:34](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L34)
|
|
238
242
|
|
|
239
243
|
___
|
|
240
244
|
|
|
@@ -250,7 +254,7 @@ The polygon is always constructed as "clockwise", assuming X axis to the right a
|
|
|
250
254
|
|
|
251
255
|
#### Defined in
|
|
252
256
|
|
|
253
|
-
[src/Rectangle.ts:71](https://github.com/Immugio/three-math-extensions/blob/
|
|
257
|
+
[src/Rectangle.ts:71](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L71)
|
|
254
258
|
|
|
255
259
|
___
|
|
256
260
|
|
|
@@ -264,7 +268,7 @@ ___
|
|
|
264
268
|
|
|
265
269
|
#### Defined in
|
|
266
270
|
|
|
267
|
-
[src/Rectangle.ts:64](https://github.com/Immugio/three-math-extensions/blob/
|
|
271
|
+
[src/Rectangle.ts:64](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L64)
|
|
268
272
|
|
|
269
273
|
___
|
|
270
274
|
|
|
@@ -284,4 +288,4 @@ ___
|
|
|
284
288
|
|
|
285
289
|
#### Defined in
|
|
286
290
|
|
|
287
|
-
[src/Rectangle.ts:45](https://github.com/Immugio/three-math-extensions/blob/
|
|
291
|
+
[src/Rectangle.ts:45](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Rectangle.ts#L45)
|
package/docs/classes/Size2.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
### constructor
|
|
19
19
|
|
|
20
|
-
• **new Size2**(`width`, `height`)
|
|
20
|
+
• **new Size2**(`width`, `height`): [`Size2`](Size2.md)
|
|
21
21
|
|
|
22
22
|
#### Parameters
|
|
23
23
|
|
|
@@ -26,9 +26,13 @@
|
|
|
26
26
|
| `width` | `number` |
|
|
27
27
|
| `height` | `number` |
|
|
28
28
|
|
|
29
|
+
#### Returns
|
|
30
|
+
|
|
31
|
+
[`Size2`](Size2.md)
|
|
32
|
+
|
|
29
33
|
#### Defined in
|
|
30
34
|
|
|
31
|
-
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/
|
|
35
|
+
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Size2.ts#L2)
|
|
32
36
|
|
|
33
37
|
## Properties
|
|
34
38
|
|
|
@@ -38,7 +42,7 @@
|
|
|
38
42
|
|
|
39
43
|
#### Defined in
|
|
40
44
|
|
|
41
|
-
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/
|
|
45
|
+
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Size2.ts#L2)
|
|
42
46
|
|
|
43
47
|
___
|
|
44
48
|
|
|
@@ -48,4 +52,4 @@ ___
|
|
|
48
52
|
|
|
49
53
|
#### Defined in
|
|
50
54
|
|
|
51
|
-
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/
|
|
55
|
+
[src/Size2.ts:2](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Size2.ts#L2)
|
package/docs/classes/Vec2.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@immugio/three-math-extensions](
|
|
1
|
+
[@immugio/three-math-extensions](../../README.md) / [Exports](../modules.md) / Vec2
|
|
2
2
|
|
|
3
3
|
# Class: Vec2
|
|
4
4
|
|
|
@@ -18,6 +18,8 @@ Vec2 represents a 2D vector. It extends `Vector2` from the `threejs` library.
|
|
|
18
18
|
|
|
19
19
|
### Methods
|
|
20
20
|
|
|
21
|
+
- [addX](Vec2.md#addx)
|
|
22
|
+
- [addY](Vec2.md#addy)
|
|
21
23
|
- [in3DSpace](Vec2.md#in3dspace)
|
|
22
24
|
- [isNear](Vec2.md#isnear)
|
|
23
25
|
- [moveTowards](Vec2.md#movetowards)
|
|
@@ -31,7 +33,7 @@ Vec2 represents a 2D vector. It extends `Vector2` from the `threejs` library.
|
|
|
31
33
|
|
|
32
34
|
### constructor
|
|
33
35
|
|
|
34
|
-
• **new Vec2**(`x?`, `y?`)
|
|
36
|
+
• **new Vec2**(`x?`, `y?`): [`Vec2`](Vec2.md)
|
|
35
37
|
|
|
36
38
|
#### Parameters
|
|
37
39
|
|
|
@@ -40,6 +42,10 @@ Vec2 represents a 2D vector. It extends `Vector2` from the `threejs` library.
|
|
|
40
42
|
| `x?` | `number` |
|
|
41
43
|
| `y?` | `number` |
|
|
42
44
|
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
[`Vec2`](Vec2.md)
|
|
48
|
+
|
|
43
49
|
#### Inherited from
|
|
44
50
|
|
|
45
51
|
Vector2.constructor
|
|
@@ -50,6 +56,50 @@ node_modules/@types/three/src/math/Vector2.d.ts:140
|
|
|
50
56
|
|
|
51
57
|
## Methods
|
|
52
58
|
|
|
59
|
+
### addX
|
|
60
|
+
|
|
61
|
+
▸ **addX**(`x`): [`Vec2`](Vec2.md)
|
|
62
|
+
|
|
63
|
+
Adds x amount to this Vec3 instance and return this
|
|
64
|
+
|
|
65
|
+
#### Parameters
|
|
66
|
+
|
|
67
|
+
| Name | Type |
|
|
68
|
+
| :------ | :------ |
|
|
69
|
+
| `x` | `number` |
|
|
70
|
+
|
|
71
|
+
#### Returns
|
|
72
|
+
|
|
73
|
+
[`Vec2`](Vec2.md)
|
|
74
|
+
|
|
75
|
+
#### Defined in
|
|
76
|
+
|
|
77
|
+
[src/Vec2.ts:53](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L53)
|
|
78
|
+
|
|
79
|
+
___
|
|
80
|
+
|
|
81
|
+
### addY
|
|
82
|
+
|
|
83
|
+
▸ **addY**(`y`): [`Vec2`](Vec2.md)
|
|
84
|
+
|
|
85
|
+
Adds y amount to this Vec3 instance and return this
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
| Name | Type |
|
|
90
|
+
| :------ | :------ |
|
|
91
|
+
| `y` | `number` |
|
|
92
|
+
|
|
93
|
+
#### Returns
|
|
94
|
+
|
|
95
|
+
[`Vec2`](Vec2.md)
|
|
96
|
+
|
|
97
|
+
#### Defined in
|
|
98
|
+
|
|
99
|
+
[src/Vec2.ts:44](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L44)
|
|
100
|
+
|
|
101
|
+
___
|
|
102
|
+
|
|
53
103
|
### in3DSpace
|
|
54
104
|
|
|
55
105
|
▸ **in3DSpace**(`y?`): [`Vec3`](Vec3.md)
|
|
@@ -70,7 +120,7 @@ A new Vec3 instance.
|
|
|
70
120
|
|
|
71
121
|
#### Defined in
|
|
72
122
|
|
|
73
|
-
[src/Vec2.ts:
|
|
123
|
+
[src/Vec2.ts:78](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L78)
|
|
74
124
|
|
|
75
125
|
___
|
|
76
126
|
|
|
@@ -94,7 +144,7 @@ maxDistance is the maximum distance between the two vectors within which they ar
|
|
|
94
144
|
|
|
95
145
|
#### Defined in
|
|
96
146
|
|
|
97
|
-
[src/Vec2.ts:
|
|
147
|
+
[src/Vec2.ts:86](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L86)
|
|
98
148
|
|
|
99
149
|
___
|
|
100
150
|
|
|
@@ -119,7 +169,7 @@ This Vec2 instance.
|
|
|
119
169
|
|
|
120
170
|
#### Defined in
|
|
121
171
|
|
|
122
|
-
[src/Vec2.ts:34](https://github.com/Immugio/three-math-extensions/blob/
|
|
172
|
+
[src/Vec2.ts:34](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L34)
|
|
123
173
|
|
|
124
174
|
___
|
|
125
175
|
|
|
@@ -142,7 +192,7 @@ check if the angle between the two vectors is close enough to 0 or 180 degrees (
|
|
|
142
192
|
|
|
143
193
|
#### Defined in
|
|
144
194
|
|
|
145
|
-
[src/Vec2.ts:
|
|
195
|
+
[src/Vec2.ts:107](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L107)
|
|
146
196
|
|
|
147
197
|
___
|
|
148
198
|
|
|
@@ -166,7 +216,7 @@ This Vec2 instance.
|
|
|
166
216
|
|
|
167
217
|
#### Defined in
|
|
168
218
|
|
|
169
|
-
[src/Vec2.ts:
|
|
219
|
+
[src/Vec2.ts:63](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L63)
|
|
170
220
|
|
|
171
221
|
___
|
|
172
222
|
|
|
@@ -182,13 +232,13 @@ Returns the angle between this vector and positive x-axis, the return value is b
|
|
|
182
232
|
|
|
183
233
|
#### Defined in
|
|
184
234
|
|
|
185
|
-
[src/Vec2.ts:
|
|
235
|
+
[src/Vec2.ts:97](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L97)
|
|
186
236
|
|
|
187
237
|
___
|
|
188
238
|
|
|
189
239
|
### fromPoint
|
|
190
240
|
|
|
191
|
-
▸
|
|
241
|
+
▸ **fromPoint**(`point`): [`Vec2`](Vec2.md)
|
|
192
242
|
|
|
193
243
|
Creates a new Vec2 instance from an {x, y} object.
|
|
194
244
|
|
|
@@ -206,13 +256,13 @@ A new Vec2 instance.
|
|
|
206
256
|
|
|
207
257
|
#### Defined in
|
|
208
258
|
|
|
209
|
-
[src/Vec2.ts:16](https://github.com/Immugio/three-math-extensions/blob/
|
|
259
|
+
[src/Vec2.ts:16](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L16)
|
|
210
260
|
|
|
211
261
|
___
|
|
212
262
|
|
|
213
263
|
### fromPoints
|
|
214
264
|
|
|
215
|
-
▸
|
|
265
|
+
▸ **fromPoints**(`...points`): [`Vec2`](Vec2.md)[]
|
|
216
266
|
|
|
217
267
|
Creates a new Vec2[] array from arguments of {x, y} objects.
|
|
218
268
|
*
|
|
@@ -229,4 +279,4 @@ Creates a new Vec2[] array from arguments of {x, y} objects.
|
|
|
229
279
|
|
|
230
280
|
#### Defined in
|
|
231
281
|
|
|
232
|
-
[src/Vec2.ts:24](https://github.com/Immugio/three-math-extensions/blob/
|
|
282
|
+
[src/Vec2.ts:24](https://github.com/Immugio/three-math-extensions/blob/905d178/src/Vec2.ts#L24)
|