hytopia 0.1.52 → 0.1.54

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.
@@ -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; [Block](./server.block.md) &gt; [getNeighborGlobalCoordinateFromHitPoint](./server.block.getneighborglobalcoordinatefromhitpoint.md)
4
+
5
+ ## Block.getNeighborGlobalCoordinateFromHitPoint() method
6
+
7
+ Gets the most adjacent neighbor global coordinate of this block based on a relative hit point, typically from a raycast.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getNeighborGlobalCoordinateFromHitPoint(hitPoint: Vector3Like): Vector3Like;
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
+ hitPoint
36
+
37
+
38
+ </td><td>
39
+
40
+ [Vector3Like](./server.vector3like.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ The hit point on this block to get the neighbor coordinate from.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ [Vector3Like](./server.vector3like.md)
53
+
54
+ A neighbor global coordinate of this block based on the hit point.
55
+
@@ -82,5 +82,39 @@ The block type of the block.
82
82
  The global coordinate of the block.
83
83
 
84
84
 
85
+ </td></tr>
86
+ </tbody></table>
87
+
88
+ ## Methods
89
+
90
+ <table><thead><tr><th>
91
+
92
+ Method
93
+
94
+
95
+ </th><th>
96
+
97
+ Modifiers
98
+
99
+
100
+ </th><th>
101
+
102
+ Description
103
+
104
+
105
+ </th></tr></thead>
106
+ <tbody><tr><td>
107
+
108
+ [getNeighborGlobalCoordinateFromHitPoint(hitPoint)](./server.block.getneighborglobalcoordinatefromhitpoint.md)
109
+
110
+
111
+ </td><td>
112
+
113
+
114
+ </td><td>
115
+
116
+ Gets the most adjacent neighbor global coordinate of this block based on a relative hit point, typically from a raycast.
117
+
118
+
85
119
  </td></tr>
86
120
  </tbody></table>
@@ -202,7 +202,7 @@ _(Optional)_ A callback function that is invoked when an entity collides with bl
202
202
 
203
203
  </td><td>
204
204
 
205
- (blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
205
+ (blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->) =&gt; void
206
206
 
207
207
 
208
208
  </td><td>
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [ContactForceData](./server.contactforcedata.md)
4
+
5
+ ## ContactForceData type
6
+
7
+ Data for contact forces.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type ContactForceData = {
13
+ totalForce: RAPIER.Vector;
14
+ totalForceMagnitude: number;
15
+ maxForceDirection: RAPIER.Vector;
16
+ maxForceMagnitude: number;
17
+ };
18
+ ```
@@ -0,0 +1,19 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [ContactManifold](./server.contactmanifold.md)
4
+
5
+ ## ContactManifold type
6
+
7
+ A contact manifold.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type ContactManifold = {
13
+ localNormalA: Vector3Like;
14
+ localNormalB: Vector3Like;
15
+ normal: Vector3Like;
16
+ };
17
+ ```
18
+ **References:** [Vector3Like](./server.vector3like.md)
19
+
@@ -402,7 +402,7 @@ _(Optional)_ A function that is called when the entity collides with a block.
402
402
 
403
403
  </td><td>
404
404
 
405
- (entity: [Entity](./server.entity.md)<!-- -->, blockType: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
405
+ (entity: [Entity](./server.entity.md)<!-- -->, blockType: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->) =&gt; void
406
406
 
407
407
 
408
408
  </td><td>
@@ -459,7 +459,7 @@ _(Optional)_ A function that is called when the entity collides with another ent
459
459
 
460
460
  </td><td>
461
461
 
462
- (entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
462
+ (entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->) =&gt; void
463
463
 
464
464
 
465
465
  </td><td>
package/docs/server.md CHANGED
@@ -472,6 +472,8 @@ Event types a PlayerCamera can emit.
472
472
 
473
473
  </td><td>
474
474
 
475
+ The mode of the camera.
476
+
475
477
 
476
478
  </td></tr>
477
479
  <tr><td>
@@ -492,7 +494,7 @@ Event types a Player can emit.
492
494
 
493
495
  </td><td>
494
496
 
495
- Event types a
497
+ Event types a PlayerUI can emit.
496
498
 
497
499
 
498
500
  </td></tr>
@@ -955,6 +957,28 @@ A set of collision groups.
955
957
  A callback function for a chat command.
956
958
 
957
959
 
960
+ </td></tr>
961
+ <tr><td>
962
+
963
+ [ContactForceData](./server.contactforcedata.md)
964
+
965
+
966
+ </td><td>
967
+
968
+ Data for contact forces.
969
+
970
+
971
+ </td></tr>
972
+ <tr><td>
973
+
974
+ [ContactManifold](./server.contactmanifold.md)
975
+
976
+
977
+ </td><td>
978
+
979
+ A contact manifold.
980
+
981
+
958
982
  </td></tr>
959
983
  <tr><td>
960
984
 
@@ -1065,6 +1089,28 @@ The input state of a Player; keys from SUPPORTED\_INPUT\_KEYS.
1065
1089
  A raw set of collision groups represented as a 32-bit number.
1066
1090
 
1067
1091
 
1092
+ </td></tr>
1093
+ <tr><td>
1094
+
1095
+ [RaycastHit](./server.raycasthit.md)
1096
+
1097
+
1098
+ </td><td>
1099
+
1100
+ A hit result from a raycast.
1101
+
1102
+
1103
+ </td></tr>
1104
+ <tr><td>
1105
+
1106
+ [RaycastOptions](./server.raycastoptions.md)
1107
+
1108
+
1109
+ </td><td>
1110
+
1111
+ Options for raycasting.
1112
+
1113
+
1068
1114
  </td></tr>
1069
1115
  <tr><td>
1070
1116
 
@@ -61,27 +61,6 @@ Description
61
61
  The camera for the player.
62
62
 
63
63
 
64
- </td></tr>
65
- <tr><td>
66
-
67
- [cameraOrientation](./server.player.cameraorientation.md)
68
-
69
-
70
- </td><td>
71
-
72
- `readonly`
73
-
74
-
75
- </td><td>
76
-
77
- Readonly&lt;[PlayerCameraOrientation](./server.playercameraorientation.md)<!-- -->&gt;
78
-
79
-
80
- </td><td>
81
-
82
- The current [PlayerCameraOrientation](./server.playercameraorientation.md) of the player.
83
-
84
-
85
64
  </td></tr>
86
65
  <tr><td>
87
66
 
@@ -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; [PlayerCamera](./server.playercamera.md) &gt; [facingDirection](./server.playercamera.facingdirection.md)
4
+
5
+ ## PlayerCamera.facingDirection property
6
+
7
+ The facing direction vector of the camera based on its current orientation.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get facingDirection(): Vector3Like;
13
+ ```
@@ -90,6 +90,27 @@ The entity the camera is attached to.
90
90
  The position the camera is attached to.
91
91
 
92
92
 
93
+ </td></tr>
94
+ <tr><td>
95
+
96
+ [facingDirection](./server.playercamera.facingdirection.md)
97
+
98
+
99
+ </td><td>
100
+
101
+ `readonly`
102
+
103
+
104
+ </td><td>
105
+
106
+ [Vector3Like](./server.vector3like.md)
107
+
108
+
109
+ </td><td>
110
+
111
+ The facing direction vector of the camera based on its current orientation.
112
+
113
+
93
114
  </td></tr>
94
115
  <tr><td>
95
116
 
@@ -216,6 +237,27 @@ The nodes of the model the camera is attached to that will not be rendered for t
216
237
  The relative offset of the camera from the entity or position it is attached to.
217
238
 
218
239
 
240
+ </td></tr>
241
+ <tr><td>
242
+
243
+ [orientation](./server.playercamera.orientation.md)
244
+
245
+
246
+ </td><td>
247
+
248
+ `readonly`
249
+
250
+
251
+ </td><td>
252
+
253
+ [PlayerCameraOrientation](./server.playercameraorientation.md)
254
+
255
+
256
+ </td><td>
257
+
258
+ The current orientation of the camera.
259
+
260
+
219
261
  </td></tr>
220
262
  <tr><td>
221
263
 
@@ -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; [PlayerCamera](./server.playercamera.md) &gt; [orientation](./server.playercamera.orientation.md)
4
+
5
+ ## PlayerCamera.orientation property
6
+
7
+ The current orientation of the camera.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get orientation(): PlayerCameraOrientation;
13
+ ```
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## PlayerCameraMode enum
6
6
 
7
+ The mode of the camera.
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## PlayerUIEventType enum
6
6
 
7
- Event types a
7
+ Event types a PlayerUI can emit.
8
8
 
9
9
  **Signature:**
10
10
 
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [RaycastHit](./server.raycasthit.md)
4
+
5
+ ## RaycastHit type
6
+
7
+ A hit result from a raycast.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type RaycastHit = {
13
+ hitBlock?: Block;
14
+ hitEntity?: Entity;
15
+ hitPoint: Vector3Like;
16
+ hitDistance: number;
17
+ };
18
+ ```
19
+ **References:** [Block](./server.block.md)<!-- -->, [Entity](./server.entity.md)<!-- -->, [Vector3Like](./server.vector3like.md)
20
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [RaycastOptions](./server.raycastoptions.md)
4
+
5
+ ## RaycastOptions type
6
+
7
+ Options for raycasting.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type RaycastOptions = {
13
+ ignoresSensors?: boolean;
14
+ filterFlags?: RAPIER.QueryFilterFlags;
15
+ filterGroups?: number;
16
+ filterExcludeCollider?: RAPIER.Collider;
17
+ filterExcludeRigidBody?: RAPIER.RigidBody;
18
+ filterPredicate?: (collider: RAPIER.Collider) => boolean;
19
+ };
20
+ ```
@@ -65,7 +65,7 @@ The handle of the second collider.
65
65
  </tbody></table>
66
66
  **Returns:**
67
67
 
68
- ContactManifold\[\]
68
+ [ContactManifold](./server.contactmanifold.md)<!-- -->\[\]
69
69
 
70
70
  The contact manifolds, or an empty array if no contact.
71
71
 
@@ -85,7 +85,7 @@ options
85
85
 
86
86
  </td><td>
87
87
 
88
- RaycastOptions
88
+ [RaycastOptions](./server.raycastoptions.md)
89
89
 
90
90
 
91
91
  </td><td>
@@ -97,7 +97,7 @@ _(Optional)_ The options for the raycast.
97
97
  </tbody></table>
98
98
  **Returns:**
99
99
 
100
- RaycastHit \| null
100
+ [RaycastHit](./server.raycasthit.md) \| null
101
101
 
102
102
  A RaycastHit object containing the first block or entity hit by the ray, or null if no hit.
103
103
 
@@ -1,4 +1,4 @@
1
- <html></html>
1
+ <html>
2
2
  <body>
3
3
  <!--
4
4
  The Hytopia-ui script MUST be included, otherwise your
@@ -39,4 +39,4 @@
39
39
  </style>
40
40
  <div class="crosshair"></div>
41
41
  </body>
42
- </html>
42
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
6
  "bin": {