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,72 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2Boolean](./server.vector2boolean.md)
|
4
|
+
|
5
|
+
## Vector2Boolean interface
|
6
|
+
|
7
|
+
A 2-dimensional vector of boolean values.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
interface Vector2Boolean
|
13
|
+
```
|
14
|
+
|
15
|
+
## Properties
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Property
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Modifiers
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Type
|
30
|
+
|
31
|
+
|
32
|
+
</th><th>
|
33
|
+
|
34
|
+
Description
|
35
|
+
|
36
|
+
|
37
|
+
</th></tr></thead>
|
38
|
+
<tbody><tr><td>
|
39
|
+
|
40
|
+
[x](./server.vector2boolean.x.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
|
46
|
+
</td><td>
|
47
|
+
|
48
|
+
boolean
|
49
|
+
|
50
|
+
|
51
|
+
</td><td>
|
52
|
+
|
53
|
+
|
54
|
+
</td></tr>
|
55
|
+
<tr><td>
|
56
|
+
|
57
|
+
[y](./server.vector2boolean.y.md)
|
58
|
+
|
59
|
+
|
60
|
+
</td><td>
|
61
|
+
|
62
|
+
|
63
|
+
</td><td>
|
64
|
+
|
65
|
+
boolean
|
66
|
+
|
67
|
+
|
68
|
+
</td><td>
|
69
|
+
|
70
|
+
|
71
|
+
</td></tr>
|
72
|
+
</tbody></table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2Boolean](./server.vector2boolean.md) > [x](./server.vector2boolean.x.md)
|
4
|
+
|
5
|
+
## Vector2Boolean.x property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
x: boolean;
|
11
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2Boolean](./server.vector2boolean.md) > [y](./server.vector2boolean.y.md)
|
4
|
+
|
5
|
+
## Vector2Boolean.y property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
y: boolean;
|
11
|
+
```
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2Like](./server.vector2like.md)
|
4
|
+
|
5
|
+
## Vector2Like interface
|
6
|
+
|
7
|
+
A 2-dimensional vector.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
interface Vector2Like
|
13
|
+
```
|
14
|
+
|
15
|
+
## Properties
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Property
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Modifiers
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Type
|
30
|
+
|
31
|
+
|
32
|
+
</th><th>
|
33
|
+
|
34
|
+
Description
|
35
|
+
|
36
|
+
|
37
|
+
</th></tr></thead>
|
38
|
+
<tbody><tr><td>
|
39
|
+
|
40
|
+
[x](./server.vector2like.x.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
|
46
|
+
</td><td>
|
47
|
+
|
48
|
+
number
|
49
|
+
|
50
|
+
|
51
|
+
</td><td>
|
52
|
+
|
53
|
+
|
54
|
+
</td></tr>
|
55
|
+
<tr><td>
|
56
|
+
|
57
|
+
[y](./server.vector2like.y.md)
|
58
|
+
|
59
|
+
|
60
|
+
</td><td>
|
61
|
+
|
62
|
+
|
63
|
+
</td><td>
|
64
|
+
|
65
|
+
number
|
66
|
+
|
67
|
+
|
68
|
+
</td><td>
|
69
|
+
|
70
|
+
|
71
|
+
</td></tr>
|
72
|
+
</tbody></table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2Like](./server.vector2like.md) > [x](./server.vector2like.x.md)
|
4
|
+
|
5
|
+
## Vector2Like.x property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
x: number;
|
11
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Vector2Like](./server.vector2like.md) > [y](./server.vector2like.y.md)
|
4
|
+
|
5
|
+
## Vector2Like.y property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
y: number;
|
11
|
+
```
|
@@ -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) > [Vector3](./server.vector3.md) > [create](./server.vector3.create.md)
|
4
|
+
|
5
|
+
## Vector3.create() method
|
6
|
+
|
7
|
+
Creates a new `Vector3` instance.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
static create(): Vector3;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
[Vector3](./server.vector3.md)
|
17
|
+
|
18
|
+
A new `Vector3` instance.
|
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) > [Vector3](./server.vector3.md) > [length](./server.vector3.length.md)
|
4
|
+
|
5
|
+
## Vector3.length property
|
6
|
+
|
7
|
+
The length of the vector.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get length(): number;
|
13
|
+
```
|
package/docs/server.vector3.md
CHANGED
@@ -78,6 +78,27 @@ Description
|
|
78
78
|
</th></tr></thead>
|
79
79
|
<tbody><tr><td>
|
80
80
|
|
81
|
+
[length](./server.vector3.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 vector.
|
97
|
+
|
98
|
+
|
99
|
+
</td></tr>
|
100
|
+
<tr><td>
|
101
|
+
|
81
102
|
[magnitude](./server.vector3.magnitude.md)
|
82
103
|
|
83
104
|
|
@@ -93,7 +114,28 @@ number
|
|
93
114
|
|
94
115
|
</td><td>
|
95
116
|
|
96
|
-
The magnitude of the vector.
|
117
|
+
The magnitude of the vector. Alias for `length`<!-- -->.
|
118
|
+
|
119
|
+
|
120
|
+
</td></tr>
|
121
|
+
<tr><td>
|
122
|
+
|
123
|
+
[squaredLength](./server.vector3.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 vector.
|
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 vector.
|
159
|
+
The squared magnitude of the vector. Alias for `squaredLength`<!-- -->.
|
118
160
|
|
119
161
|
|
120
162
|
</td></tr>
|
@@ -250,6 +292,22 @@ Returns a new vector with the same components as the current vector.
|
|
250
292
|
Copies the components of a vector to the current vector.
|
251
293
|
|
252
294
|
|
295
|
+
</td></tr>
|
296
|
+
<tr><td>
|
297
|
+
|
298
|
+
[create()](./server.vector3.create.md)
|
299
|
+
|
300
|
+
|
301
|
+
</td><td>
|
302
|
+
|
303
|
+
`static`
|
304
|
+
|
305
|
+
|
306
|
+
</td><td>
|
307
|
+
|
308
|
+
Creates a new `Vector3` instance.
|
309
|
+
|
310
|
+
|
253
311
|
</td></tr>
|
254
312
|
<tr><td>
|
255
313
|
|
@@ -448,6 +506,20 @@ Negates each component of the vector.
|
|
448
506
|
Normalizes the vector.
|
449
507
|
|
450
508
|
|
509
|
+
</td></tr>
|
510
|
+
<tr><td>
|
511
|
+
|
512
|
+
[randomize(scale)](./server.vector3.randomize.md)
|
513
|
+
|
514
|
+
|
515
|
+
</td><td>
|
516
|
+
|
517
|
+
|
518
|
+
</td><td>
|
519
|
+
|
520
|
+
Randomizes the vector.
|
521
|
+
|
522
|
+
|
451
523
|
</td></tr>
|
452
524
|
<tr><td>
|
453
525
|
|
@@ -518,6 +590,20 @@ Rounds each component of the vector to the nearest integer.
|
|
518
590
|
Scales each component of the vector by a scalar value.
|
519
591
|
|
520
592
|
|
593
|
+
</td></tr>
|
594
|
+
<tr><td>
|
595
|
+
|
596
|
+
[scaleAndAdd(vector3, scale)](./server.vector3.scaleandadd.md)
|
597
|
+
|
598
|
+
|
599
|
+
</td><td>
|
600
|
+
|
601
|
+
|
602
|
+
</td><td>
|
603
|
+
|
604
|
+
Adds 2 vectors together after scaling the provided vector by a scalar value.
|
605
|
+
|
606
|
+
|
521
607
|
</td></tr>
|
522
608
|
<tr><td>
|
523
609
|
|
@@ -546,5 +632,61 @@ Subtracts a vector from the current vector.
|
|
546
632
|
Returns a string representation of the vector in x,y,z format.
|
547
633
|
|
548
634
|
|
635
|
+
</td></tr>
|
636
|
+
<tr><td>
|
637
|
+
|
638
|
+
[transformMatrix3(matrix3)](./server.vector3.transformmatrix3.md)
|
639
|
+
|
640
|
+
|
641
|
+
</td><td>
|
642
|
+
|
643
|
+
|
644
|
+
</td><td>
|
645
|
+
|
646
|
+
Transforms the vector by a matrix3.
|
647
|
+
|
648
|
+
|
649
|
+
</td></tr>
|
650
|
+
<tr><td>
|
651
|
+
|
652
|
+
[transformMatrix4(matrix4)](./server.vector3.transformmatrix4.md)
|
653
|
+
|
654
|
+
|
655
|
+
</td><td>
|
656
|
+
|
657
|
+
|
658
|
+
</td><td>
|
659
|
+
|
660
|
+
Transforms the vector by a matrix4.
|
661
|
+
|
662
|
+
|
663
|
+
</td></tr>
|
664
|
+
<tr><td>
|
665
|
+
|
666
|
+
[transformQuaternion(quaternion)](./server.vector3.transformquaternion.md)
|
667
|
+
|
668
|
+
|
669
|
+
</td><td>
|
670
|
+
|
671
|
+
|
672
|
+
</td><td>
|
673
|
+
|
674
|
+
Transforms the vector by a quaternion.
|
675
|
+
|
676
|
+
|
677
|
+
</td></tr>
|
678
|
+
<tr><td>
|
679
|
+
|
680
|
+
[zero()](./server.vector3.zero.md)
|
681
|
+
|
682
|
+
|
683
|
+
</td><td>
|
684
|
+
|
685
|
+
|
686
|
+
</td><td>
|
687
|
+
|
688
|
+
Sets each component of the vector to zero.
|
689
|
+
|
690
|
+
|
549
691
|
</td></tr>
|
550
692
|
</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) > [Vector3](./server.vector3.md) > [randomize](./server.vector3.randomize.md)
|
4
|
+
|
5
|
+
## Vector3.randomize() method
|
6
|
+
|
7
|
+
Randomizes the vector.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
randomize(scale?: number): Vector3;
|
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
|
+
scale
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
_(Optional)_ Length of the resulting vector, if omitted a unit vector is set.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Vector3](./server.vector3.md)
|
53
|
+
|
54
|
+
The current vector.
|
55
|
+
|
@@ -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) > [Vector3](./server.vector3.md) > [scaleAndAdd](./server.vector3.scaleandadd.md)
|
4
|
+
|
5
|
+
## Vector3.scaleAndAdd() method
|
6
|
+
|
7
|
+
Adds 2 vectors together after scaling the provided vector by a scalar value.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
scaleAndAdd(vector3: Vector3, scale: number): Vector3;
|
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 add the scaled vector to.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
<tr><td>
|
50
|
+
|
51
|
+
scale
|
52
|
+
|
53
|
+
|
54
|
+
</td><td>
|
55
|
+
|
56
|
+
number
|
57
|
+
|
58
|
+
|
59
|
+
</td><td>
|
60
|
+
|
61
|
+
The scalar value to scale the current vector by.
|
62
|
+
|
63
|
+
|
64
|
+
</td></tr>
|
65
|
+
</tbody></table>
|
66
|
+
**Returns:**
|
67
|
+
|
68
|
+
[Vector3](./server.vector3.md)
|
69
|
+
|
70
|
+
The current vector.
|
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) > [Vector3](./server.vector3.md) > [squaredLength](./server.vector3.squaredlength.md)
|
4
|
+
|
5
|
+
## Vector3.squaredLength property
|
6
|
+
|
7
|
+
The squared length of the vector.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get squaredLength(): number;
|
13
|
+
```
|
@@ -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) > [Vector3](./server.vector3.md) > [transformMatrix3](./server.vector3.transformmatrix3.md)
|
4
|
+
|
5
|
+
## Vector3.transformMatrix3() method
|
6
|
+
|
7
|
+
Transforms the vector by a matrix3.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
transformMatrix3(matrix3: Matrix3): Vector3;
|
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
|
+
matrix3
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Matrix3](./server.matrix3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The matrix3 to transform the vector by.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Vector3](./server.vector3.md)
|
53
|
+
|
54
|
+
The current vector.
|
55
|
+
|
@@ -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) > [Vector3](./server.vector3.md) > [transformMatrix4](./server.vector3.transformmatrix4.md)
|
4
|
+
|
5
|
+
## Vector3.transformMatrix4() method
|
6
|
+
|
7
|
+
Transforms the vector by a matrix4.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
transformMatrix4(matrix4: Matrix4): Vector3;
|
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
|
+
matrix4
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Matrix4](./server.matrix4.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The matrix4 to transform the vector by.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Vector3](./server.vector3.md)
|
53
|
+
|
54
|
+
The current vector.
|
55
|
+
|