hytopia 0.1.20 → 0.1.21
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/boilerplate/assets/certs/README.md +2 -3
- package/boilerplate/index.ts +0 -11
- package/docs/server.hytopia.webserver.md +0 -33
- package/docs/server.webserver.md +0 -33
- package/examples/character-controller/assets/certs/README.md +2 -3
- package/examples/character-controller/index.ts +0 -1
- package/examples/entity-spawn/assets/certs/README.md +2 -3
- package/examples/entity-spawn/index.ts +0 -2
- package/examples/payload-game/assets/certs/README.md +2 -3
- package/examples/payload-game/index.ts +0 -5
- package/package.json +1 -1
- package/server.api.json +2 -66
- package/server.d.ts +0 -10
- package/server.js +57 -57
- package/docs/server.hytopia.webserver.enablelocalssl.md +0 -17
- package/docs/server.webserver.enablelocalssl.md +0 -17
@@ -1,7 +1,6 @@
|
|
1
1
|
For local development self-signed certs are stored here.
|
2
|
-
The server
|
3
|
-
|
4
|
-
assets/certs/localhost.cert and use those for SSL.
|
2
|
+
The server will look for assets/certs/localhost.key and
|
3
|
+
assets/certs/localhost.cert and use those for localhost SSL.
|
5
4
|
|
6
5
|
We use these self-signed certs to allow https://localhost
|
7
6
|
& wss://localhost support. Without this, play.hytopia.com
|
package/boilerplate/index.ts
CHANGED
@@ -42,17 +42,6 @@ import worldMap from './assets/map.json';
|
|
42
42
|
*/
|
43
43
|
|
44
44
|
startServer(world => {
|
45
|
-
/**
|
46
|
-
* Enable SSL for local development. This allows you to
|
47
|
-
* connect to your local game server from https://play.hytopia.com
|
48
|
-
* without having to manually set up SSL.
|
49
|
-
*
|
50
|
-
* If you are using a reverse proxy like ngrok (IE, `ngrok http 8080`)
|
51
|
-
* so others can connect to your local game server via the ngrok
|
52
|
-
* provided URL, make sure to remove this or comment it out.
|
53
|
-
*/
|
54
|
-
GameServer.instance.webServer.enableLocalSSL();
|
55
|
-
|
56
45
|
/**
|
57
46
|
* Enable debug rendering of the physics simulation.
|
58
47
|
* This will overlay lines in-game representing colliders,
|
@@ -19,36 +19,3 @@ This class is used as a singleton and should be accessed via the GameServer.webS
|
|
19
19
|
|
20
20
|
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `WebServer` class.
|
21
21
|
|
22
|
-
## Methods
|
23
|
-
|
24
|
-
<table><thead><tr><th>
|
25
|
-
|
26
|
-
Method
|
27
|
-
|
28
|
-
|
29
|
-
</th><th>
|
30
|
-
|
31
|
-
Modifiers
|
32
|
-
|
33
|
-
|
34
|
-
</th><th>
|
35
|
-
|
36
|
-
Description
|
37
|
-
|
38
|
-
|
39
|
-
</th></tr></thead>
|
40
|
-
<tbody><tr><td>
|
41
|
-
|
42
|
-
[enableLocalSSL()](./server.hytopia.webserver.enablelocalssl.md)
|
43
|
-
|
44
|
-
|
45
|
-
</td><td>
|
46
|
-
|
47
|
-
|
48
|
-
</td><td>
|
49
|
-
|
50
|
-
Enables SSL for local development. The server will be available at https://localhost:8080. This is intended for local development without a reverse proxy. Don't use it when using tunnels like ngrok.com that already handle SSL. Usage of this method will be ignored in production. Must be called in init function of [startServer()](./server.startserver.md)<!-- -->.
|
51
|
-
|
52
|
-
|
53
|
-
</td></tr>
|
54
|
-
</tbody></table>
|
package/docs/server.webserver.md
CHANGED
@@ -19,36 +19,3 @@ This class is used as a singleton and should be accessed via the GameServer.webS
|
|
19
19
|
|
20
20
|
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `WebServer` class.
|
21
21
|
|
22
|
-
## Methods
|
23
|
-
|
24
|
-
<table><thead><tr><th>
|
25
|
-
|
26
|
-
Method
|
27
|
-
|
28
|
-
|
29
|
-
</th><th>
|
30
|
-
|
31
|
-
Modifiers
|
32
|
-
|
33
|
-
|
34
|
-
</th><th>
|
35
|
-
|
36
|
-
Description
|
37
|
-
|
38
|
-
|
39
|
-
</th></tr></thead>
|
40
|
-
<tbody><tr><td>
|
41
|
-
|
42
|
-
[enableLocalSSL()](./server.webserver.enablelocalssl.md)
|
43
|
-
|
44
|
-
|
45
|
-
</td><td>
|
46
|
-
|
47
|
-
|
48
|
-
</td><td>
|
49
|
-
|
50
|
-
Enables SSL for local development. The server will be available at https://localhost:8080. This is intended for local development without a reverse proxy. Don't use it when using tunnels like ngrok.com that already handle SSL. Usage of this method will be ignored in production. Must be called in init function of [startServer()](./server.startserver.md)<!-- -->.
|
51
|
-
|
52
|
-
|
53
|
-
</td></tr>
|
54
|
-
</tbody></table>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
For local development self-signed certs are stored here.
|
2
|
-
The server
|
3
|
-
|
4
|
-
assets/certs/localhost.cert and use those for SSL.
|
2
|
+
The server will look for assets/certs/localhost.key and
|
3
|
+
assets/certs/localhost.cert and use those for localhost SSL.
|
5
4
|
|
6
5
|
We use these self-signed certs to allow https://localhost
|
7
6
|
& wss://localhost support. Without this, play.hytopia.com
|
@@ -1,7 +1,6 @@
|
|
1
1
|
For local development self-signed certs are stored here.
|
2
|
-
The server
|
3
|
-
|
4
|
-
assets/certs/localhost.cert and use those for SSL.
|
2
|
+
The server will look for assets/certs/localhost.key and
|
3
|
+
assets/certs/localhost.cert and use those for localhost SSL.
|
5
4
|
|
6
5
|
We use these self-signed certs to allow https://localhost
|
7
6
|
& wss://localhost support. Without this, play.hytopia.com
|
@@ -1,7 +1,6 @@
|
|
1
1
|
For local development self-signed certs are stored here.
|
2
|
-
The server
|
3
|
-
|
4
|
-
assets/certs/localhost.cert and use those for SSL.
|
2
|
+
The server will look for assets/certs/localhost.key and
|
3
|
+
assets/certs/localhost.cert and use those for localhost SSL.
|
5
4
|
|
6
5
|
We use these self-signed certs to allow https://localhost
|
7
6
|
& wss://localhost support. Without this, play.hytopia.com
|
@@ -89,11 +89,6 @@ let targetWaypointCoordinateIndex = 0; // Current waypoint coordinate index for
|
|
89
89
|
startServer(world => { // Perform our game setup logic in the startServer init callback here.
|
90
90
|
const chatManager = world.chatManager;
|
91
91
|
|
92
|
-
// Enable local ssl, so we can connect to https://localhost:8080 from play.hytopia.com for testing
|
93
|
-
// If using NGROK or a reverse proxy that handles SSL, you need to comment this out to be able to
|
94
|
-
// connect to the server from the client using the reverse proxy URL.
|
95
|
-
GameServer.instance.webServer.enableLocalSSL();
|
96
|
-
|
97
92
|
// Load Map
|
98
93
|
world.loadMap(map);
|
99
94
|
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -28702,39 +28702,7 @@
|
|
28702
28702
|
"isAbstract": false,
|
28703
28703
|
"name": "WebServer",
|
28704
28704
|
"preserveMemberOrder": false,
|
28705
|
-
"members": [
|
28706
|
-
{
|
28707
|
-
"kind": "Method",
|
28708
|
-
"canonicalReference": "server!HYTOPIA.WebServer#enableLocalSSL:member(1)",
|
28709
|
-
"docComment": "/**\n * Enables SSL for local development. The server will be available at https://localhost:8080. This is intended for local development without a reverse proxy. Don't use it when using tunnels like ngrok.com that already handle SSL. Usage of this method will be ignored in production. Must be called in init function of {@link startServer}.\n */\n",
|
28710
|
-
"excerptTokens": [
|
28711
|
-
{
|
28712
|
-
"kind": "Content",
|
28713
|
-
"text": "enableLocalSSL(): "
|
28714
|
-
},
|
28715
|
-
{
|
28716
|
-
"kind": "Content",
|
28717
|
-
"text": "void"
|
28718
|
-
},
|
28719
|
-
{
|
28720
|
-
"kind": "Content",
|
28721
|
-
"text": ";"
|
28722
|
-
}
|
28723
|
-
],
|
28724
|
-
"isStatic": false,
|
28725
|
-
"returnTypeTokenRange": {
|
28726
|
-
"startIndex": 1,
|
28727
|
-
"endIndex": 2
|
28728
|
-
},
|
28729
|
-
"releaseTag": "Public",
|
28730
|
-
"isProtected": false,
|
28731
|
-
"overloadIndex": 1,
|
28732
|
-
"parameters": [],
|
28733
|
-
"isOptional": false,
|
28734
|
-
"isAbstract": false,
|
28735
|
-
"name": "enableLocalSSL"
|
28736
|
-
}
|
28737
|
-
],
|
28705
|
+
"members": [],
|
28738
28706
|
"implementsTokenRanges": [
|
28739
28707
|
{
|
28740
28708
|
"startIndex": 1,
|
@@ -35526,39 +35494,7 @@
|
|
35526
35494
|
"isAbstract": false,
|
35527
35495
|
"name": "WebServer",
|
35528
35496
|
"preserveMemberOrder": false,
|
35529
|
-
"members": [
|
35530
|
-
{
|
35531
|
-
"kind": "Method",
|
35532
|
-
"canonicalReference": "server!WebServer#enableLocalSSL:member(1)",
|
35533
|
-
"docComment": "/**\n * Enables SSL for local development. The server will be available at https://localhost:8080. This is intended for local development without a reverse proxy. Don't use it when using tunnels like ngrok.com that already handle SSL. Usage of this method will be ignored in production. Must be called in init function of {@link startServer}.\n */\n",
|
35534
|
-
"excerptTokens": [
|
35535
|
-
{
|
35536
|
-
"kind": "Content",
|
35537
|
-
"text": "enableLocalSSL(): "
|
35538
|
-
},
|
35539
|
-
{
|
35540
|
-
"kind": "Content",
|
35541
|
-
"text": "void"
|
35542
|
-
},
|
35543
|
-
{
|
35544
|
-
"kind": "Content",
|
35545
|
-
"text": ";"
|
35546
|
-
}
|
35547
|
-
],
|
35548
|
-
"isStatic": false,
|
35549
|
-
"returnTypeTokenRange": {
|
35550
|
-
"startIndex": 1,
|
35551
|
-
"endIndex": 2
|
35552
|
-
},
|
35553
|
-
"releaseTag": "Public",
|
35554
|
-
"isProtected": false,
|
35555
|
-
"overloadIndex": 1,
|
35556
|
-
"parameters": [],
|
35557
|
-
"isOptional": false,
|
35558
|
-
"isAbstract": false,
|
35559
|
-
"name": "enableLocalSSL"
|
35560
|
-
}
|
35561
|
-
],
|
35497
|
+
"members": [],
|
35562
35498
|
"implementsTokenRanges": [
|
35563
35499
|
{
|
35564
35500
|
"startIndex": 1,
|
package/server.d.ts
CHANGED
@@ -2401,16 +2401,6 @@ export declare class WebServer implements Readyable {
|
|
2401
2401
|
|
2402
2402
|
|
2403
2403
|
|
2404
|
-
/**
|
2405
|
-
* Enables SSL for local development. The server will be
|
2406
|
-
* available at https://localhost:8080. This is intended
|
2407
|
-
* for local development without a reverse proxy. Don't
|
2408
|
-
* use it when using tunnels like ngrok.com that already
|
2409
|
-
* handle SSL. Usage of this method will be ignored
|
2410
|
-
* in production. Must be called in init function of
|
2411
|
-
* {@link startServer}.
|
2412
|
-
*/
|
2413
|
-
enableLocalSSL(): void;
|
2414
2404
|
|
2415
2405
|
|
2416
2406
|
|