hytopia 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/scripts.js +28 -9
- package/docs/server.hytopia.md +1 -1
- package/docs/server.hytopia.port.md +2 -2
- package/docs/server.hytopia.supported_input_keys.md +1 -1
- package/docs/server.md +1 -1
- package/docs/server.port.md +2 -2
- package/docs/server.supported_input_keys.md +1 -1
- package/examples/character-controller/MyCharacterController.ts +230 -0
- package/examples/character-controller/README.md +15 -0
- package/examples/character-controller/assets/audio/sfx/damage.wav +0 -0
- package/examples/character-controller/assets/audio/sfx/step.wav +0 -0
- package/examples/character-controller/assets/certs/README.md +11 -0
- package/examples/character-controller/assets/certs/localhost.crt +20 -0
- package/examples/character-controller/assets/certs/localhost.key +27 -0
- package/examples/character-controller/assets/cubemaps/skybox/+x.png +0 -0
- package/examples/character-controller/assets/cubemaps/skybox/+y.png +0 -0
- package/examples/character-controller/assets/cubemaps/skybox/+z.png +0 -0
- package/examples/character-controller/assets/cubemaps/skybox/-x.png +0 -0
- package/examples/character-controller/assets/cubemaps/skybox/-y.png +0 -0
- package/examples/character-controller/assets/cubemaps/skybox/-z.png +0 -0
- package/examples/character-controller/assets/map.json +2623 -0
- package/examples/character-controller/assets/models/player.gltf +1 -0
- package/examples/character-controller/assets/textures/bricks.png +0 -0
- package/examples/character-controller/assets/textures/clay.png +0 -0
- package/examples/character-controller/assets/textures/diamond_ore.png +0 -0
- package/examples/character-controller/assets/textures/dirt.png +0 -0
- package/examples/character-controller/assets/textures/dragons_stone.png +0 -0
- package/examples/character-controller/assets/textures/glass.png +0 -0
- package/examples/character-controller/assets/textures/grass/+x.png +0 -0
- package/examples/character-controller/assets/textures/grass/+y.png +0 -0
- package/examples/character-controller/assets/textures/grass/+z.png +0 -0
- package/examples/character-controller/assets/textures/grass/-x.png +0 -0
- package/examples/character-controller/assets/textures/grass/-y.png +0 -0
- package/examples/character-controller/assets/textures/grass/-z.png +0 -0
- package/examples/character-controller/assets/textures/grass.png +0 -0
- package/examples/character-controller/assets/textures/gravel.png +0 -0
- package/examples/character-controller/assets/textures/ice.png +0 -0
- package/examples/character-controller/assets/textures/infected_shadowrock.png +0 -0
- package/examples/character-controller/assets/textures/log_side.png +0 -0
- package/examples/character-controller/assets/textures/log_top.png +0 -0
- package/examples/character-controller/assets/textures/mossy_coblestone.png +0 -0
- package/examples/character-controller/assets/textures/nuit.png +0 -0
- package/examples/character-controller/assets/textures/oak_leaves.png +0 -0
- package/examples/character-controller/assets/textures/oak_planks.png +0 -0
- package/examples/character-controller/assets/textures/sand.png +0 -0
- package/examples/character-controller/assets/textures/shadowrock.png +0 -0
- package/examples/character-controller/assets/textures/stone.png +0 -0
- package/examples/character-controller/assets/textures/stone_bricks.png +0 -0
- package/examples/character-controller/assets/textures/void_sand.png +0 -0
- package/examples/character-controller/assets/textures/water_still.png +0 -0
- package/examples/character-controller/bun.lockb +0 -0
- package/examples/character-controller/index.ts +43 -0
- package/examples/character-controller/package.json +14 -0
- package/examples/character-controller/tsconfig.json +27 -0
- package/examples/entity-spawn/README.md +15 -0
- package/examples/entity-spawn/assets/certs/README.md +11 -0
- package/examples/entity-spawn/assets/certs/localhost.crt +20 -0
- package/examples/entity-spawn/assets/certs/localhost.key +27 -0
- package/examples/entity-spawn/assets/cubemaps/skybox/+x.png +0 -0
- package/examples/entity-spawn/assets/cubemaps/skybox/+y.png +0 -0
- package/examples/entity-spawn/assets/cubemaps/skybox/+z.png +0 -0
- package/examples/entity-spawn/assets/cubemaps/skybox/-x.png +0 -0
- package/examples/entity-spawn/assets/cubemaps/skybox/-y.png +0 -0
- package/examples/entity-spawn/assets/cubemaps/skybox/-z.png +0 -0
- package/examples/entity-spawn/assets/map.json +2623 -0
- package/examples/entity-spawn/assets/models/player.gltf +1 -0
- package/examples/entity-spawn/assets/models/spider.gltf +1 -0
- package/examples/entity-spawn/assets/textures/bricks.png +0 -0
- package/examples/entity-spawn/assets/textures/clay.png +0 -0
- package/examples/entity-spawn/assets/textures/diamond_ore.png +0 -0
- package/examples/entity-spawn/assets/textures/dirt.png +0 -0
- package/examples/entity-spawn/assets/textures/dragons_stone.png +0 -0
- package/examples/entity-spawn/assets/textures/glass.png +0 -0
- package/examples/entity-spawn/assets/textures/grass/+x.png +0 -0
- package/examples/entity-spawn/assets/textures/grass/+y.png +0 -0
- package/examples/entity-spawn/assets/textures/grass/+z.png +0 -0
- package/examples/entity-spawn/assets/textures/grass/-x.png +0 -0
- package/examples/entity-spawn/assets/textures/grass/-y.png +0 -0
- package/examples/entity-spawn/assets/textures/grass/-z.png +0 -0
- package/examples/entity-spawn/assets/textures/grass.png +0 -0
- package/examples/entity-spawn/assets/textures/gravel.png +0 -0
- package/examples/entity-spawn/assets/textures/ice.png +0 -0
- package/examples/entity-spawn/assets/textures/infected_shadowrock.png +0 -0
- package/examples/entity-spawn/assets/textures/log_side.png +0 -0
- package/examples/entity-spawn/assets/textures/log_top.png +0 -0
- package/examples/entity-spawn/assets/textures/mossy_coblestone.png +0 -0
- package/examples/entity-spawn/assets/textures/nuit.png +0 -0
- package/examples/entity-spawn/assets/textures/oak_leaves.png +0 -0
- package/examples/entity-spawn/assets/textures/oak_planks.png +0 -0
- package/examples/entity-spawn/assets/textures/sand.png +0 -0
- package/examples/entity-spawn/assets/textures/shadowrock.png +0 -0
- package/examples/entity-spawn/assets/textures/stone.png +0 -0
- package/examples/entity-spawn/assets/textures/stone_bricks.png +0 -0
- package/examples/entity-spawn/assets/textures/void_sand.png +0 -0
- package/examples/entity-spawn/assets/textures/water_still.png +0 -0
- package/examples/entity-spawn/bun.lockb +0 -0
- package/examples/entity-spawn/index.ts +93 -0
- package/examples/entity-spawn/package.json +14 -0
- package/examples/entity-spawn/tsconfig.json +27 -0
- package/examples/payload-game/README.md +15 -0
- package/examples/payload-game/assets/certs/README.md +11 -0
- package/examples/payload-game/assets/certs/localhost.crt +20 -0
- package/examples/payload-game/assets/certs/localhost.key +27 -0
- package/examples/payload-game/bun.lockb +0 -0
- package/examples/payload-game/index.ts +12 -3
- package/examples/payload-game/package.json +14 -0
- package/examples/payload-game/tsconfig.json +27 -0
- package/package.json +1 -1
- package/server.api.json +6 -6
- package/server.d.ts +10 -3
- package/server.js +1 -1
- package/tsconfig.json +1 -4
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
// Enable latest features
|
4
|
+
"lib": ["ESNext", "DOM"],
|
5
|
+
"target": "ESNext",
|
6
|
+
"module": "ESNext",
|
7
|
+
"moduleDetection": "force",
|
8
|
+
"jsx": "react-jsx",
|
9
|
+
"allowJs": true,
|
10
|
+
|
11
|
+
// Bundler mode
|
12
|
+
"moduleResolution": "bundler",
|
13
|
+
"allowImportingTsExtensions": true,
|
14
|
+
"verbatimModuleSyntax": true,
|
15
|
+
"noEmit": true,
|
16
|
+
|
17
|
+
// Best practices
|
18
|
+
"strict": true,
|
19
|
+
"skipLibCheck": true,
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
21
|
+
|
22
|
+
// Some stricter flags (disabled by default)
|
23
|
+
"noUnusedLocals": false,
|
24
|
+
"noUnusedParameters": false,
|
25
|
+
"noPropertyAccessFromIndexSignature": false
|
26
|
+
}
|
27
|
+
}
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -24001,7 +24001,7 @@
|
|
24001
24001
|
{
|
24002
24002
|
"kind": "Variable",
|
24003
24003
|
"canonicalReference": "server!HYTOPIA.PORT:var",
|
24004
|
-
"docComment": "/**\n * The port the server will
|
24004
|
+
"docComment": "/**\n * The port the server will run on. You can override this in your .env by setting PORT. When deployed in production to HYTOPIA servers, any .env value will be ignored and 8080 will be used.\n *\n * @public\n */\n",
|
24005
24005
|
"excerptTokens": [
|
24006
24006
|
{
|
24007
24007
|
"kind": "Content",
|
@@ -24009,7 +24009,7 @@
|
|
24009
24009
|
},
|
24010
24010
|
{
|
24011
24011
|
"kind": "Content",
|
24012
|
-
"text": "string |
|
24012
|
+
"text": "string | 8080"
|
24013
24013
|
}
|
24014
24014
|
],
|
24015
24015
|
"fileUrlPath": "src/networking/WebServer.ts",
|
@@ -28468,7 +28468,7 @@
|
|
28468
28468
|
},
|
28469
28469
|
{
|
28470
28470
|
"kind": "Content",
|
28471
|
-
"text": "
|
28471
|
+
"text": "readonly [\"w\", \"a\", \"s\", \"d\", \"sp\", \"sh\", \"tb\", \"ml\", \"mr\", \"q\", \"e\", \"r\", \"f\", \"z\", \"x\", \"c\", \"v\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"]"
|
28472
28472
|
}
|
28473
28473
|
],
|
28474
28474
|
"fileUrlPath": "src/networking/players/Player.ts",
|
@@ -30825,7 +30825,7 @@
|
|
30825
30825
|
{
|
30826
30826
|
"kind": "Variable",
|
30827
30827
|
"canonicalReference": "server!PORT:var",
|
30828
|
-
"docComment": "/**\n * The port the server will
|
30828
|
+
"docComment": "/**\n * The port the server will run on. You can override this in your .env by setting PORT. When deployed in production to HYTOPIA servers, any .env value will be ignored and 8080 will be used.\n *\n * @public\n */\n",
|
30829
30829
|
"excerptTokens": [
|
30830
30830
|
{
|
30831
30831
|
"kind": "Content",
|
@@ -30833,7 +30833,7 @@
|
|
30833
30833
|
},
|
30834
30834
|
{
|
30835
30835
|
"kind": "Content",
|
30836
|
-
"text": "string |
|
30836
|
+
"text": "string | 8080"
|
30837
30837
|
}
|
30838
30838
|
],
|
30839
30839
|
"fileUrlPath": "src/networking/WebServer.ts",
|
@@ -35292,7 +35292,7 @@
|
|
35292
35292
|
},
|
35293
35293
|
{
|
35294
35294
|
"kind": "Content",
|
35295
|
-
"text": "
|
35295
|
+
"text": "readonly [\"w\", \"a\", \"s\", \"d\", \"sp\", \"sh\", \"tb\", \"ml\", \"mr\", \"q\", \"e\", \"r\", \"f\", \"z\", \"x\", \"c\", \"v\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"]"
|
35296
35296
|
}
|
35297
35297
|
],
|
35298
35298
|
"fileUrlPath": "src/networking/players/Player.ts",
|
package/server.d.ts
CHANGED
@@ -1801,8 +1801,15 @@ export declare type PlayerOrientationState = {
|
|
1801
1801
|
yaw: number;
|
1802
1802
|
};
|
1803
1803
|
|
1804
|
-
/**
|
1805
|
-
|
1804
|
+
/**
|
1805
|
+
* The port the server will run on. You can override
|
1806
|
+
* this in your .env by setting PORT. When deployed in
|
1807
|
+
* production to HYTOPIA servers, any .env value will
|
1808
|
+
* be ignored and 8080 will be used.
|
1809
|
+
*
|
1810
|
+
* @public
|
1811
|
+
*/
|
1812
|
+
export declare const PORT: string | 8080;
|
1806
1813
|
|
1807
1814
|
/** A raw set of collision groups represented as a 32-bit number. @public */
|
1808
1815
|
export declare type RawCollisionGroups = RAPIER.InteractionGroups;
|
@@ -2359,7 +2366,7 @@ export declare interface SpdMatrix3 extends SdpMatrix3 {
|
|
2359
2366
|
export declare function startServer(init: (world: World) => void): void;
|
2360
2367
|
|
2361
2368
|
/** The input keys included in the PlayerInputState. @public */
|
2362
|
-
export declare const SUPPORTED_INPUT_KEYS:
|
2369
|
+
export declare const SUPPORTED_INPUT_KEYS: readonly ["w", "a", "s", "d", "sp", "sh", "tb", "ml", "mr", "q", "e", "r", "f", "z", "x", "c", "v", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
|
2363
2370
|
|
2364
2371
|
/** A 3-dimensional vector. @public */
|
2365
2372
|
export declare interface Vector3 {
|