hytopia 0.1.60 → 0.1.62
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 +6 -4
- package/boilerplate/assets/map.json +2 -1
- package/docs/server.blocktypeoptions.customcollideroptions.md +2 -0
- package/docs/server.blocktypeoptions.id.md +2 -0
- package/docs/server.blocktypeoptions.isliquid.md +2 -0
- package/docs/server.blocktypeoptions.md +8 -2
- package/docs/server.blocktypeoptions.name.md +2 -0
- package/docs/server.blocktypeoptions.textureuri.md +2 -0
- package/docs/server.collisiongroup.md +168 -0
- package/docs/server.entity.md +35 -0
- package/docs/server.entity.opacity.md +13 -0
- package/docs/server.entity.setopacity.md +53 -0
- package/docs/server.entityeventpayload.md +9 -0
- package/docs/server.entityeventpayload.setopacity.entity.md +11 -0
- package/docs/server.entityeventpayload.setopacity.md +70 -0
- package/docs/server.entityeventpayload.setopacity.opacity.md +11 -0
- package/docs/server.entityeventtype.md +14 -0
- package/docs/server.entityoptions.md +19 -0
- package/docs/server.entityoptions.opacity.md +13 -0
- package/docs/server.playerentitycontroller.md +19 -0
- package/docs/server.playerentitycontroller.stickstoplatforms.md +13 -0
- package/docs/server.playerentitycontrolleroptions.md +19 -0
- package/docs/server.playerentitycontrolleroptions.stickstoplatforms.md +13 -0
- package/examples/big-world/package.json +3 -2
- package/examples/block-entity/package.json +3 -2
- package/examples/custom-ui/package.json +3 -2
- package/examples/entity-controller/package.json +3 -2
- package/examples/entity-spawn/package.json +3 -2
- package/examples/payload-game/package.json +3 -2
- package/examples/wall-dodge-game/assets/map.json +3995 -0
- package/examples/wall-dodge-game/assets/textures/water.png +0 -0
- package/examples/wall-dodge-game/assets/ui/index.html +249 -0
- package/examples/wall-dodge-game/index.ts +336 -0
- package/examples/wall-dodge-game/package.json +16 -0
- package/package.json +1 -1
- package/server.api.json +512 -5
- package/server.d.ts +48 -12
- package/server.js +71 -71
package/bin/scripts.js
CHANGED
@@ -30,10 +30,6 @@ const path = require('path');
|
|
30
30
|
// Initialize project with latest HYTOPIA SDK
|
31
31
|
console.log('🔧 Initializing project with latest HYTOPIA SDK...');
|
32
32
|
|
33
|
-
execSync('bun init --yes');
|
34
|
-
execSync('bun add hytopia@latest');
|
35
|
-
execSync('bun add @hytopia.com/assets');
|
36
|
-
|
37
33
|
if (flags.template) {
|
38
34
|
// Init from example template
|
39
35
|
console.log(`🖨️ Initializing project with examples template "${flags.template}"...`);
|
@@ -46,7 +42,13 @@ const path = require('path');
|
|
46
42
|
}
|
47
43
|
|
48
44
|
fs.cpSync(templateDir, destDir, { recursive: true });
|
45
|
+
|
46
|
+
execSync('bun install');
|
49
47
|
} else {
|
48
|
+
execSync('bun init --yes');
|
49
|
+
execSync('bun add hytopia@latest');
|
50
|
+
execSync('bun add @hytopia.com/assets');
|
51
|
+
|
50
52
|
// Init from boilerplate
|
51
53
|
console.log('🧑💻 Initializing project with boilerplate...');
|
52
54
|
|
@@ -50,7 +50,7 @@ Description
|
|
50
50
|
|
51
51
|
</td><td>
|
52
52
|
|
53
|
-
_(Optional)_
|
53
|
+
_(Optional)_ The custom collider options for the block type.
|
54
54
|
|
55
55
|
|
56
56
|
</td></tr>
|
@@ -69,6 +69,8 @@ number
|
|
69
69
|
|
70
70
|
</td><td>
|
71
71
|
|
72
|
+
The unique numeric identifier for the block type.
|
73
|
+
|
72
74
|
|
73
75
|
</td></tr>
|
74
76
|
<tr><td>
|
@@ -86,7 +88,7 @@ boolean
|
|
86
88
|
|
87
89
|
</td><td>
|
88
90
|
|
89
|
-
_(Optional)_
|
91
|
+
_(Optional)_ Whether the block type is a liquid.
|
90
92
|
|
91
93
|
|
92
94
|
</td></tr>
|
@@ -105,6 +107,8 @@ string
|
|
105
107
|
|
106
108
|
</td><td>
|
107
109
|
|
110
|
+
The name of the block type.
|
111
|
+
|
108
112
|
|
109
113
|
</td></tr>
|
110
114
|
<tr><td>
|
@@ -122,6 +126,8 @@ string
|
|
122
126
|
|
123
127
|
</td><td>
|
124
128
|
|
129
|
+
The URI of the texture asset for the block type.
|
130
|
+
|
125
131
|
|
126
132
|
</td></tr>
|
127
133
|
</tbody></table>
|
@@ -85,6 +85,174 @@ ENTITY\_SENSOR
|
|
85
85
|
</td><td>
|
86
86
|
|
87
87
|
|
88
|
+
</td></tr>
|
89
|
+
<tr><td>
|
90
|
+
|
91
|
+
GROUP\_1
|
92
|
+
|
93
|
+
|
94
|
+
</td><td>
|
95
|
+
|
96
|
+
`16`
|
97
|
+
|
98
|
+
|
99
|
+
</td><td>
|
100
|
+
|
101
|
+
|
102
|
+
</td></tr>
|
103
|
+
<tr><td>
|
104
|
+
|
105
|
+
GROUP\_10
|
106
|
+
|
107
|
+
|
108
|
+
</td><td>
|
109
|
+
|
110
|
+
`8192`
|
111
|
+
|
112
|
+
|
113
|
+
</td><td>
|
114
|
+
|
115
|
+
|
116
|
+
</td></tr>
|
117
|
+
<tr><td>
|
118
|
+
|
119
|
+
GROUP\_11
|
120
|
+
|
121
|
+
|
122
|
+
</td><td>
|
123
|
+
|
124
|
+
`16384`
|
125
|
+
|
126
|
+
|
127
|
+
</td><td>
|
128
|
+
|
129
|
+
|
130
|
+
</td></tr>
|
131
|
+
<tr><td>
|
132
|
+
|
133
|
+
GROUP\_12
|
134
|
+
|
135
|
+
|
136
|
+
</td><td>
|
137
|
+
|
138
|
+
`32768`
|
139
|
+
|
140
|
+
|
141
|
+
</td><td>
|
142
|
+
|
143
|
+
|
144
|
+
</td></tr>
|
145
|
+
<tr><td>
|
146
|
+
|
147
|
+
GROUP\_2
|
148
|
+
|
149
|
+
|
150
|
+
</td><td>
|
151
|
+
|
152
|
+
`32`
|
153
|
+
|
154
|
+
|
155
|
+
</td><td>
|
156
|
+
|
157
|
+
|
158
|
+
</td></tr>
|
159
|
+
<tr><td>
|
160
|
+
|
161
|
+
GROUP\_3
|
162
|
+
|
163
|
+
|
164
|
+
</td><td>
|
165
|
+
|
166
|
+
`64`
|
167
|
+
|
168
|
+
|
169
|
+
</td><td>
|
170
|
+
|
171
|
+
|
172
|
+
</td></tr>
|
173
|
+
<tr><td>
|
174
|
+
|
175
|
+
GROUP\_4
|
176
|
+
|
177
|
+
|
178
|
+
</td><td>
|
179
|
+
|
180
|
+
`128`
|
181
|
+
|
182
|
+
|
183
|
+
</td><td>
|
184
|
+
|
185
|
+
|
186
|
+
</td></tr>
|
187
|
+
<tr><td>
|
188
|
+
|
189
|
+
GROUP\_5
|
190
|
+
|
191
|
+
|
192
|
+
</td><td>
|
193
|
+
|
194
|
+
`256`
|
195
|
+
|
196
|
+
|
197
|
+
</td><td>
|
198
|
+
|
199
|
+
|
200
|
+
</td></tr>
|
201
|
+
<tr><td>
|
202
|
+
|
203
|
+
GROUP\_6
|
204
|
+
|
205
|
+
|
206
|
+
</td><td>
|
207
|
+
|
208
|
+
`512`
|
209
|
+
|
210
|
+
|
211
|
+
</td><td>
|
212
|
+
|
213
|
+
|
214
|
+
</td></tr>
|
215
|
+
<tr><td>
|
216
|
+
|
217
|
+
GROUP\_7
|
218
|
+
|
219
|
+
|
220
|
+
</td><td>
|
221
|
+
|
222
|
+
`1024`
|
223
|
+
|
224
|
+
|
225
|
+
</td><td>
|
226
|
+
|
227
|
+
|
228
|
+
</td></tr>
|
229
|
+
<tr><td>
|
230
|
+
|
231
|
+
GROUP\_8
|
232
|
+
|
233
|
+
|
234
|
+
</td><td>
|
235
|
+
|
236
|
+
`2048`
|
237
|
+
|
238
|
+
|
239
|
+
</td><td>
|
240
|
+
|
241
|
+
|
242
|
+
</td></tr>
|
243
|
+
<tr><td>
|
244
|
+
|
245
|
+
GROUP\_9
|
246
|
+
|
247
|
+
|
248
|
+
</td><td>
|
249
|
+
|
250
|
+
`4096`
|
251
|
+
|
252
|
+
|
253
|
+
</td><td>
|
254
|
+
|
255
|
+
|
88
256
|
</td></tr>
|
89
257
|
<tr><td>
|
90
258
|
|
package/docs/server.entity.md
CHANGED
@@ -507,6 +507,27 @@ _(Optional)_ A function that is called when the entity is spawned.
|
|
507
507
|
_(Optional)_ A function that is called every tick.
|
508
508
|
|
509
509
|
|
510
|
+
</td></tr>
|
511
|
+
<tr><td>
|
512
|
+
|
513
|
+
[opacity](./server.entity.opacity.md)
|
514
|
+
|
515
|
+
|
516
|
+
</td><td>
|
517
|
+
|
518
|
+
`readonly`
|
519
|
+
|
520
|
+
|
521
|
+
</td><td>
|
522
|
+
|
523
|
+
number \| undefined
|
524
|
+
|
525
|
+
|
526
|
+
</td><td>
|
527
|
+
|
528
|
+
The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
|
529
|
+
|
530
|
+
|
510
531
|
</td></tr>
|
511
532
|
<tr><td>
|
512
533
|
|
@@ -646,6 +667,20 @@ Sets the playback rate of all animations on the entity's model.
|
|
646
667
|
Sets the nodes to hide on the entity's model. Matched nodes will be hidden for all players. Uses case insensitive substring matching.
|
647
668
|
|
648
669
|
|
670
|
+
</td></tr>
|
671
|
+
<tr><td>
|
672
|
+
|
673
|
+
[setOpacity(opacity)](./server.entity.setopacity.md)
|
674
|
+
|
675
|
+
|
676
|
+
</td><td>
|
677
|
+
|
678
|
+
|
679
|
+
</td><td>
|
680
|
+
|
681
|
+
Sets the opacity of the entity.
|
682
|
+
|
683
|
+
|
649
684
|
</td></tr>
|
650
685
|
<tr><td>
|
651
686
|
|
@@ -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) > [Entity](./server.entity.md) > [opacity](./server.entity.opacity.md)
|
4
|
+
|
5
|
+
## Entity.opacity property
|
6
|
+
|
7
|
+
The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get opacity(): number | undefined;
|
13
|
+
```
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Entity](./server.entity.md) > [setOpacity](./server.entity.setopacity.md)
|
4
|
+
|
5
|
+
## Entity.setOpacity() method
|
6
|
+
|
7
|
+
Sets the opacity of the entity.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setOpacity(opacity: 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
|
+
opacity
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [EntityEventPayload](./server.entityeventpayload.md) > [SetOpacity](./server.entityeventpayload.setopacity.md) > [entity](./server.entityeventpayload.setopacity.entity.md)
|
4
|
+
|
5
|
+
## EntityEventPayload.SetOpacity.entity property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
entity: Entity;
|
11
|
+
```
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [EntityEventPayload](./server.entityeventpayload.md) > [SetOpacity](./server.entityeventpayload.setopacity.md)
|
4
|
+
|
5
|
+
## EntityEventPayload.SetOpacity interface
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
interface SetOpacity
|
11
|
+
```
|
12
|
+
|
13
|
+
## Properties
|
14
|
+
|
15
|
+
<table><thead><tr><th>
|
16
|
+
|
17
|
+
Property
|
18
|
+
|
19
|
+
|
20
|
+
</th><th>
|
21
|
+
|
22
|
+
Modifiers
|
23
|
+
|
24
|
+
|
25
|
+
</th><th>
|
26
|
+
|
27
|
+
Type
|
28
|
+
|
29
|
+
|
30
|
+
</th><th>
|
31
|
+
|
32
|
+
Description
|
33
|
+
|
34
|
+
|
35
|
+
</th></tr></thead>
|
36
|
+
<tbody><tr><td>
|
37
|
+
|
38
|
+
[entity](./server.entityeventpayload.setopacity.entity.md)
|
39
|
+
|
40
|
+
|
41
|
+
</td><td>
|
42
|
+
|
43
|
+
|
44
|
+
</td><td>
|
45
|
+
|
46
|
+
[Entity](./server.entity.md)
|
47
|
+
|
48
|
+
|
49
|
+
</td><td>
|
50
|
+
|
51
|
+
|
52
|
+
</td></tr>
|
53
|
+
<tr><td>
|
54
|
+
|
55
|
+
[opacity](./server.entityeventpayload.setopacity.opacity.md)
|
56
|
+
|
57
|
+
|
58
|
+
</td><td>
|
59
|
+
|
60
|
+
|
61
|
+
</td><td>
|
62
|
+
|
63
|
+
number
|
64
|
+
|
65
|
+
|
66
|
+
</td><td>
|
67
|
+
|
68
|
+
|
69
|
+
</td></tr>
|
70
|
+
</tbody></table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [EntityEventPayload](./server.entityeventpayload.md) > [SetOpacity](./server.entityeventpayload.setopacity.md) > [opacity](./server.entityeventpayload.setopacity.opacity.md)
|
4
|
+
|
5
|
+
## EntityEventPayload.SetOpacity.opacity property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
opacity: number;
|
11
|
+
```
|
@@ -205,6 +205,25 @@ string
|
|
205
205
|
_(Optional)_ The name of the entity.
|
206
206
|
|
207
207
|
|
208
|
+
</td></tr>
|
209
|
+
<tr><td>
|
210
|
+
|
211
|
+
[opacity?](./server.entityoptions.opacity.md)
|
212
|
+
|
213
|
+
|
214
|
+
</td><td>
|
215
|
+
|
216
|
+
|
217
|
+
</td><td>
|
218
|
+
|
219
|
+
number
|
220
|
+
|
221
|
+
|
222
|
+
</td><td>
|
223
|
+
|
224
|
+
_(Optional)_ The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
|
225
|
+
|
226
|
+
|
208
227
|
</td></tr>
|
209
228
|
<tr><td>
|
210
229
|
|
@@ -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) > [EntityOptions](./server.entityoptions.md) > [opacity](./server.entityoptions.opacity.md)
|
4
|
+
|
5
|
+
## EntityOptions.opacity property
|
6
|
+
|
7
|
+
The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
opacity?: number;
|
13
|
+
```
|
@@ -246,6 +246,25 @@ number
|
|
246
246
|
The normalized horizontal velocity applied to the entity when it runs.
|
247
247
|
|
248
248
|
|
249
|
+
</td></tr>
|
250
|
+
<tr><td>
|
251
|
+
|
252
|
+
[sticksToPlatforms](./server.playerentitycontroller.stickstoplatforms.md)
|
253
|
+
|
254
|
+
|
255
|
+
</td><td>
|
256
|
+
|
257
|
+
|
258
|
+
</td><td>
|
259
|
+
|
260
|
+
boolean
|
261
|
+
|
262
|
+
|
263
|
+
</td><td>
|
264
|
+
|
265
|
+
Whether the entity sticks to platforms.
|
266
|
+
|
267
|
+
|
249
268
|
</td></tr>
|
250
269
|
<tr><td>
|
251
270
|
|
@@ -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) > [PlayerEntityController](./server.playerentitycontroller.md) > [sticksToPlatforms](./server.playerentitycontroller.stickstoplatforms.md)
|
4
|
+
|
5
|
+
## PlayerEntityController.sticksToPlatforms property
|
6
|
+
|
7
|
+
Whether the entity sticks to platforms.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
sticksToPlatforms: boolean;
|
13
|
+
```
|
@@ -129,6 +129,25 @@ number
|
|
129
129
|
_(Optional)_ The normalized horizontal velocity applied to the entity when it runs.
|
130
130
|
|
131
131
|
|
132
|
+
</td></tr>
|
133
|
+
<tr><td>
|
134
|
+
|
135
|
+
[sticksToPlatforms?](./server.playerentitycontrolleroptions.stickstoplatforms.md)
|
136
|
+
|
137
|
+
|
138
|
+
</td><td>
|
139
|
+
|
140
|
+
|
141
|
+
</td><td>
|
142
|
+
|
143
|
+
boolean
|
144
|
+
|
145
|
+
|
146
|
+
</td><td>
|
147
|
+
|
148
|
+
_(Optional)_ Whether the entity sticks to platforms, defaults to true.
|
149
|
+
|
150
|
+
|
132
151
|
</td></tr>
|
133
152
|
<tr><td>
|
134
153
|
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [sticksToPlatforms](./server.playerentitycontrolleroptions.stickstoplatforms.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.sticksToPlatforms property
|
6
|
+
|
7
|
+
Whether the entity sticks to platforms, defaults to true.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
sticksToPlatforms?: boolean;
|
13
|
+
```
|