hytopia 0.3.27 → 0.3.29
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.audio.cutoffdistance.md +13 -0
- package/docs/server.audio.md +35 -0
- package/docs/server.audio.setcutoffdistance.md +57 -0
- package/docs/server.audio.setreferencedistance.md +4 -0
- package/docs/server.audioevent.md +14 -0
- package/docs/server.audioeventpayloads._audio.set_cutoff_distance_.md +16 -0
- package/docs/server.audioeventpayloads.md +19 -0
- package/docs/server.audiooptions.cutoffdistance.md +13 -0
- package/docs/server.audiooptions.md +20 -1
- package/docs/server.audiooptions.referencedistance.md +1 -1
- package/examples/hygrounds/assets/icons/ranks/bronze-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/unranked.png +0 -0
- package/examples/hygrounds/assets/ui/index.html +305 -44
- package/examples/hygrounds/classes/ChestEntity.ts +1 -0
- package/examples/hygrounds/classes/GameManager.ts +17 -7
- package/examples/hygrounds/classes/GamePlayerEntity.ts +103 -3
- package/examples/hygrounds/classes/GunEntity.ts +3 -0
- package/examples/hygrounds/classes/ItemEntity.ts +1 -0
- package/examples/hygrounds/classes/MeleeWeaponEntity.ts +2 -0
- package/examples/hygrounds/classes/weapons/PistolEntity.ts +1 -1
- package/examples/hygrounds/classes/weapons/RocketLauncherEntity.ts +2 -1
- package/examples/hygrounds/dev/persistence/player-player-1.json +3 -0
- package/examples/hygrounds/dev/persistence/player-player-2.json +3 -0
- package/examples/hygrounds/dev/persistence/player-player-3.json +3 -0
- package/examples/hygrounds/gameConfig.ts +281 -21
- package/package.json +1 -1
- package/server.api.json +173 -2
- package/server.d.ts +33 -1
- package/server.js +114 -114
@@ -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) > [Audio](./server.audio.md) > [cutoffDistance](./server.audio.cutoffdistance.md)
|
4
|
+
|
5
|
+
## Audio.cutoffDistance property
|
6
|
+
|
7
|
+
The cutoff distance where the audio will be reduced to 0 volume.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get cutoffDistance(): number;
|
13
|
+
```
|
package/docs/server.audio.md
CHANGED
@@ -111,6 +111,27 @@ Description
|
|
111
111
|
The entity to which the audio is attached if explicitly set.
|
112
112
|
|
113
113
|
|
114
|
+
</td></tr>
|
115
|
+
<tr><td>
|
116
|
+
|
117
|
+
[cutoffDistance](./server.audio.cutoffdistance.md)
|
118
|
+
|
119
|
+
|
120
|
+
</td><td>
|
121
|
+
|
122
|
+
`readonly`
|
123
|
+
|
124
|
+
|
125
|
+
</td><td>
|
126
|
+
|
127
|
+
number
|
128
|
+
|
129
|
+
|
130
|
+
</td><td>
|
131
|
+
|
132
|
+
The cutoff distance where the audio will be reduced to 0 volume.
|
133
|
+
|
134
|
+
|
114
135
|
</td></tr>
|
115
136
|
<tr><td>
|
116
137
|
|
@@ -509,6 +530,20 @@ Plays or resumes the audio.
|
|
509
530
|
Sets the entity to which the audio is attached, following its position.
|
510
531
|
|
511
532
|
|
533
|
+
</td></tr>
|
534
|
+
<tr><td>
|
535
|
+
|
536
|
+
[setCutoffDistance(cutoffDistance)](./server.audio.setcutoffdistance.md)
|
537
|
+
|
538
|
+
|
539
|
+
</td><td>
|
540
|
+
|
541
|
+
|
542
|
+
</td><td>
|
543
|
+
|
544
|
+
Sets the cutoff distance of the audio.
|
545
|
+
|
546
|
+
|
512
547
|
</td></tr>
|
513
548
|
<tr><td>
|
514
549
|
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Audio](./server.audio.md) > [setCutoffDistance](./server.audio.setcutoffdistance.md)
|
4
|
+
|
5
|
+
## Audio.setCutoffDistance() method
|
6
|
+
|
7
|
+
Sets the cutoff distance of the audio.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setCutoffDistance(cutoffDistance: 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
|
+
cutoffDistance
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The cutoff distance.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
54
|
+
## Remarks
|
55
|
+
|
56
|
+
The cutoff distance defines the maximum range at which the audio can be heard. Beyond this distance, the audio volume becomes zero. As the listener moves from the reference distance toward the cutoff distance, the volume decreases linearly, providing a natural spatial audio experience with smooth volume falloff based on distance.
|
57
|
+
|
@@ -51,3 +51,7 @@ The reference distance.
|
|
51
51
|
|
52
52
|
void
|
53
53
|
|
54
|
+
## Remarks
|
55
|
+
|
56
|
+
The reference distance defines the range within which the audio plays at full volume. When a listener is within this distance from the audio source, they will hear the sound at its maximum volume. Beyond this distance, the volume decreases linearly until reaching the cutoff distance, where the sound becomes inaudible. This creates a natural spatial audio experience with smooth volume falloff based on distance.
|
57
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [AudioEventPayloads](./server.audioeventpayloads.md) > ["AUDIO.SET\_CUTOFF\_DISTANCE"](./server.audioeventpayloads._audio.set_cutoff_distance_.md)
|
4
|
+
|
5
|
+
## AudioEventPayloads."AUDIO.SET\_CUTOFF\_DISTANCE" property
|
6
|
+
|
7
|
+
Emitted when the audio's cutoff distance is set.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
[AudioEvent.SET_CUTOFF_DISTANCE]: {
|
13
|
+
audio: Audio;
|
14
|
+
cutoffDistance: number;
|
15
|
+
};
|
16
|
+
```
|
@@ -110,6 +110,25 @@ Emitted when the audio is played.
|
|
110
110
|
Emitted when the audio is attached to an entity.
|
111
111
|
|
112
112
|
|
113
|
+
</td></tr>
|
114
|
+
<tr><td>
|
115
|
+
|
116
|
+
["AUDIO.SET\_CUTOFF\_DISTANCE"](./server.audioeventpayloads._audio.set_cutoff_distance_.md)
|
117
|
+
|
118
|
+
|
119
|
+
</td><td>
|
120
|
+
|
121
|
+
|
122
|
+
</td><td>
|
123
|
+
|
124
|
+
{ audio: [Audio](./server.audio.md)<!-- -->; cutoffDistance: number; }
|
125
|
+
|
126
|
+
|
127
|
+
</td><td>
|
128
|
+
|
129
|
+
Emitted when the audio's cutoff distance is set.
|
130
|
+
|
131
|
+
|
113
132
|
</td></tr>
|
114
133
|
<tr><td>
|
115
134
|
|
@@ -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) > [AudioOptions](./server.audiooptions.md) > [cutoffDistance](./server.audiooptions.cutoffdistance.md)
|
4
|
+
|
5
|
+
## AudioOptions.cutoffDistance property
|
6
|
+
|
7
|
+
The cutoff distance between the audio source and the listener where the audio will be reduced to 0 volume. Must be greater than reference distance. Defaults to reference distance + 10.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
cutoffDistance?: number;
|
13
|
+
```
|
@@ -53,6 +53,25 @@ Description
|
|
53
53
|
_(Optional)_ If set, audio playback will follow the entity's position.
|
54
54
|
|
55
55
|
|
56
|
+
</td></tr>
|
57
|
+
<tr><td>
|
58
|
+
|
59
|
+
[cutoffDistance?](./server.audiooptions.cutoffdistance.md)
|
60
|
+
|
61
|
+
|
62
|
+
</td><td>
|
63
|
+
|
64
|
+
|
65
|
+
</td><td>
|
66
|
+
|
67
|
+
number
|
68
|
+
|
69
|
+
|
70
|
+
</td><td>
|
71
|
+
|
72
|
+
_(Optional)_ The cutoff distance between the audio source and the listener where the audio will be reduced to 0 volume. Must be greater than reference distance. Defaults to reference distance + 10.
|
73
|
+
|
74
|
+
|
56
75
|
</td></tr>
|
57
76
|
<tr><td>
|
58
77
|
|
@@ -202,7 +221,7 @@ number
|
|
202
221
|
|
203
222
|
</td><td>
|
204
223
|
|
205
|
-
_(Optional)_ The reference distance
|
224
|
+
_(Optional)_ The maximum reference distance between the audio source and the listener where the audio will still be max volume. Defaults to 10.
|
206
225
|
|
207
226
|
|
208
227
|
</td></tr>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
## AudioOptions.referenceDistance property
|
6
6
|
|
7
|
-
The reference distance
|
7
|
+
The maximum reference distance between the audio source and the listener where the audio will still be max volume. Defaults to 10.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|