hytopia 0.2.1 → 0.2.3
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/docs/server.matrix2._constructor_.md +89 -0
- package/docs/server.matrix2.add.md +55 -0
- package/docs/server.matrix2.adjoint.md +19 -0
- package/docs/server.matrix2.clone.md +19 -0
- package/docs/server.matrix2.copy.md +55 -0
- package/docs/server.matrix2.create.md +19 -0
- package/docs/server.matrix2.determinant.md +13 -0
- package/docs/server.matrix2.equals.md +55 -0
- package/docs/server.matrix2.exactequals.md +55 -0
- package/docs/server.matrix2.frobeniusnormal.md +13 -0
- package/docs/server.matrix2.fromrotation.md +55 -0
- package/docs/server.matrix2.fromscaling.md +55 -0
- package/docs/server.matrix2.identity.md +19 -0
- package/docs/server.matrix2.invert.md +19 -0
- package/docs/server.matrix2.md +383 -0
- package/docs/server.matrix2.multiply.md +55 -0
- package/docs/server.matrix2.multiplyscalar.md +55 -0
- package/docs/server.matrix2.rotate.md +55 -0
- package/docs/server.matrix2.subtract.md +55 -0
- package/docs/server.matrix2.tostring.md +19 -0
- package/docs/server.matrix2.transpose.md +19 -0
- package/docs/server.matrix3._constructor_.md +159 -0
- package/docs/server.matrix3.add.md +55 -0
- package/docs/server.matrix3.adjoint.md +19 -0
- package/docs/server.matrix3.clone.md +19 -0
- package/docs/server.matrix3.copy.md +55 -0
- package/docs/server.matrix3.create.md +19 -0
- package/docs/server.matrix3.determinant.md +13 -0
- package/docs/server.matrix3.equals.md +55 -0
- package/docs/server.matrix3.exactequals.md +55 -0
- package/docs/server.matrix3.frobeniusnormal.md +13 -0
- package/docs/server.matrix3.frommatrix4.md +55 -0
- package/docs/server.matrix3.fromquaternion.md +55 -0
- package/docs/server.matrix3.fromrotation.md +55 -0
- package/docs/server.matrix3.fromscaling.md +55 -0
- package/docs/server.matrix3.fromtranslation.md +55 -0
- package/docs/server.matrix3.identity.md +19 -0
- package/docs/server.matrix3.invert.md +19 -0
- package/docs/server.matrix3.md +445 -0
- package/docs/server.matrix3.multiply.md +55 -0
- package/docs/server.matrix3.multiplyscalar.md +55 -0
- package/docs/server.matrix3.projection.md +71 -0
- package/docs/server.matrix3.rotate.md +55 -0
- package/docs/server.matrix3.subtract.md +55 -0
- package/docs/server.matrix3.tostring.md +19 -0
- package/docs/server.matrix3.transpose.md +19 -0
- package/docs/server.matrix4._constructor_.md +257 -0
- package/docs/server.matrix4.add.md +55 -0
- package/docs/server.matrix4.adjoint.md +19 -0
- package/docs/server.matrix4.clone.md +19 -0
- package/docs/server.matrix4.copy.md +55 -0
- package/docs/server.matrix4.create.md +19 -0
- package/docs/server.matrix4.determinant.md +13 -0
- package/docs/server.matrix4.equals.md +55 -0
- package/docs/server.matrix4.exactequals.md +55 -0
- package/docs/server.matrix4.frobeniusnormal.md +13 -0
- package/docs/server.matrix4.fromquaternion.md +55 -0
- package/docs/server.matrix4.fromrotation.md +71 -0
- package/docs/server.matrix4.fromrotationtranslation.md +71 -0
- package/docs/server.matrix4.fromrotationtranslationscale.md +87 -0
- package/docs/server.matrix4.fromrotationtranslationscaleorigin.md +103 -0
- package/docs/server.matrix4.fromscaling.md +55 -0
- package/docs/server.matrix4.fromtranslation.md +55 -0
- package/docs/server.matrix4.fromxrotation.md +55 -0
- package/docs/server.matrix4.fromyrotation.md +55 -0
- package/docs/server.matrix4.fromzrotation.md +55 -0
- package/docs/server.matrix4.frustrum.md +135 -0
- package/docs/server.matrix4.identity.md +19 -0
- package/docs/server.matrix4.invert.md +19 -0
- package/docs/server.matrix4.lookat.md +87 -0
- package/docs/server.matrix4.md +651 -0
- package/docs/server.matrix4.multiply.md +55 -0
- package/docs/server.matrix4.multiplyscalar.md +55 -0
- package/docs/server.matrix4.orthogonal.md +135 -0
- package/docs/server.matrix4.perspective.md +103 -0
- package/docs/server.matrix4.rotate.md +71 -0
- package/docs/server.matrix4.rotatex.md +55 -0
- package/docs/server.matrix4.rotatey.md +55 -0
- package/docs/server.matrix4.rotatez.md +55 -0
- package/docs/server.matrix4.scale.md +55 -0
- package/docs/server.matrix4.subtract.md +55 -0
- package/docs/server.matrix4.targetto.md +87 -0
- package/docs/server.matrix4.tostring.md +19 -0
- package/docs/server.matrix4.translate.md +55 -0
- package/docs/server.matrix4.transpose.md +19 -0
- package/docs/server.md +66 -0
- package/docs/server.quaternion.identity.md +19 -0
- package/docs/server.quaternion.length.md +13 -0
- package/docs/server.quaternion.logarithm.md +19 -0
- package/docs/server.quaternion.magnitude.md +1 -1
- package/docs/server.quaternion.md +114 -2
- package/docs/server.quaternion.power.md +55 -0
- package/docs/server.quaternion.randomize.md +19 -0
- package/docs/server.quaternion.setaxisangle.md +71 -0
- package/docs/server.quaternion.squaredlength.md +13 -0
- package/docs/server.quaternion.squaredmagnitude.md +1 -1
- package/docs/server.vector2._constructor_.md +61 -0
- package/docs/server.vector2.add.md +55 -0
- package/docs/server.vector2.angle.md +55 -0
- package/docs/server.vector2.ceil.md +19 -0
- package/docs/server.vector2.clone.md +19 -0
- package/docs/server.vector2.copy.md +55 -0
- package/docs/server.vector2.create.md +19 -0
- package/docs/server.vector2.cross.md +55 -0
- package/docs/server.vector2.distance.md +55 -0
- package/docs/server.vector2.divide.md +55 -0
- package/docs/server.vector2.dot.md +55 -0
- package/docs/server.vector2.equals.md +55 -0
- package/docs/server.vector2.exactequals.md +55 -0
- package/docs/server.vector2.floor.md +19 -0
- package/docs/server.vector2.invert.md +19 -0
- package/docs/server.vector2.length.md +13 -0
- package/docs/server.vector2.lerp.md +71 -0
- package/docs/server.vector2.magnitude.md +13 -0
- package/docs/server.vector2.max.md +55 -0
- package/docs/server.vector2.md +657 -0
- package/docs/server.vector2.min.md +55 -0
- package/docs/server.vector2.multiply.md +55 -0
- package/docs/server.vector2.negate.md +19 -0
- package/docs/server.vector2.normalize.md +19 -0
- package/docs/server.vector2.randomize.md +55 -0
- package/docs/server.vector2.rotate.md +71 -0
- package/docs/server.vector2.round.md +19 -0
- package/docs/server.vector2.scale.md +55 -0
- package/docs/server.vector2.scaleandadd.md +71 -0
- package/docs/server.vector2.squaredlength.md +13 -0
- package/docs/server.vector2.squaredmagnitude.md +13 -0
- package/docs/server.vector2.subtract.md +55 -0
- package/docs/server.vector2.tostring.md +19 -0
- package/docs/server.vector2.transformmatrix2.md +55 -0
- package/docs/server.vector2.transformmatrix3.md +55 -0
- package/docs/server.vector2.transformmatrix4.md +55 -0
- package/docs/server.vector2.x.md +15 -0
- package/docs/server.vector2.y.md +15 -0
- package/docs/server.vector2.zero.md +19 -0
- package/docs/server.vector2boolean.md +72 -0
- package/docs/server.vector2boolean.x.md +11 -0
- package/docs/server.vector2boolean.y.md +11 -0
- package/docs/server.vector2like.md +72 -0
- package/docs/server.vector2like.x.md +11 -0
- package/docs/server.vector2like.y.md +11 -0
- package/docs/server.vector3.create.md +19 -0
- package/docs/server.vector3.length.md +13 -0
- package/docs/server.vector3.magnitude.md +1 -1
- package/docs/server.vector3.md +144 -2
- package/docs/server.vector3.randomize.md +55 -0
- package/docs/server.vector3.scaleandadd.md +71 -0
- package/docs/server.vector3.squaredlength.md +13 -0
- package/docs/server.vector3.squaredmagnitude.md +1 -1
- package/docs/server.vector3.transformmatrix3.md +55 -0
- package/docs/server.vector3.transformmatrix4.md +55 -0
- package/docs/server.vector3.transformquaternion.md +55 -0
- package/docs/server.vector3.zero.md +19 -0
- package/examples/zombies-fps/classes/GameManager.ts +5 -3
- package/package.json +1 -1
- package/server.api.json +14293 -7345
- package/server.d.ts +917 -4
- package/server.js +89 -89
- package/examples/ai-agents/bun.lockb +0 -0
- package/examples/big-world/bun.lockb +0 -0
- package/examples/block-entity/bun.lockb +0 -0
- package/examples/child-entity/bun.lockb +0 -0
- package/examples/child-entity/package-lock.json +0 -30
- package/examples/custom-ui/bun.lockb +0 -0
- package/examples/entity-controller/bun.lockb +0 -0
- package/examples/entity-spawn/bun.lockb +0 -0
- package/examples/hole-in-wall-game/bun.lockb +0 -0
- package/examples/lighting/bun.lockb +0 -0
- package/examples/pathfinding/bun.lockb +0 -0
- package/examples/payload-game/bun.lockb +0 -0
- package/examples/wall-dodge-game/bun.lockb +0 -0
- package/examples/zombies-fps/bun.lockb +0 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Matrix4](./server.matrix4.md) > [toString](./server.matrix4.tostring.md)
|
4
|
+
|
5
|
+
## Matrix4.toString() method
|
6
|
+
|
7
|
+
Returns a string representation of the current matrix.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
toString(): string;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
string
|
17
|
+
|
18
|
+
A string representation of the current matrix.
|
19
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Matrix4](./server.matrix4.md) > [translate](./server.matrix4.translate.md)
|
4
|
+
|
5
|
+
## Matrix4.translate() method
|
6
|
+
|
7
|
+
Translates the current matrix by a vector.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
translate(vector3: Vector3): Matrix4;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
vector3
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3](./server.vector3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The vector to translate the current matrix by.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Matrix4](./server.matrix4.md)
|
53
|
+
|
54
|
+
The current matrix.
|
55
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Matrix4](./server.matrix4.md) > [transpose](./server.matrix4.transpose.md)
|
4
|
+
|
5
|
+
## Matrix4.transpose() method
|
6
|
+
|
7
|
+
Transposes the current matrix.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
transpose(): Matrix4;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
[Matrix4](./server.matrix4.md)
|
17
|
+
|
18
|
+
The current matrix.
|
19
|
+
|
package/docs/server.md
CHANGED
@@ -192,6 +192,39 @@ Represents a light in a world. Lights can be point lights or spotlights.
|
|
192
192
|
Manages Light instances in a world.
|
193
193
|
|
194
194
|
|
195
|
+
</td></tr>
|
196
|
+
<tr><td>
|
197
|
+
|
198
|
+
[Matrix2](./server.matrix2.md)
|
199
|
+
|
200
|
+
|
201
|
+
</td><td>
|
202
|
+
|
203
|
+
Represents a 2x2 matrix.
|
204
|
+
|
205
|
+
|
206
|
+
</td></tr>
|
207
|
+
<tr><td>
|
208
|
+
|
209
|
+
[Matrix3](./server.matrix3.md)
|
210
|
+
|
211
|
+
|
212
|
+
</td><td>
|
213
|
+
|
214
|
+
Represents a 3x3 matrix.
|
215
|
+
|
216
|
+
|
217
|
+
</td></tr>
|
218
|
+
<tr><td>
|
219
|
+
|
220
|
+
[Matrix4](./server.matrix4.md)
|
221
|
+
|
222
|
+
|
223
|
+
</td><td>
|
224
|
+
|
225
|
+
Represents a 4x4 matrix.
|
226
|
+
|
227
|
+
|
195
228
|
</td></tr>
|
196
229
|
<tr><td>
|
197
230
|
|
@@ -346,6 +379,17 @@ A simple entity controller with basic movement functions.
|
|
346
379
|
Represents the physics simulation for a world.
|
347
380
|
|
348
381
|
|
382
|
+
</td></tr>
|
383
|
+
<tr><td>
|
384
|
+
|
385
|
+
[Vector2](./server.vector2.md)
|
386
|
+
|
387
|
+
|
388
|
+
</td><td>
|
389
|
+
|
390
|
+
Represents a 2D vector.
|
391
|
+
|
392
|
+
|
349
393
|
</td></tr>
|
350
394
|
<tr><td>
|
351
395
|
|
@@ -780,6 +824,28 @@ Options for creating a SceneUI instance.
|
|
780
824
|
A 3x3 symmetric positive-definite matrix for spatial dynamics.
|
781
825
|
|
782
826
|
|
827
|
+
</td></tr>
|
828
|
+
<tr><td>
|
829
|
+
|
830
|
+
[Vector2Boolean](./server.vector2boolean.md)
|
831
|
+
|
832
|
+
|
833
|
+
</td><td>
|
834
|
+
|
835
|
+
A 2-dimensional vector of boolean values.
|
836
|
+
|
837
|
+
|
838
|
+
</td></tr>
|
839
|
+
<tr><td>
|
840
|
+
|
841
|
+
[Vector2Like](./server.vector2like.md)
|
842
|
+
|
843
|
+
|
844
|
+
</td><td>
|
845
|
+
|
846
|
+
A 2-dimensional vector.
|
847
|
+
|
848
|
+
|
783
849
|
</td></tr>
|
784
850
|
<tr><td>
|
785
851
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [identity](./server.quaternion.identity.md)
|
4
|
+
|
5
|
+
## Quaternion.identity() method
|
6
|
+
|
7
|
+
Sets the current quaternion to the identity quaternion.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
identity(): Quaternion;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
[Quaternion](./server.quaternion.md)
|
17
|
+
|
18
|
+
The current quaternion.
|
19
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [length](./server.quaternion.length.md)
|
4
|
+
|
5
|
+
## Quaternion.length property
|
6
|
+
|
7
|
+
The length of the quaternion.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get length(): number;
|
13
|
+
```
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [logarithm](./server.quaternion.logarithm.md)
|
4
|
+
|
5
|
+
## Quaternion.logarithm() method
|
6
|
+
|
7
|
+
Sets the current quaternion to its natural logarithm.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
logarithm(): Quaternion;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
[Quaternion](./server.quaternion.md)
|
17
|
+
|
18
|
+
The current quaternion.
|
19
|
+
|
@@ -78,6 +78,27 @@ Description
|
|
78
78
|
</th></tr></thead>
|
79
79
|
<tbody><tr><td>
|
80
80
|
|
81
|
+
[length](./server.quaternion.length.md)
|
82
|
+
|
83
|
+
|
84
|
+
</td><td>
|
85
|
+
|
86
|
+
`readonly`
|
87
|
+
|
88
|
+
|
89
|
+
</td><td>
|
90
|
+
|
91
|
+
number
|
92
|
+
|
93
|
+
|
94
|
+
</td><td>
|
95
|
+
|
96
|
+
The length of the quaternion.
|
97
|
+
|
98
|
+
|
99
|
+
</td></tr>
|
100
|
+
<tr><td>
|
101
|
+
|
81
102
|
[magnitude](./server.quaternion.magnitude.md)
|
82
103
|
|
83
104
|
|
@@ -93,7 +114,28 @@ number
|
|
93
114
|
|
94
115
|
</td><td>
|
95
116
|
|
96
|
-
The magnitude of the quaternion.
|
117
|
+
The magnitude of the quaternion. Alias for `.length`<!-- -->.
|
118
|
+
|
119
|
+
|
120
|
+
</td></tr>
|
121
|
+
<tr><td>
|
122
|
+
|
123
|
+
[squaredLength](./server.quaternion.squaredlength.md)
|
124
|
+
|
125
|
+
|
126
|
+
</td><td>
|
127
|
+
|
128
|
+
`readonly`
|
129
|
+
|
130
|
+
|
131
|
+
</td><td>
|
132
|
+
|
133
|
+
number
|
134
|
+
|
135
|
+
|
136
|
+
</td><td>
|
137
|
+
|
138
|
+
The squared length of the quaternion.
|
97
139
|
|
98
140
|
|
99
141
|
</td></tr>
|
@@ -114,7 +156,7 @@ number
|
|
114
156
|
|
115
157
|
</td><td>
|
116
158
|
|
117
|
-
The squared magnitude of the quaternion.
|
159
|
+
The squared magnitude of the quaternion. Alias for `.squaredLength`<!-- -->.
|
118
160
|
|
119
161
|
|
120
162
|
</td></tr>
|
@@ -357,6 +399,20 @@ Creates a quaternion from a `QuaternionLike` object.
|
|
357
399
|
Calculates and returns the angle between the current quaternion and another quaternion.
|
358
400
|
|
359
401
|
|
402
|
+
</td></tr>
|
403
|
+
<tr><td>
|
404
|
+
|
405
|
+
[identity()](./server.quaternion.identity.md)
|
406
|
+
|
407
|
+
|
408
|
+
</td><td>
|
409
|
+
|
410
|
+
|
411
|
+
</td><td>
|
412
|
+
|
413
|
+
Sets the current quaternion to the identity quaternion.
|
414
|
+
|
415
|
+
|
360
416
|
</td></tr>
|
361
417
|
<tr><td>
|
362
418
|
|
@@ -385,6 +441,20 @@ Inverts each component of the quaternion.
|
|
385
441
|
Linearly interpolates between the current quaternion and another quaternion.
|
386
442
|
|
387
443
|
|
444
|
+
</td></tr>
|
445
|
+
<tr><td>
|
446
|
+
|
447
|
+
[logarithm()](./server.quaternion.logarithm.md)
|
448
|
+
|
449
|
+
|
450
|
+
</td><td>
|
451
|
+
|
452
|
+
|
453
|
+
</td><td>
|
454
|
+
|
455
|
+
Sets the current quaternion to its natural logarithm.
|
456
|
+
|
457
|
+
|
388
458
|
</td></tr>
|
389
459
|
<tr><td>
|
390
460
|
|
@@ -413,6 +483,34 @@ Multiplies the quaternion by another quaternion.
|
|
413
483
|
Normalizes the quaternion.
|
414
484
|
|
415
485
|
|
486
|
+
</td></tr>
|
487
|
+
<tr><td>
|
488
|
+
|
489
|
+
[power(exponent)](./server.quaternion.power.md)
|
490
|
+
|
491
|
+
|
492
|
+
</td><td>
|
493
|
+
|
494
|
+
|
495
|
+
</td><td>
|
496
|
+
|
497
|
+
Raises the current quaternion to a power.
|
498
|
+
|
499
|
+
|
500
|
+
</td></tr>
|
501
|
+
<tr><td>
|
502
|
+
|
503
|
+
[randomize()](./server.quaternion.randomize.md)
|
504
|
+
|
505
|
+
|
506
|
+
</td><td>
|
507
|
+
|
508
|
+
|
509
|
+
</td><td>
|
510
|
+
|
511
|
+
Randomizes the current quaternion.
|
512
|
+
|
513
|
+
|
416
514
|
</td></tr>
|
417
515
|
<tr><td>
|
418
516
|
|
@@ -469,6 +567,20 @@ Rotates the quaternion around the z-axis.
|
|
469
567
|
Scales the quaternion by a scalar value.
|
470
568
|
|
471
569
|
|
570
|
+
</td></tr>
|
571
|
+
<tr><td>
|
572
|
+
|
573
|
+
[setAxisAngle(axis, angle)](./server.quaternion.setaxisangle.md)
|
574
|
+
|
575
|
+
|
576
|
+
</td><td>
|
577
|
+
|
578
|
+
|
579
|
+
</td><td>
|
580
|
+
|
581
|
+
Sets the current quaternion to the angle and rotation axis.
|
582
|
+
|
583
|
+
|
472
584
|
</td></tr>
|
473
585
|
<tr><td>
|
474
586
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [power](./server.quaternion.power.md)
|
4
|
+
|
5
|
+
## Quaternion.power() method
|
6
|
+
|
7
|
+
Raises the current quaternion to a power.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
power(exponent: number): Quaternion;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
exponent
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The exponent to raise the quaternion to.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Quaternion](./server.quaternion.md)
|
53
|
+
|
54
|
+
The current quaternion.
|
55
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [randomize](./server.quaternion.randomize.md)
|
4
|
+
|
5
|
+
## Quaternion.randomize() method
|
6
|
+
|
7
|
+
Randomizes the current quaternion.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
randomize(): Quaternion;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
[Quaternion](./server.quaternion.md)
|
17
|
+
|
18
|
+
The current quaternion.
|
19
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [setAxisAngle](./server.quaternion.setaxisangle.md)
|
4
|
+
|
5
|
+
## Quaternion.setAxisAngle() method
|
6
|
+
|
7
|
+
Sets the current quaternion to the angle and rotation axis.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setAxisAngle(axis: Vector3, angle: number): Quaternion;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
axis
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3](./server.vector3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The axis to rotate around.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
<tr><td>
|
50
|
+
|
51
|
+
angle
|
52
|
+
|
53
|
+
|
54
|
+
</td><td>
|
55
|
+
|
56
|
+
number
|
57
|
+
|
58
|
+
|
59
|
+
</td><td>
|
60
|
+
|
61
|
+
The angle to rotate in radians.
|
62
|
+
|
63
|
+
|
64
|
+
</td></tr>
|
65
|
+
</tbody></table>
|
66
|
+
**Returns:**
|
67
|
+
|
68
|
+
[Quaternion](./server.quaternion.md)
|
69
|
+
|
70
|
+
The current quaternion.
|
71
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Quaternion](./server.quaternion.md) > [squaredLength](./server.quaternion.squaredlength.md)
|
4
|
+
|
5
|
+
## Quaternion.squaredLength property
|
6
|
+
|
7
|
+
The squared length of the quaternion.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get squaredLength(): number;
|
13
|
+
```
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2](./server.vector2.md) > [(constructor)](./server.vector2._constructor_.md)
|
4
|
+
|
5
|
+
## Vector2.(constructor)
|
6
|
+
|
7
|
+
Constructs a new instance of the `Vector2` class
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
constructor(x: number, y: number);
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
x
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
|
46
|
+
</td></tr>
|
47
|
+
<tr><td>
|
48
|
+
|
49
|
+
y
|
50
|
+
|
51
|
+
|
52
|
+
</td><td>
|
53
|
+
|
54
|
+
number
|
55
|
+
|
56
|
+
|
57
|
+
</td><td>
|
58
|
+
|
59
|
+
|
60
|
+
</td></tr>
|
61
|
+
</tbody></table>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2](./server.vector2.md) > [add](./server.vector2.add.md)
|
4
|
+
|
5
|
+
## Vector2.add() method
|
6
|
+
|
7
|
+
Adds a vector to the current vector.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
add(vector2: Vector2): Vector2;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
vector2
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector2](./server.vector2.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The vector to add to the current vector.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Vector2](./server.vector2.md)
|
53
|
+
|
54
|
+
The current vector.
|
55
|
+
|