hytopia 0.1.86 → 0.1.87

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.
Files changed (33) hide show
  1. package/examples/ai-agents/package.json +2 -2
  2. package/examples/big-world/assets/map.json +34 -33
  3. package/examples/big-world/index.ts +1 -1
  4. package/examples/big-world/package.json +2 -2
  5. package/examples/block-entity/assets/map.json +33 -33
  6. package/examples/block-entity/index.ts +7 -7
  7. package/examples/block-entity/package.json +2 -2
  8. package/examples/child-entity/assets/map.json +33 -33
  9. package/examples/child-entity/index.ts +2 -2
  10. package/examples/child-entity/package.json +2 -2
  11. package/examples/custom-ui/assets/map.json +33 -33
  12. package/examples/custom-ui/index.ts +2 -2
  13. package/examples/custom-ui/package.json +2 -2
  14. package/examples/entity-controller/MyEntityController.ts +1 -1
  15. package/examples/entity-controller/assets/map.json +33 -33
  16. package/examples/entity-controller/index.ts +1 -1
  17. package/examples/entity-spawn/assets/map.json +33 -33
  18. package/examples/entity-spawn/index.ts +3 -3
  19. package/examples/entity-spawn/package.json +2 -2
  20. package/examples/hole-in-wall-game/assets/map.json +32 -32
  21. package/examples/hole-in-wall-game/index.ts +5 -5
  22. package/examples/hole-in-wall-game/package.json +2 -2
  23. package/examples/lighting/assets/map.json +33 -33
  24. package/examples/lighting/index.ts +2 -2
  25. package/examples/lighting/package.json +2 -2
  26. package/examples/payload-game/assets/map.json +33 -33
  27. package/examples/payload-game/index.ts +2 -2
  28. package/examples/payload-game/package.json +2 -2
  29. package/examples/wall-dodge-game/assets/map.json +32 -32
  30. package/examples/wall-dodge-game/index.ts +9 -9
  31. package/examples/wall-dodge-game/package.json +2 -2
  32. package/package.json +1 -1
  33. /package/examples/hole-in-wall-game/assets/{textures → blocks}/water.png +0 -0
@@ -9,8 +9,8 @@
9
9
  "typescript": "^5.0.0"
10
10
  },
11
11
  "dependencies": {
12
- "@hytopia.com/assets": "^0.2.3",
13
- "hytopia": "^0.1.85",
12
+ "@hytopia.com/assets": "^0.2.5",
13
+ "hytopia": "^0.1.86",
14
14
  "openai": "^4.77.3"
15
15
  }
16
16
  }
@@ -3,112 +3,113 @@
3
3
  {
4
4
  "id": 1,
5
5
  "name": "bricks",
6
- "textureUri": "textures/bricks.png"
6
+ "textureUri": "blocks/bricks.png"
7
7
  },
8
8
  {
9
9
  "id": 2,
10
10
  "name": "clay",
11
- "textureUri": "textures/clay.png"
11
+ "textureUri": "blocks/clay.png"
12
12
  },
13
13
  {
14
14
  "id": 3,
15
- "name": "diamond_ore",
16
- "textureUri": "textures/diamond_ore.png"
15
+ "name": "diamond-ore",
16
+ "textureUri": "blocks/diamond-ore.png"
17
17
  },
18
18
  {
19
19
  "id": 4,
20
20
  "name": "dirt",
21
- "textureUri": "textures/dirt.png"
21
+ "textureUri": "blocks/dirt.png"
22
22
  },
23
23
  {
24
24
  "id": 5,
25
- "name": "dragons_stone",
26
- "textureUri": "textures/dragons_stone.png"
25
+ "name": "dragons-stone",
26
+ "textureUri": "blocks/dragons-stone.png"
27
27
  },
28
28
  {
29
29
  "id": 6,
30
30
  "name": "glass",
31
- "textureUri": "textures/glass.png"
31
+ "textureUri": "blocks/glass.png"
32
32
  },
33
33
  {
34
34
  "id": 7,
35
35
  "name": "grass",
36
- "textureUri": "textures/grass"
36
+ "textureUri": "blocks/grass"
37
37
  },
38
38
  {
39
39
  "id": 8,
40
40
  "name": "gravel",
41
- "textureUri": "textures/gravel.png"
41
+ "textureUri": "blocks/gravel.png"
42
42
  },
43
43
  {
44
44
  "id": 9,
45
45
  "name": "ice",
46
- "textureUri": "textures/ice.png"
46
+ "textureUri": "blocks/ice.png"
47
47
  },
48
48
  {
49
49
  "id": 10,
50
- "name": "infected_shadowrock",
51
- "textureUri": "textures/infected_shadowrock.png"
50
+ "name": "infected-shadowrock",
51
+ "textureUri": "blocks/infected-shadowrock.png"
52
52
  },
53
53
  {
54
54
  "id": 11,
55
- "name": "log_side",
56
- "textureUri": "textures/log_side.png"
55
+ "name": "log-side",
56
+ "textureUri": "blocks/log"
57
57
  },
58
58
  {
59
59
  "id": 12,
60
- "name": "log_top",
61
- "textureUri": "textures/log_top.png"
60
+ "name": "log-top",
61
+ "textureUri": "blocks/log"
62
62
  },
63
63
  {
64
64
  "id": 13,
65
- "name": "mossy_coblestone",
66
- "textureUri": "textures/mossy_coblestone.png"
65
+ "name": "mossy-coblestone",
66
+ "textureUri": "blocks/mossy-coblestone.png"
67
67
  },
68
68
  {
69
69
  "id": 14,
70
70
  "name": "nuit",
71
- "textureUri": "textures/nuit.png"
71
+ "textureUri": "blocks/nuit.png"
72
72
  },
73
73
  {
74
74
  "id": 15,
75
- "name": "oak_leaves",
76
- "textureUri": "textures/oak_leaves.png"
75
+ "name": "oak-leaves",
76
+ "textureUri": "blocks/oak-leaves.png"
77
77
  },
78
78
  {
79
79
  "id": 16,
80
- "name": "oak_planks",
81
- "textureUri": "textures/oak_planks.png"
80
+ "name": "oak-planks",
81
+ "textureUri": "blocks/oak-planks.png"
82
82
  },
83
83
  {
84
84
  "id": 17,
85
85
  "name": "sand",
86
- "textureUri": "textures/sand.png"
86
+ "textureUri": "blocks/sand.png"
87
87
  },
88
88
  {
89
89
  "id": 18,
90
90
  "name": "shadowrock",
91
- "textureUri": "textures/shadowrock.png"
91
+ "textureUri": "blocks/shadowrock.png"
92
92
  },
93
93
  {
94
94
  "id": 19,
95
95
  "name": "stone",
96
- "textureUri": "textures/stone.png"
96
+ "textureUri": "blocks/stone.png"
97
97
  },
98
98
  {
99
99
  "id": 20,
100
- "name": "stone_bricks",
101
- "textureUri": "textures/stone_bricks.png"
100
+ "name": "stone-bricks",
101
+ "textureUri": "blocks/stone-bricks.png"
102
102
  },
103
103
  {
104
104
  "id": 21,
105
- "name": "void_sand",
106
- "textureUri": "textures/void_sand.png"
105
+ "name": "void-sand",
106
+ "textureUri": "blocks/void-sand.png"
107
107
  },
108
108
  {
109
109
  "id": 22,
110
- "name": "water_still",
111
- "textureUri": "textures/water_still.png"
110
+ "name": "water-still",
111
+ "textureUri": "blocks/water-still.png",
112
+ "isLiquid": true
112
113
  }
113
114
  ],
114
115
  "blocks": {
@@ -26,7 +26,7 @@ startServer(world => {
26
26
  const playerEntity = new PlayerEntity({
27
27
  player,
28
28
  name: 'Player',
29
- modelUri: 'models/player.gltf',
29
+ modelUri: 'models/players/player.gltf',
30
30
  modelLoopedAnimations: [ 'idle' ],
31
31
  modelScale: 0.5,
32
32
  });
@@ -9,7 +9,7 @@
9
9
  "author": "",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "hytopia": "latest",
13
- "@hytopia.com/assets": "latest"
12
+ "@hytopia.com/assets": "^0.2.5",
13
+ "hytopia": "^0.1.86"
14
14
  }
15
15
  }
@@ -3,112 +3,112 @@
3
3
  {
4
4
  "id": 1,
5
5
  "name": "bricks",
6
- "textureUri": "textures/bricks.png"
6
+ "textureUri": "blocks/bricks.png"
7
7
  },
8
8
  {
9
9
  "id": 2,
10
10
  "name": "clay",
11
- "textureUri": "textures/clay.png"
11
+ "textureUri": "blocks/clay.png"
12
12
  },
13
13
  {
14
14
  "id": 3,
15
- "name": "diamond_ore",
16
- "textureUri": "textures/diamond_ore.png"
15
+ "name": "diamond-ore",
16
+ "textureUri": "blocks/diamond-ore.png"
17
17
  },
18
18
  {
19
19
  "id": 4,
20
20
  "name": "dirt",
21
- "textureUri": "textures/dirt.png"
21
+ "textureUri": "blocks/dirt.png"
22
22
  },
23
23
  {
24
24
  "id": 5,
25
- "name": "dragons_stone",
26
- "textureUri": "textures/dragons_stone.png"
25
+ "name": "dragons-stone",
26
+ "textureUri": "blocks/dragons-stone.png"
27
27
  },
28
28
  {
29
29
  "id": 6,
30
30
  "name": "glass",
31
- "textureUri": "textures/glass.png"
31
+ "textureUri": "blocks/glass.png"
32
32
  },
33
33
  {
34
34
  "id": 7,
35
35
  "name": "grass",
36
- "textureUri": "textures/grass"
36
+ "textureUri": "blocks/grass"
37
37
  },
38
38
  {
39
39
  "id": 8,
40
40
  "name": "gravel",
41
- "textureUri": "textures/gravel.png"
41
+ "textureUri": "blocks/gravel.png"
42
42
  },
43
43
  {
44
44
  "id": 9,
45
45
  "name": "ice",
46
- "textureUri": "textures/ice.png"
46
+ "textureUri": "blocks/ice.png"
47
47
  },
48
48
  {
49
49
  "id": 10,
50
- "name": "infected_shadowrock",
51
- "textureUri": "textures/infected_shadowrock.png"
50
+ "name": "infected-shadowrock",
51
+ "textureUri": "blocks/infected-shadowrock.png"
52
52
  },
53
53
  {
54
54
  "id": 11,
55
- "name": "log_side",
56
- "textureUri": "textures/log_side.png"
55
+ "name": "log-side",
56
+ "textureUri": "blocks/log"
57
57
  },
58
58
  {
59
59
  "id": 12,
60
- "name": "log_top",
61
- "textureUri": "textures/log_top.png"
60
+ "name": "log-top",
61
+ "textureUri": "blocks/log"
62
62
  },
63
63
  {
64
64
  "id": 13,
65
- "name": "mossy_coblestone",
66
- "textureUri": "textures/mossy_coblestone.png"
65
+ "name": "mossy-coblestone",
66
+ "textureUri": "blocks/mossy-coblestone.png"
67
67
  },
68
68
  {
69
69
  "id": 14,
70
70
  "name": "nuit",
71
- "textureUri": "textures/nuit.png"
71
+ "textureUri": "blocks/nuit.png"
72
72
  },
73
73
  {
74
74
  "id": 15,
75
- "name": "oak_leaves",
76
- "textureUri": "textures/oak_leaves.png"
75
+ "name": "oak-leaves",
76
+ "textureUri": "blocks/oak-leaves.png"
77
77
  },
78
78
  {
79
79
  "id": 16,
80
- "name": "oak_planks",
81
- "textureUri": "textures/oak_planks.png"
80
+ "name": "oak-planks",
81
+ "textureUri": "blocks/oak-planks.png"
82
82
  },
83
83
  {
84
84
  "id": 17,
85
85
  "name": "sand",
86
- "textureUri": "textures/sand.png"
86
+ "textureUri": "blocks/sand.png"
87
87
  },
88
88
  {
89
89
  "id": 18,
90
90
  "name": "shadowrock",
91
- "textureUri": "textures/shadowrock.png"
91
+ "textureUri": "blocks/shadowrock.png"
92
92
  },
93
93
  {
94
94
  "id": 19,
95
95
  "name": "stone",
96
- "textureUri": "textures/stone.png"
96
+ "textureUri": "blocks/stone.png"
97
97
  },
98
98
  {
99
99
  "id": 20,
100
- "name": "stone_bricks",
101
- "textureUri": "textures/stone_bricks.png"
100
+ "name": "stone-bricks",
101
+ "textureUri": "blocks/stone-bricks.png"
102
102
  },
103
103
  {
104
104
  "id": 21,
105
- "name": "void_sand",
106
- "textureUri": "textures/void_sand.png"
105
+ "name": "void-sand",
106
+ "textureUri": "blocks/void-sand.png"
107
107
  },
108
108
  {
109
109
  "id": 22,
110
- "name": "water_still",
111
- "textureUri": "textures/water_still.png"
110
+ "name": "water-still",
111
+ "textureUri": "blocks/water-still.png"
112
112
  }
113
113
  ],
114
114
  "blocks": {
@@ -21,7 +21,7 @@ startServer(world => {
21
21
  const playerEntity = new PlayerEntity({
22
22
  player,
23
23
  name: 'Player',
24
- modelUri: 'models/player.gltf',
24
+ modelUri: 'models/players/player.gltf',
25
25
  modelLoopedAnimations: [ 'idle' ],
26
26
  modelScale: 0.5,
27
27
  });
@@ -37,7 +37,7 @@ startServer(world => {
37
37
  * Spawn a block entity as a moving platform
38
38
  */
39
39
  const blockPlatform = new Entity({
40
- blockTextureUri: 'textures/grass', // A texture URI without a file extension will use a folder and look for the textures for each face in the folder (-x.png, +x.png, -y.png, +y.png, -z.png, +z.png)
40
+ blockTextureUri: 'blocks/grass', // A texture URI without a file extension will use a folder and look for the textures for each face in the folder (-x.png, +x.png, -y.png, +y.png, -z.png, +z.png)
41
41
  blockHalfExtents: { x: 1, y: 0.5, z: 1 },
42
42
  rigidBodyOptions: {
43
43
  type: RigidBodyType.KINEMATIC_VELOCITY, // Kinematic means platform won't be effected by external physics, including gravity
@@ -64,7 +64,7 @@ startServer(world => {
64
64
  * Spawn a 2x2x2 block entity that spins in the air
65
65
  */
66
66
  const spinningBlock = new Entity({
67
- blockTextureUri: 'textures/stone_bricks.png',
67
+ blockTextureUri: 'blocks/stone-bricks.png',
68
68
  blockHalfExtents: { x: 1, y: 1, z: 1 }, // half extents at the target size / 2.
69
69
  rigidBodyOptions: {
70
70
  type: RigidBodyType.KINEMATIC_VELOCITY,
@@ -78,7 +78,7 @@ startServer(world => {
78
78
  * Spawn a block entity that interacts with physics and can be pushed by players
79
79
  */
80
80
  const movableBlock = new Entity({ // Entity is dynamic by default, meaning it will interact with external forces, including gravity
81
- blockTextureUri: 'textures/sand.png',
81
+ blockTextureUri: 'blocks/sand.png',
82
82
 
83
83
  // A block of 1x1x1 would be half extents of 0.5x0.5x0.5,
84
84
  // if you do not explicitly create rigidBodyOptions.colliders
@@ -100,7 +100,7 @@ startServer(world => {
100
100
  * Also, prevent it from rotating.
101
101
  */
102
102
  const heavyBlock = new Entity({
103
- blockTextureUri: 'textures/stone_bricks.png',
103
+ blockTextureUri: 'blocks/stone-bricks.png',
104
104
  blockHalfExtents: { x: 0.5, y: 0.5, z: 0.5 },
105
105
  rigidBodyOptions: {
106
106
  type: RigidBodyType.DYNAMIC,
@@ -116,7 +116,7 @@ startServer(world => {
116
116
  * Also disable rotations so it doesn't spin around like a maniac
117
117
  */
118
118
  const bouncingBlock = new Entity({
119
- blockTextureUri: 'textures/ice.png',
119
+ blockTextureUri: 'blocks/ice.png',
120
120
  blockHalfExtents: { x: 0.5, y: 0.5, z: 0.5 },
121
121
  rigidBodyOptions: {
122
122
  type: RigidBodyType.DYNAMIC,
@@ -138,7 +138,7 @@ startServer(world => {
138
138
  * Because, again why not?
139
139
  */
140
140
  const blockPet = new Entity({
141
- blockTextureUri: 'textures/bricks.png',
141
+ blockTextureUri: 'blocks/bricks.png',
142
142
  blockHalfExtents: { x: 0.5, y: 0.5, z: 0.5 },
143
143
  // attach a simple entity controller so we can pathfind,
144
144
  // the entity controller will be created and associated when we spawn the entity
@@ -10,7 +10,7 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "hytopia": "latest",
14
- "@hytopia.com/assets": "latest"
13
+ "@hytopia.com/assets": "^0.2.5",
14
+ "hytopia": "^0.1.86"
15
15
  }
16
16
  }
@@ -3,112 +3,112 @@
3
3
  {
4
4
  "id": 1,
5
5
  "name": "bricks",
6
- "textureUri": "textures/bricks.png"
6
+ "textureUri": "blocks/bricks.png"
7
7
  },
8
8
  {
9
9
  "id": 2,
10
10
  "name": "clay",
11
- "textureUri": "textures/clay.png"
11
+ "textureUri": "blocks/clay.png"
12
12
  },
13
13
  {
14
14
  "id": 3,
15
- "name": "diamond_ore",
16
- "textureUri": "textures/diamond_ore.png"
15
+ "name": "diamond-ore",
16
+ "textureUri": "blocks/diamond-ore.png"
17
17
  },
18
18
  {
19
19
  "id": 4,
20
20
  "name": "dirt",
21
- "textureUri": "textures/dirt.png"
21
+ "textureUri": "blocks/dirt.png"
22
22
  },
23
23
  {
24
24
  "id": 5,
25
- "name": "dragons_stone",
26
- "textureUri": "textures/dragons_stone.png"
25
+ "name": "dragons-stone",
26
+ "textureUri": "blocks/dragons-stone.png"
27
27
  },
28
28
  {
29
29
  "id": 6,
30
30
  "name": "glass",
31
- "textureUri": "textures/glass.png"
31
+ "textureUri": "blocks/glass.png"
32
32
  },
33
33
  {
34
34
  "id": 7,
35
35
  "name": "grass",
36
- "textureUri": "textures/grass"
36
+ "textureUri": "blocks/grass"
37
37
  },
38
38
  {
39
39
  "id": 8,
40
40
  "name": "gravel",
41
- "textureUri": "textures/gravel.png"
41
+ "textureUri": "blocks/gravel.png"
42
42
  },
43
43
  {
44
44
  "id": 9,
45
45
  "name": "ice",
46
- "textureUri": "textures/ice.png"
46
+ "textureUri": "blocks/ice.png"
47
47
  },
48
48
  {
49
49
  "id": 10,
50
- "name": "infected_shadowrock",
51
- "textureUri": "textures/infected_shadowrock.png"
50
+ "name": "infected-shadowrock",
51
+ "textureUri": "blocks/infected-shadowrock.png"
52
52
  },
53
53
  {
54
54
  "id": 11,
55
- "name": "log_side",
56
- "textureUri": "textures/log_side.png"
55
+ "name": "log-side",
56
+ "textureUri": "blocks/log"
57
57
  },
58
58
  {
59
59
  "id": 12,
60
- "name": "log_top",
61
- "textureUri": "textures/log_top.png"
60
+ "name": "log-top",
61
+ "textureUri": "blocks/log"
62
62
  },
63
63
  {
64
64
  "id": 13,
65
- "name": "mossy_coblestone",
66
- "textureUri": "textures/mossy_coblestone.png"
65
+ "name": "mossy-coblestone",
66
+ "textureUri": "blocks/mossy-coblestone.png"
67
67
  },
68
68
  {
69
69
  "id": 14,
70
70
  "name": "nuit",
71
- "textureUri": "textures/nuit.png"
71
+ "textureUri": "blocks/nuit.png"
72
72
  },
73
73
  {
74
74
  "id": 15,
75
- "name": "oak_leaves",
76
- "textureUri": "textures/oak_leaves.png"
75
+ "name": "oak-leaves",
76
+ "textureUri": "blocks/oak-leaves.png"
77
77
  },
78
78
  {
79
79
  "id": 16,
80
- "name": "oak_planks",
81
- "textureUri": "textures/oak_planks.png"
80
+ "name": "oak-planks",
81
+ "textureUri": "blocks/oak-planks.png"
82
82
  },
83
83
  {
84
84
  "id": 17,
85
85
  "name": "sand",
86
- "textureUri": "textures/sand.png"
86
+ "textureUri": "blocks/sand.png"
87
87
  },
88
88
  {
89
89
  "id": 18,
90
90
  "name": "shadowrock",
91
- "textureUri": "textures/shadowrock.png"
91
+ "textureUri": "blocks/shadowrock.png"
92
92
  },
93
93
  {
94
94
  "id": 19,
95
95
  "name": "stone",
96
- "textureUri": "textures/stone.png"
96
+ "textureUri": "blocks/stone.png"
97
97
  },
98
98
  {
99
99
  "id": 20,
100
- "name": "stone_bricks",
101
- "textureUri": "textures/stone_bricks.png"
100
+ "name": "stone-bricks",
101
+ "textureUri": "blocks/stone-bricks.png"
102
102
  },
103
103
  {
104
104
  "id": 21,
105
- "name": "void_sand",
106
- "textureUri": "textures/void_sand.png"
105
+ "name": "void-sand",
106
+ "textureUri": "blocks/void-sand.png"
107
107
  },
108
108
  {
109
109
  "id": 22,
110
- "name": "water_still",
111
- "textureUri": "textures/water_still.png"
110
+ "name": "water-still",
111
+ "textureUri": "blocks/water-still.png"
112
112
  }
113
113
  ],
114
114
  "blocks": {
@@ -15,7 +15,7 @@ startServer(world => {
15
15
  const playerEntity = new PlayerEntity({
16
16
  player,
17
17
  name: 'Player',
18
- modelUri: 'models/player.gltf',
18
+ modelUri: 'models/players/player.gltf',
19
19
  modelLoopedAnimations: [ 'idle' ],
20
20
  modelScale: 0.5,
21
21
  });
@@ -25,7 +25,7 @@ startServer(world => {
25
25
  // Spawn a sword entity as a child of the player entity.
26
26
  const swordChildEntity = new Entity({
27
27
  name: 'sword',
28
- modelUri: 'models/sword.gltf',
28
+ modelUri: 'models/items/sword.gltf',
29
29
  parent: playerEntity,
30
30
  parentNodeName: 'hand_right_anchor',
31
31
  });
@@ -10,7 +10,7 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "hytopia": "latest",
14
- "@hytopia.com/assets": "latest"
13
+ "@hytopia.com/assets": "^0.2.5",
14
+ "hytopia": "^0.1.86"
15
15
  }
16
16
  }