hytopia 0.14.0 → 0.14.2
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/README.md +1 -1
- package/client-docs/client.hytopiaui.camerafar.md +13 -0
- package/client-docs/client.hytopiaui.cameranear.md +13 -0
- package/client-docs/client.hytopiaui.filterprofanity.md +56 -0
- package/client-docs/client.hytopiaui.getsceneuitemplaterenderer.md +56 -0
- package/client-docs/client.hytopiaui.gltfloader.md +13 -0
- package/client-docs/client.hytopiaui.hasprofanity.md +56 -0
- package/client-docs/client.hytopiaui.hassceneuitemplaterenderer.md +56 -0
- package/client-docs/client.hytopiaui.ismobile.md +13 -0
- package/client-docs/client.hytopiaui.lockpointer.md +70 -0
- package/client-docs/client.hytopiaui.md +374 -0
- package/client-docs/client.hytopiaui.offalldata.md +17 -0
- package/client-docs/client.hytopiaui.offdata.md +54 -0
- package/client-docs/client.hytopiaui.ondata.md +54 -0
- package/client-docs/client.hytopiaui.pressinput.md +70 -0
- package/client-docs/client.hytopiaui.registersceneuitemplate.md +70 -0
- package/client-docs/client.hytopiaui.senddata.md +54 -0
- package/client-docs/client.hytopiaui.setentitycolorcorrection.md +74 -0
- package/client-docs/client.hytopiaui.setmousesensitivitymultiplier.md +54 -0
- package/client-docs/client.hytopiaui.three.md +13 -0
- package/client-docs/client.hytopiaui.unregisterloadedsceneuitemplates.md +17 -0
- package/client-docs/client.hytopiaui.unregistersceneuitemplate.md +54 -0
- package/client-docs/client.md +58 -0
- package/client-docs/client.templaterenderer.md +13 -0
- package/client-docs/index.md +30 -0
- package/package.json +1 -1
- package/server.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# HYTOPIA SDK
|
|
2
2
|
|
|
3
3
|
## Quick Links
|
|
4
|
-
[Quickstart (Start Here)](#quickstart-start-here) • [Developer Docs](https://dev.hytopia.com/) • [API Reference](./docs/server.md) • [Examples](https://github.com/hytopiagg/sdk-examples) • [Join Our Developer Discord](https://discord.gg/hytopia-developers) • [Report Bugs or Request Features](https://github.com/hytopiagg/sdk/issues)
|
|
4
|
+
[Quickstart (Start Here)](#quickstart-start-here) • [Developer Docs](https://dev.hytopia.com/) • [SDK API Reference](./docs/server.md) • [Client HytopiaUI API Reference](./client-docs/client.hytopiaui.md) • [Examples](https://github.com/hytopiagg/sdk-examples) • [Join Our Developer Discord](https://discord.gg/hytopia-developers) • [Report Bugs or Request Features](https://github.com/hytopiagg/sdk/issues)
|
|
5
5
|
|
|
6
6
|
## What is HYTOPIA?
|
|
7
7
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [cameraFar](./client.hytopiaui.camerafar.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.cameraFar property
|
|
6
|
+
|
|
7
|
+
Maximum render distance of the camera in world units. Objects beyond this distance are not rendered.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get cameraFar(): number;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [cameraNear](./client.hytopiaui.cameranear.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.cameraNear property
|
|
6
|
+
|
|
7
|
+
Minimum render distance of the camera in world units. Objects closer than this distance are not rendered.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get cameraNear(): number;
|
|
13
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [filterProfanity](./client.hytopiaui.filterprofanity.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.filterProfanity() method
|
|
6
|
+
|
|
7
|
+
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).
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
filterProfanity(text: string): string;
|
|
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
|
+
text
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
Text to filter
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
string
|
|
54
|
+
|
|
55
|
+
Filtered text with profanity replaced by asterisks
|
|
56
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [getSceneUITemplateRenderer](./client.hytopiaui.getsceneuitemplaterenderer.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.getSceneUITemplateRenderer() method
|
|
6
|
+
|
|
7
|
+
Retrieves a registered Scene UI template renderer function.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getSceneUITemplateRenderer(templateId: string): TemplateRenderer | 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
|
+
templateId
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
Template identifier to look up
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
[TemplateRenderer](./client.templaterenderer.md) \| undefined
|
|
54
|
+
|
|
55
|
+
Template renderer function if found, `undefined` otherwise
|
|
56
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [gltfLoader](./client.hytopiaui.gltfloader.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.gltfLoader property
|
|
6
|
+
|
|
7
|
+
Access to a THREE.js GLTFLoader instance for loading 3D models, useful if you want to render models in your UI.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get gltfLoader(): typeof GLTFLoader;
|
|
13
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [hasProfanity](./client.hytopiaui.hasprofanity.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.hasProfanity() method
|
|
6
|
+
|
|
7
|
+
Checks if text contains inappropriate language. Useful for validating input before sending to the server.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
hasProfanity(text: string): boolean;
|
|
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
|
+
text
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
Text to check
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
boolean
|
|
54
|
+
|
|
55
|
+
`true` if profanity is detected, `false` otherwise
|
|
56
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [hasSceneUITemplateRenderer](./client.hytopiaui.hassceneuitemplaterenderer.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.hasSceneUITemplateRenderer() method
|
|
6
|
+
|
|
7
|
+
Checks whether a Scene UI template is currently registered.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
hasSceneUITemplateRenderer(templateId: string): boolean;
|
|
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
|
+
templateId
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
Template identifier to check
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
boolean
|
|
54
|
+
|
|
55
|
+
`true` if the template is registered, `false` otherwise
|
|
56
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [isMobile](./client.hytopiaui.ismobile.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.isMobile property
|
|
6
|
+
|
|
7
|
+
Detects if the player is on a mobile device. Use this to adjust UI layout or controls, etc.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get isMobile(): boolean;
|
|
13
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [lockPointer](./client.hytopiaui.lockpointer.md)
|
|
4
|
+
|
|
5
|
+
## HytopiaUI.lockPointer() method
|
|
6
|
+
|
|
7
|
+
Controls pointer lock for your UI. When locked, the cursor is hidden and mouse movement controls the camera. Call with `true` when hiding your UI so players can control the camera, `false` when showing UI that needs cursor interaction.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
lockPointer(lock: boolean, maintainInput?: boolean): 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
|
+
lock
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
boolean
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
`true` to lock pointer and hide cursor, `false` to unlock and show cursor
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
maintainInput
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
boolean
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
_(Optional)_ When `true`<!-- -->, keyboard movement/inputs for gameplay still work while pointer is unlocked (default: `false`<!-- -->)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
|
|
67
|
+
**Returns:**
|
|
68
|
+
|
|
69
|
+
void
|
|
70
|
+
|