hytopia 0.14.15 → 0.14.17

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/bin/scripts.js CHANGED
@@ -158,6 +158,12 @@ function init() {
158
158
  function installProjectDependencies() {
159
159
  // init project
160
160
  execSync('npm init -y --silent --loglevel silent', { stdio: ['ignore', 'ignore', 'inherit'] });
161
+
162
+ // Add various common scripts to the package.json
163
+ execSync('npm pkg set scripts.build="hytopia build"', { stdio: 'ignore' });
164
+ execSync('npm pkg set scripts.package="hytopia package"', { stdio: 'ignore' });
165
+ execSync('npm pkg set scripts.upgrade-assets-library="hytopia upgrade-assets-library"', { stdio: 'ignore' });
166
+ execSync('npm pkg set scripts.upgrade-project="hytopia upgrade-project"', { stdio: 'ignore' });
161
167
 
162
168
  // create tsconfig.json, used by build
163
169
  fs.writeFileSync('tsconfig.json', JSON.stringify({
@@ -0,0 +1,95 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [connectArrow](./client.hytopiaui.connectarrow.md)
4
+
5
+ ## HytopiaUI.connectArrow() method
6
+
7
+ Creates an arrow between two points or entities.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ connectArrow(source: number | THREE.Vector3Like, target: number | THREE.Vector3Like, options?: {
13
+ color?: {
14
+ r: number;
15
+ g: number;
16
+ b: number;
17
+ };
18
+ textureUri?: string;
19
+ }): number;
20
+ ```
21
+
22
+ ## Parameters
23
+
24
+ <table><thead><tr><th>
25
+
26
+ Parameter
27
+
28
+
29
+ </th><th>
30
+
31
+ Type
32
+
33
+
34
+ </th><th>
35
+
36
+ Description
37
+
38
+
39
+ </th></tr></thead>
40
+ <tbody><tr><td>
41
+
42
+ source
43
+
44
+
45
+ </td><td>
46
+
47
+ number \| THREE.Vector3Like
48
+
49
+
50
+ </td><td>
51
+
52
+ Source entity ID (number) or position (Vector3Like)
53
+
54
+
55
+ </td></tr>
56
+ <tr><td>
57
+
58
+ target
59
+
60
+
61
+ </td><td>
62
+
63
+ number \| THREE.Vector3Like
64
+
65
+
66
+ </td><td>
67
+
68
+ Target entity ID (number) or position (Vector3Like)
69
+
70
+
71
+ </td></tr>
72
+ <tr><td>
73
+
74
+ options
75
+
76
+
77
+ </td><td>
78
+
79
+ { color?: { r: number; g: number; b: number; }; textureUri?: string; }
80
+
81
+
82
+ </td><td>
83
+
84
+ _(Optional)_ Optional arrow properties (color, textureUrl)
85
+
86
+
87
+ </td></tr>
88
+ </tbody></table>
89
+
90
+ **Returns:**
91
+
92
+ number
93
+
94
+ The arrow ID
95
+
@@ -0,0 +1,58 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [disconnectArrow](./client.hytopiaui.disconnectarrow.md)
4
+
5
+ ## HytopiaUI.disconnectArrow() method
6
+
7
+ Removes an arrow by its ID.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ disconnectArrow(arrowId: number): void;
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
+ arrowId
36
+
37
+
38
+ </td><td>
39
+
40
+ number
41
+
42
+
43
+ </td><td>
44
+
45
+ The arrow ID to remove
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+
51
+ **Returns:**
52
+
53
+ void
54
+
55
+ ## Exceptions
56
+
57
+ Error if the arrow ID does not exist
58
+
@@ -0,0 +1,56 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [getEntityIdByName](./client.hytopiaui.getentityidbyname.md)
4
+
5
+ ## HytopiaUI.getEntityIdByName() method
6
+
7
+ Finds an entity by its name property and returns its ID. If multiple entities have the same name, returns the first one found.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getEntityIdByName(name: string): number | undefined;
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
+ name
36
+
37
+
38
+ </td><td>
39
+
40
+ string
41
+
42
+
43
+ </td><td>
44
+
45
+ The exact name to search for (case-sensitive)
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+
51
+ **Returns:**
52
+
53
+ number \| undefined
54
+
55
+ The entity ID if found, undefined otherwise
56
+
@@ -0,0 +1,19 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [getPlayerEntityId](./client.hytopiaui.getplayerentityid.md)
4
+
5
+ ## HytopiaUI.getPlayerEntityId() method
6
+
7
+ Gets the entity ID of the current player's entity. Returns undefined if the player entity is not yet initialized.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getPlayerEntityId(): number | undefined;
13
+ ```
14
+ **Returns:**
15
+
16
+ number \| undefined
17
+
18
+ The player's entity ID, or undefined if not available
19
+
@@ -162,6 +162,34 @@ Description
162
162
  </th></tr></thead>
163
163
  <tbody><tr><td>
164
164
 
165
+ [connectArrow(source, target, options)](./client.hytopiaui.connectarrow.md)
166
+
167
+
168
+ </td><td>
169
+
170
+
171
+ </td><td>
172
+
173
+ Creates an arrow between two points or entities.
174
+
175
+
176
+ </td></tr>
177
+ <tr><td>
178
+
179
+ [disconnectArrow(arrowId)](./client.hytopiaui.disconnectarrow.md)
180
+
181
+
182
+ </td><td>
183
+
184
+
185
+ </td><td>
186
+
187
+ Removes an arrow by its ID.
188
+
189
+
190
+ </td></tr>
191
+ <tr><td>
192
+
165
193
  [filterProfanity(text)](./client.hytopiaui.filterprofanity.md)
166
194
 
167
195
 
@@ -173,6 +201,34 @@ Description
173
201
  Filters inappropriate language from text by replacing profanity with asterisks. Use this to sanitize user-generated content displayed in your UI (e.g., chat messages, usernames).
174
202
 
175
203
 
204
+ </td></tr>
205
+ <tr><td>
206
+
207
+ [getEntityIdByName(name)](./client.hytopiaui.getentityidbyname.md)
208
+
209
+
210
+ </td><td>
211
+
212
+
213
+ </td><td>
214
+
215
+ Finds an entity by its name property and returns its ID. If multiple entities have the same name, returns the first one found.
216
+
217
+
218
+ </td></tr>
219
+ <tr><td>
220
+
221
+ [getPlayerEntityId()](./client.hytopiaui.getplayerentityid.md)
222
+
223
+
224
+ </td><td>
225
+
226
+
227
+ </td><td>
228
+
229
+ Gets the entity ID of the current player's entity. Returns undefined if the player entity is not yet initialized.
230
+
231
+
176
232
  </td></tr>
177
233
  <tr><td>
178
234
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.14.15",
3
+ "version": "0.14.17",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./server.mjs",