hytopia 0.2.3 → 0.2.4

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.
Files changed (93) hide show
  1. package/bun.lock +494 -0
  2. package/docs/{server.matrix2.frobeniusnormal.md → server.matrix2.frobeniusnorm.md} +3 -3
  3. package/docs/server.matrix2.md +1 -1
  4. package/docs/server.matrix3.frobeniusnorm.md +13 -0
  5. package/docs/server.matrix3.fromtranslation.md +3 -3
  6. package/docs/server.matrix3.md +18 -4
  7. package/docs/server.matrix3.projection.md +1 -1
  8. package/docs/server.matrix3.transformvector.md +55 -0
  9. package/docs/server.matrix4.frobeniusnorm.md +13 -0
  10. package/docs/server.matrix4.md +4 -4
  11. package/docs/{server.matrix4.orthogonal.md → server.matrix4.orthographic.md} +10 -10
  12. package/docs/server.quaternion.md +14 -0
  13. package/docs/server.quaternion.transformvector.md +55 -0
  14. package/docs/server.vector2.md +0 -14
  15. package/docs/server.vector3.dot.md +55 -0
  16. package/docs/server.vector3.md +14 -0
  17. package/examples/child-entity/assets/models/.optimized/baseColor.png +0 -0
  18. package/examples/child-entity/assets/models/.optimized/sword/baseColor.png +0 -0
  19. package/examples/child-entity/assets/models/.optimized/sword/sword.bin +0 -0
  20. package/examples/child-entity/assets/models/.optimized/sword/sword.gltf +356 -0
  21. package/examples/child-entity/assets/models/.optimized/sword.bin +0 -0
  22. package/examples/child-entity/assets/models/.optimized/sword.gltf +136 -0
  23. package/examples/child-entity/bun.lock +17 -0
  24. package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/barbedfence.bin +0 -0
  25. package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/barbedfence.gltf +806 -0
  26. package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/barbedfence.gltf.md5 +1 -0
  27. package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/baseColor.png +0 -0
  28. package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/baseColor.png +0 -0
  29. package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/binoculars.bin +0 -0
  30. package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/binoculars.gltf +1633 -0
  31. package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/binoculars.gltf.md5 +1 -0
  32. package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/baseColor.png +0 -0
  33. package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/bombbox.bin +0 -0
  34. package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/bombbox.gltf +2480 -0
  35. package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/bombbox.gltf.md5 +1 -0
  36. package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/baseColor.png +0 -0
  37. package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/bullet-hole.bin +0 -0
  38. package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/bullet-hole.gltf +136 -0
  39. package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/bullet-hole.gltf.md5 +1 -0
  40. package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/baseColor.png +0 -0
  41. package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/healthkit.bin +0 -0
  42. package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/healthkit.gltf +831 -0
  43. package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/healthkit.gltf.md5 +1 -0
  44. package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/baseColor_1.png +0 -0
  45. package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/baseColor_2.png +0 -0
  46. package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/metalshelf.bin +0 -0
  47. package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/metalshelf.gltf +4025 -0
  48. package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/metalshelf.gltf.md5 +1 -0
  49. package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/baseColor_1.png +0 -0
  50. package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/baseColor_2.png +0 -0
  51. package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/muzzle-flash.bin +0 -0
  52. package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/muzzle-flash.gltf +196 -0
  53. package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/muzzle-flash.gltf.md5 +1 -0
  54. package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/baseColor_1.png +0 -0
  55. package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/baseColor_2.png +0 -0
  56. package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/weaponbox.bin +0 -0
  57. package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/weaponbox.gltf +3412 -0
  58. package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/weaponbox.gltf.md5 +1 -0
  59. package/examples/zombies-fps/assets/models/items/.optimized/ak-47/ak-47.glb +0 -0
  60. package/examples/zombies-fps/assets/models/items/.optimized/ak-47/ak-47.glb.md5 +1 -0
  61. package/examples/zombies-fps/assets/models/items/.optimized/ar-15/ar-15.glb +0 -0
  62. package/examples/zombies-fps/assets/models/items/.optimized/ar-15/ar-15.glb.md5 +1 -0
  63. package/examples/zombies-fps/assets/models/items/.optimized/auto-pistol/auto-pistol.glb +0 -0
  64. package/examples/zombies-fps/assets/models/items/.optimized/auto-pistol/auto-pistol.glb.md5 +1 -0
  65. package/examples/zombies-fps/assets/models/items/.optimized/auto-shotgun/auto-shotgun.glb +0 -0
  66. package/examples/zombies-fps/assets/models/items/.optimized/auto-shotgun/auto-shotgun.glb.md5 +1 -0
  67. package/examples/zombies-fps/assets/models/items/.optimized/pistol/pistol.glb +0 -0
  68. package/examples/zombies-fps/assets/models/items/.optimized/pistol/pistol.glb.md5 +1 -0
  69. package/examples/zombies-fps/assets/models/items/.optimized/shotgun/shotgun.glb +0 -0
  70. package/examples/zombies-fps/assets/models/items/.optimized/shotgun/shotgun.glb.md5 +1 -0
  71. package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/baseColor.png +0 -0
  72. package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/ripper-boss.bin +0 -0
  73. package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/ripper-boss.gltf +10037 -0
  74. package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/ripper-boss.gltf.md5 +1 -0
  75. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_1.png +0 -0
  76. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_2.png +0 -0
  77. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_3.png +0 -0
  78. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_4.png +0 -0
  79. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.bin +0 -0
  80. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.gltf +7679 -0
  81. package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.gltf.md5 +1 -0
  82. package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/baseColor.png +0 -0
  83. package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.bin +0 -0
  84. package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.gltf +136 -0
  85. package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.gltf.md5 +1 -0
  86. package/examples/zombies-fps/classes/GameManager.ts +8 -1
  87. package/package.json +4 -1
  88. package/server.api.json +168 -69
  89. package/server.d.ts +40 -22
  90. package/server.js +44 -44
  91. package/docs/server.matrix3.frobeniusnormal.md +0 -13
  92. package/docs/server.matrix4.frobeniusnormal.md +0 -13
  93. package/docs/server.vector2.cross.md +0 -55
@@ -97,7 +97,7 @@ The determinant of the matrix.
97
97
  </td></tr>
98
98
  <tr><td>
99
99
 
100
- [frobeniusNormal](./server.matrix3.frobeniusnormal.md)
100
+ [frobeniusNorm](./server.matrix3.frobeniusnorm.md)
101
101
 
102
102
 
103
103
  </td><td>
@@ -112,7 +112,7 @@ number
112
112
 
113
113
  </td><td>
114
114
 
115
- The frobenius normal of the matrix.
115
+ The frobenius norm of the matrix.
116
116
 
117
117
 
118
118
  </td></tr>
@@ -312,7 +312,7 @@ Creates a new `Matrix3` instance from a scale of identity matrix.
312
312
 
313
313
  </td><td>
314
314
 
315
- Creates a new `Matrix3` instance from a translation of identity matrix.
315
+ Creates a new `Matrix3` instance from a translation of identity matrix. This is used only when working with two-dimensional homogeneous coordinates, which is why the `translation` parameter is a `Vector2`<!-- -->.
316
316
 
317
317
 
318
318
  </td></tr>
@@ -382,7 +382,7 @@ Multiplies each element of the current matrix by a scalar value.
382
382
 
383
383
  </td><td>
384
384
 
385
- Sets the current matrix to a projection matrix with the given bounds.
385
+ Sets the current matrix to a orthographic projection matrix with the given bounds.
386
386
 
387
387
 
388
388
  </td></tr>
@@ -427,6 +427,20 @@ Subtracts a matrix from the current matrix.
427
427
  Returns a string representation of the current matrix.
428
428
 
429
429
 
430
+ </td></tr>
431
+ <tr><td>
432
+
433
+ [transformVector(vector)](./server.matrix3.transformvector.md)
434
+
435
+
436
+ </td><td>
437
+
438
+
439
+ </td><td>
440
+
441
+ Multiplies the provided vector3 by this matrix. This modifies the vector in-place, but also returns the transformed vector.
442
+
443
+
430
444
  </td></tr>
431
445
  <tr><td>
432
446
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Matrix3.projection() method
6
6
 
7
- Sets the current matrix to a projection matrix with the given bounds.
7
+ Sets the current matrix to a orthographic projection matrix with the given bounds.
8
8
 
9
9
  **Signature:**
10
10
 
@@ -0,0 +1,55 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Matrix3](./server.matrix3.md) &gt; [transformVector](./server.matrix3.transformvector.md)
4
+
5
+ ## Matrix3.transformVector() method
6
+
7
+ Multiplies the provided vector3 by this matrix. This modifies the vector in-place, but also returns the transformed vector.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ transformVector(vector: Vector3): 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
+ vector
36
+
37
+
38
+ </td><td>
39
+
40
+ [Vector3](./server.vector3.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ The vector to multiply by this.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ [Vector3](./server.vector3.md)
53
+
54
+ The transformed vector.
55
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Matrix4](./server.matrix4.md) &gt; [frobeniusNorm](./server.matrix4.frobeniusnorm.md)
4
+
5
+ ## Matrix4.frobeniusNorm property
6
+
7
+ The frobenius norm of the matrix.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get frobeniusNorm(): number;
13
+ ```
@@ -97,7 +97,7 @@ The determinant of the matrix.
97
97
  </td></tr>
98
98
  <tr><td>
99
99
 
100
- [frobeniusNormal](./server.matrix4.frobeniusnormal.md)
100
+ [frobeniusNorm](./server.matrix4.frobeniusnorm.md)
101
101
 
102
102
 
103
103
  </td><td>
@@ -112,7 +112,7 @@ number
112
112
 
113
113
  </td><td>
114
114
 
115
- The frobenius normal of the matrix.
115
+ The frobenius norm of the matrix.
116
116
 
117
117
 
118
118
  </td></tr>
@@ -482,7 +482,7 @@ Multiplies each element of the current matrix by a scalar value.
482
482
  </td></tr>
483
483
  <tr><td>
484
484
 
485
- [orthogonal(left, right, bottom, top, near, far)](./server.matrix4.orthogonal.md)
485
+ [orthographic(left, right, bottom, top, near, far)](./server.matrix4.orthographic.md)
486
486
 
487
487
 
488
488
  </td><td>
@@ -490,7 +490,7 @@ Multiplies each element of the current matrix by a scalar value.
490
490
 
491
491
  </td><td>
492
492
 
493
- Sets the current matrix to an orthogonal matrix with the given bounds.
493
+ Sets the current matrix to an orthographic projection matrix with the given bounds.
494
494
 
495
495
 
496
496
  </td></tr>
@@ -1,15 +1,15 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [server](./server.md) &gt; [Matrix4](./server.matrix4.md) &gt; [orthogonal](./server.matrix4.orthogonal.md)
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Matrix4](./server.matrix4.md) &gt; [orthographic](./server.matrix4.orthographic.md)
4
4
 
5
- ## Matrix4.orthogonal() method
5
+ ## Matrix4.orthographic() method
6
6
 
7
- Sets the current matrix to an orthogonal matrix with the given bounds.
7
+ Sets the current matrix to an orthographic projection matrix with the given bounds.
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- orthogonal(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4;
12
+ orthographic(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4;
13
13
  ```
14
14
 
15
15
  ## Parameters
@@ -42,7 +42,7 @@ number
42
42
 
43
43
  </td><td>
44
44
 
45
- The left bound of the projection.
45
+ The left bound of the frustum.
46
46
 
47
47
 
48
48
  </td></tr>
@@ -58,7 +58,7 @@ number
58
58
 
59
59
  </td><td>
60
60
 
61
- The right bound of the projection.
61
+ The right bound of the frustum.
62
62
 
63
63
 
64
64
  </td></tr>
@@ -74,7 +74,7 @@ number
74
74
 
75
75
  </td><td>
76
76
 
77
- The bottom bound of the projection.
77
+ The bottom bound of the frustum.
78
78
 
79
79
 
80
80
  </td></tr>
@@ -90,7 +90,7 @@ number
90
90
 
91
91
  </td><td>
92
92
 
93
- The top bound of the projection.
93
+ The top bound of the frustum.
94
94
 
95
95
 
96
96
  </td></tr>
@@ -106,7 +106,7 @@ number
106
106
 
107
107
  </td><td>
108
108
 
109
- The near bound of the projection.
109
+ The near bound of the frustum.
110
110
 
111
111
 
112
112
  </td></tr>
@@ -122,7 +122,7 @@ number
122
122
 
123
123
  </td><td>
124
124
 
125
- The far bound of the projection.
125
+ The far bound of the frustum.
126
126
 
127
127
 
128
128
  </td></tr>
@@ -609,5 +609,19 @@ Spherically interpolates between the current quaternion and another quaternion.
609
609
  Returns a string representation of the quaternion in x,y,z,w format.
610
610
 
611
611
 
612
+ </td></tr>
613
+ <tr><td>
614
+
615
+ [transformVector(vector)](./server.quaternion.transformvector.md)
616
+
617
+
618
+ </td><td>
619
+
620
+
621
+ </td><td>
622
+
623
+ Rotates the provided vector by the rotation this quaternion represents. This modifies the vector in-place, but also returns the rotated vector.
624
+
625
+
612
626
  </td></tr>
613
627
  </tbody></table>
@@ -0,0 +1,55 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Quaternion](./server.quaternion.md) &gt; [transformVector](./server.quaternion.transformvector.md)
4
+
5
+ ## Quaternion.transformVector() method
6
+
7
+ Rotates the provided vector by the rotation this quaternion represents. This modifies the vector in-place, but also returns the rotated vector.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ transformVector(vector: Vector3): 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
+ vector
36
+
37
+
38
+ </td><td>
39
+
40
+ [Vector3](./server.vector3.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ the vector to rotate
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ [Vector3](./server.vector3.md)
53
+
54
+ the rotated vector.
55
+
@@ -303,20 +303,6 @@ Copies the components of a vector to the current vector.
303
303
  Creates a new `Vector2` instance.
304
304
 
305
305
 
306
- </td></tr>
307
- <tr><td>
308
-
309
- [cross(vector2)](./server.vector2.cross.md)
310
-
311
-
312
- </td><td>
313
-
314
-
315
- </td><td>
316
-
317
- Calculates the cross product of the current vector and another vector.
318
-
319
-
320
306
  </td></tr>
321
307
  <tr><td>
322
308
 
@@ -0,0 +1,55 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Vector3](./server.vector3.md) &gt; [dot](./server.vector3.dot.md)
4
+
5
+ ## Vector3.dot() method
6
+
7
+ Returns the dot product of this vector and another vector.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ dot(vector3: Vector3): 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
+ vector3
36
+
37
+
38
+ </td><td>
39
+
40
+ [Vector3](./server.vector3.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ the other vector
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ number
53
+
54
+ the dot product of this and vector3
55
+
@@ -350,6 +350,20 @@ Calculates the distance between the current vector and another vector.
350
350
  Divides each component of the current vector by the corresponding component of another vector.
351
351
 
352
352
 
353
+ </td></tr>
354
+ <tr><td>
355
+
356
+ [dot(vector3)](./server.vector3.dot.md)
357
+
358
+
359
+ </td><td>
360
+
361
+
362
+ </td><td>
363
+
364
+ Returns the dot product of this vector and another vector.
365
+
366
+
353
367
  </td></tr>
354
368
  <tr><td>
355
369