hytopia 0.5.6-dev12 → 0.5.6-dev14

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.
@@ -9,5 +9,5 @@ The collider options for the block type.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- get colliderOptions(): VoxelsColliderOptions;
12
+ get colliderOptions(): TrimeshColliderOptions;
13
13
  ```
@@ -107,7 +107,7 @@ Description
107
107
 
108
108
  </td><td>
109
109
 
110
- [VoxelsColliderOptions](./server.voxelscollideroptions.md)
110
+ [TrimeshColliderOptions](./server.trimeshcollideroptions.md)
111
111
 
112
112
 
113
113
  </td><td>
@@ -9,5 +9,5 @@ The custom collider options for the block type.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- customColliderOptions?: VoxelsColliderOptions;
12
+ customColliderOptions?: TrimeshColliderOptions;
13
13
  ```
@@ -45,7 +45,7 @@ Description
45
45
 
46
46
  </td><td>
47
47
 
48
- [VoxelsColliderOptions](./server.voxelscollideroptions.md)
48
+ [TrimeshColliderOptions](./server.trimeshcollideroptions.md)
49
49
 
50
50
 
51
51
  </td><td>
@@ -664,19 +664,5 @@ Sets whether the collider is a sensor.
664
664
  Sets the tag of the collider.
665
665
 
666
666
 
667
- </td></tr>
668
- <tr><td>
669
-
670
- [setVoxel(coordinate, filled)](./server.collider.setvoxel.md)
671
-
672
-
673
- </td><td>
674
-
675
-
676
- </td><td>
677
-
678
- Sets the voxel at the given coordinate as filled or not filled.
679
-
680
-
681
667
  </td></tr>
682
668
  </tbody></table>
@@ -9,7 +9,7 @@ The options for a collider.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export type ColliderOptions = BallColliderOptions | BlockColliderOptions | CapsuleColliderOptions | ConeColliderOptions | CylinderColliderOptions | RoundCylinderColliderOptions | TrimeshColliderOptions | VoxelsColliderOptions | WedgeColliderOptions | NoneColliderOptions;
12
+ export type ColliderOptions = BallColliderOptions | BlockColliderOptions | CapsuleColliderOptions | ConeColliderOptions | CylinderColliderOptions | RoundCylinderColliderOptions | TrimeshColliderOptions | WedgeColliderOptions | NoneColliderOptions;
13
13
  ```
14
- **References:** [BallColliderOptions](./server.ballcollideroptions.md)<!-- -->, [BlockColliderOptions](./server.blockcollideroptions.md)<!-- -->, [CapsuleColliderOptions](./server.capsulecollideroptions.md)<!-- -->, [ConeColliderOptions](./server.conecollideroptions.md)<!-- -->, [CylinderColliderOptions](./server.cylindercollideroptions.md)<!-- -->, [RoundCylinderColliderOptions](./server.roundcylindercollideroptions.md)<!-- -->, [TrimeshColliderOptions](./server.trimeshcollideroptions.md)<!-- -->, [VoxelsColliderOptions](./server.voxelscollideroptions.md)<!-- -->, [WedgeColliderOptions](./server.wedgecollideroptions.md)<!-- -->, [NoneColliderOptions](./server.nonecollideroptions.md)
14
+ **References:** [BallColliderOptions](./server.ballcollideroptions.md)<!-- -->, [BlockColliderOptions](./server.blockcollideroptions.md)<!-- -->, [CapsuleColliderOptions](./server.capsulecollideroptions.md)<!-- -->, [ConeColliderOptions](./server.conecollideroptions.md)<!-- -->, [CylinderColliderOptions](./server.cylindercollideroptions.md)<!-- -->, [RoundCylinderColliderOptions](./server.roundcylindercollideroptions.md)<!-- -->, [TrimeshColliderOptions](./server.trimeshcollideroptions.md)<!-- -->, [WedgeColliderOptions](./server.wedgecollideroptions.md)<!-- -->, [NoneColliderOptions](./server.nonecollideroptions.md)
15
15
 
@@ -141,20 +141,6 @@ TRIMESH
141
141
  </td><td>
142
142
 
143
143
 
144
- </td></tr>
145
- <tr><td>
146
-
147
- VOXELS
148
-
149
-
150
- </td><td>
151
-
152
- `"voxels"`
153
-
154
-
155
- </td><td>
156
-
157
-
158
144
  </td></tr>
159
145
  <tr><td>
160
146
 
package/docs/server.md CHANGED
@@ -1308,17 +1308,6 @@ A 3-dimensional vector of boolean values.
1308
1308
  A 3-dimensional vector.
1309
1309
 
1310
1310
 
1311
- </td></tr>
1312
- <tr><td>
1313
-
1314
- [VoxelsColliderOptions](./server.voxelscollideroptions.md)
1315
-
1316
-
1317
- </td><td>
1318
-
1319
- The options for a voxels collider.
1320
-
1321
-
1322
1311
  </td></tr>
1323
1312
  <tr><td>
1324
1313
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.5.6-dev12",
3
+ "version": "0.5.6-dev14",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.api.json CHANGED
@@ -4920,8 +4920,8 @@
4920
4920
  },
4921
4921
  {
4922
4922
  "kind": "Reference",
4923
- "text": "VoxelsColliderOptions",
4924
- "canonicalReference": "server!VoxelsColliderOptions:interface"
4923
+ "text": "TrimeshColliderOptions",
4924
+ "canonicalReference": "server!TrimeshColliderOptions:interface"
4925
4925
  },
4926
4926
  {
4927
4927
  "kind": "Content",
@@ -5322,8 +5322,8 @@
5322
5322
  },
5323
5323
  {
5324
5324
  "kind": "Reference",
5325
- "text": "VoxelsColliderOptions",
5326
- "canonicalReference": "server!VoxelsColliderOptions:interface"
5325
+ "text": "TrimeshColliderOptions",
5326
+ "canonicalReference": "server!TrimeshColliderOptions:interface"
5327
5327
  },
5328
5328
  {
5329
5329
  "kind": "Content",
@@ -9280,71 +9280,6 @@
9280
9280
  "isAbstract": false,
9281
9281
  "name": "setTag"
9282
9282
  },
9283
- {
9284
- "kind": "Method",
9285
- "canonicalReference": "server!Collider#setVoxel:member(1)",
9286
- "docComment": "/**\n * Sets the voxel at the given coordinate as filled or not filled.\n *\n * @param coordinate - The coordinate of the voxel to set.\n *\n * @param filled - True if the voxel at the coordinate should be filled, false if it should be removed.\n */\n",
9287
- "excerptTokens": [
9288
- {
9289
- "kind": "Content",
9290
- "text": "setVoxel(coordinate: "
9291
- },
9292
- {
9293
- "kind": "Reference",
9294
- "text": "Vector3Like",
9295
- "canonicalReference": "server!Vector3Like:interface"
9296
- },
9297
- {
9298
- "kind": "Content",
9299
- "text": ", filled: "
9300
- },
9301
- {
9302
- "kind": "Content",
9303
- "text": "boolean"
9304
- },
9305
- {
9306
- "kind": "Content",
9307
- "text": "): "
9308
- },
9309
- {
9310
- "kind": "Content",
9311
- "text": "void"
9312
- },
9313
- {
9314
- "kind": "Content",
9315
- "text": ";"
9316
- }
9317
- ],
9318
- "isStatic": false,
9319
- "returnTypeTokenRange": {
9320
- "startIndex": 5,
9321
- "endIndex": 6
9322
- },
9323
- "releaseTag": "Public",
9324
- "isProtected": false,
9325
- "overloadIndex": 1,
9326
- "parameters": [
9327
- {
9328
- "parameterName": "coordinate",
9329
- "parameterTypeTokenRange": {
9330
- "startIndex": 1,
9331
- "endIndex": 2
9332
- },
9333
- "isOptional": false
9334
- },
9335
- {
9336
- "parameterName": "filled",
9337
- "parameterTypeTokenRange": {
9338
- "startIndex": 3,
9339
- "endIndex": 4
9340
- },
9341
- "isOptional": false
9342
- }
9343
- ],
9344
- "isOptional": false,
9345
- "isAbstract": false,
9346
- "name": "setVoxel"
9347
- },
9348
9283
  {
9349
9284
  "kind": "Property",
9350
9285
  "canonicalReference": "server!Collider#shape:member",
@@ -9485,15 +9420,6 @@
9485
9420
  "kind": "Content",
9486
9421
  "text": " | "
9487
9422
  },
9488
- {
9489
- "kind": "Reference",
9490
- "text": "VoxelsColliderOptions",
9491
- "canonicalReference": "server!VoxelsColliderOptions:interface"
9492
- },
9493
- {
9494
- "kind": "Content",
9495
- "text": " | "
9496
- },
9497
9423
  {
9498
9424
  "kind": "Reference",
9499
9425
  "text": "WedgeColliderOptions",
@@ -9518,7 +9444,7 @@
9518
9444
  "name": "ColliderOptions",
9519
9445
  "typeTokenRange": {
9520
9446
  "startIndex": 1,
9521
- "endIndex": 20
9447
+ "endIndex": 18
9522
9448
  }
9523
9449
  },
9524
9450
  {
@@ -9704,27 +9630,6 @@
9704
9630
  "releaseTag": "Public",
9705
9631
  "name": "TRIMESH"
9706
9632
  },
9707
- {
9708
- "kind": "EnumMember",
9709
- "canonicalReference": "server!ColliderShape.VOXELS:member",
9710
- "docComment": "",
9711
- "excerptTokens": [
9712
- {
9713
- "kind": "Content",
9714
- "text": "VOXELS = "
9715
- },
9716
- {
9717
- "kind": "Content",
9718
- "text": "\"voxels\""
9719
- }
9720
- ],
9721
- "initializerTokenRange": {
9722
- "startIndex": 1,
9723
- "endIndex": 2
9724
- },
9725
- "releaseTag": "Public",
9726
- "name": "VOXELS"
9727
- },
9728
9633
  {
9729
9634
  "kind": "EnumMember",
9730
9635
  "canonicalReference": "server!ColliderShape.WEDGE:member",
@@ -43564,126 +43469,6 @@
43564
43469
  ],
43565
43470
  "extendsTokenRanges": []
43566
43471
  },
43567
- {
43568
- "kind": "Interface",
43569
- "canonicalReference": "server!VoxelsColliderOptions:interface",
43570
- "docComment": "/**\n * The options for a voxels collider.\n *\n * @public\n */\n",
43571
- "excerptTokens": [
43572
- {
43573
- "kind": "Content",
43574
- "text": "export interface VoxelsColliderOptions extends "
43575
- },
43576
- {
43577
- "kind": "Reference",
43578
- "text": "BaseColliderOptions",
43579
- "canonicalReference": "server!BaseColliderOptions:interface"
43580
- },
43581
- {
43582
- "kind": "Content",
43583
- "text": " "
43584
- }
43585
- ],
43586
- "fileUrlPath": "src/worlds/physics/Collider.ts",
43587
- "releaseTag": "Public",
43588
- "name": "VoxelsColliderOptions",
43589
- "preserveMemberOrder": false,
43590
- "members": [
43591
- {
43592
- "kind": "PropertySignature",
43593
- "canonicalReference": "server!VoxelsColliderOptions#coordinates:member",
43594
- "docComment": "/**\n * The coordinate of each voxel in the collider.\n */\n",
43595
- "excerptTokens": [
43596
- {
43597
- "kind": "Content",
43598
- "text": "coordinates?: "
43599
- },
43600
- {
43601
- "kind": "Reference",
43602
- "text": "Vector3Like",
43603
- "canonicalReference": "server!Vector3Like:interface"
43604
- },
43605
- {
43606
- "kind": "Content",
43607
- "text": "[]"
43608
- },
43609
- {
43610
- "kind": "Content",
43611
- "text": ";"
43612
- }
43613
- ],
43614
- "isReadonly": false,
43615
- "isOptional": true,
43616
- "releaseTag": "Public",
43617
- "name": "coordinates",
43618
- "propertyTypeTokenRange": {
43619
- "startIndex": 1,
43620
- "endIndex": 3
43621
- }
43622
- },
43623
- {
43624
- "kind": "PropertySignature",
43625
- "canonicalReference": "server!VoxelsColliderOptions#shape:member",
43626
- "docComment": "",
43627
- "excerptTokens": [
43628
- {
43629
- "kind": "Content",
43630
- "text": "shape: "
43631
- },
43632
- {
43633
- "kind": "Reference",
43634
- "text": "ColliderShape.VOXELS",
43635
- "canonicalReference": "server!ColliderShape.VOXELS:member"
43636
- },
43637
- {
43638
- "kind": "Content",
43639
- "text": ";"
43640
- }
43641
- ],
43642
- "isReadonly": false,
43643
- "isOptional": false,
43644
- "releaseTag": "Public",
43645
- "name": "shape",
43646
- "propertyTypeTokenRange": {
43647
- "startIndex": 1,
43648
- "endIndex": 2
43649
- }
43650
- },
43651
- {
43652
- "kind": "PropertySignature",
43653
- "canonicalReference": "server!VoxelsColliderOptions#size:member",
43654
- "docComment": "/**\n * The size of each voxel in the collider.\n */\n",
43655
- "excerptTokens": [
43656
- {
43657
- "kind": "Content",
43658
- "text": "size?: "
43659
- },
43660
- {
43661
- "kind": "Reference",
43662
- "text": "Vector3Like",
43663
- "canonicalReference": "server!Vector3Like:interface"
43664
- },
43665
- {
43666
- "kind": "Content",
43667
- "text": ";"
43668
- }
43669
- ],
43670
- "isReadonly": false,
43671
- "isOptional": true,
43672
- "releaseTag": "Public",
43673
- "name": "size",
43674
- "propertyTypeTokenRange": {
43675
- "startIndex": 1,
43676
- "endIndex": 2
43677
- }
43678
- }
43679
- ],
43680
- "extendsTokenRanges": [
43681
- {
43682
- "startIndex": 1,
43683
- "endIndex": 2
43684
- }
43685
- ]
43686
- },
43687
43472
  {
43688
43473
  "kind": "TypeAlias",
43689
43474
  "canonicalReference": "server!WaypointMoveCompleteCallback:type",
package/server.d.ts CHANGED
@@ -609,7 +609,7 @@ export declare class BlockType extends EventRouter implements protocol.Serializa
609
609
  /** The unique identifier for the block type. */
610
610
  get id(): number;
611
611
  /** The collider options for the block type. */
612
- get colliderOptions(): VoxelsColliderOptions;
612
+ get colliderOptions(): TrimeshColliderOptions;
613
613
  /** Whether the block type is a liquid. */
614
614
  get isLiquid(): boolean;
615
615
  /** Whether the block type is meshable. */
@@ -651,7 +651,7 @@ export declare interface BlockTypeOptions {
651
651
  /** The unique numeric identifier for the block type. */
652
652
  id: number;
653
653
  /** The custom collider options for the block type. */
654
- customColliderOptions?: VoxelsColliderOptions;
654
+ customColliderOptions?: TrimeshColliderOptions;
655
655
  /** Whether the block type is a liquid. */
656
656
  isLiquid?: boolean;
657
657
  /** The name of the block type. */
@@ -880,23 +880,19 @@ export declare class Chunk extends EventRouter implements protocol.Serializable
880
880
 
881
881
 
882
882
 
883
-
884
-
885
-
886
-
887
883
  /**
888
884
  * Creates a new chunk instance.
889
885
  */
890
886
  constructor();
891
887
  /** The blocks in the chunk as a flat Uint8Array[4096], each index as 0 or a block type id. */
892
888
  get blocks(): Readonly<Uint8Array>;
889
+
893
890
  /** Whether the chunk is actively simulated in the internal physics engine. */
894
891
  get isSimulated(): boolean;
895
892
  /** Whether the chunk has been spawned. */
896
893
  get isSpawned(): boolean;
897
894
  /** The origin coordinate of the chunk. */
898
895
  get originCoordinate(): Vector3Like | undefined;
899
-
900
896
  /** The world the chunk belongs to. */
901
897
  get world(): World | undefined;
902
898
  /**
@@ -954,6 +950,8 @@ export declare class Chunk extends EventRouter implements protocol.Serializable
954
950
 
955
951
 
956
952
 
953
+ private _meshColliders;
954
+
957
955
 
958
956
 
959
957
 
@@ -1203,12 +1201,6 @@ export declare class Collider extends EventRouter {
1203
1201
  * @param tag - The tag of the collider.
1204
1202
  */
1205
1203
  setTag(tag: string): void;
1206
- /**
1207
- * Sets the voxel at the given coordinate as filled or not filled.
1208
- * @param coordinate - The coordinate of the voxel to set.
1209
- * @param filled - True if the voxel at the coordinate should be filled, false if it should be removed.
1210
- */
1211
- setVoxel(coordinate: Vector3Like, filled: boolean): void;
1212
1204
  /**
1213
1205
  * Adds the collider to the simulation.
1214
1206
  * @param simulation - The simulation to add the collider to.
@@ -1239,11 +1231,10 @@ export declare class Collider extends EventRouter {
1239
1231
 
1240
1232
 
1241
1233
 
1242
-
1243
1234
  }
1244
1235
 
1245
1236
  /** The options for a collider. @public */
1246
- export declare type ColliderOptions = BallColliderOptions | BlockColliderOptions | CapsuleColliderOptions | ConeColliderOptions | CylinderColliderOptions | RoundCylinderColliderOptions | TrimeshColliderOptions | VoxelsColliderOptions | WedgeColliderOptions | NoneColliderOptions;
1237
+ export declare type ColliderOptions = BallColliderOptions | BlockColliderOptions | CapsuleColliderOptions | ConeColliderOptions | CylinderColliderOptions | RoundCylinderColliderOptions | TrimeshColliderOptions | WedgeColliderOptions | NoneColliderOptions;
1247
1238
 
1248
1239
  /** The shapes a collider can be. @public */
1249
1240
  export declare enum ColliderShape {
@@ -1255,7 +1246,6 @@ export declare enum ColliderShape {
1255
1246
  CYLINDER = "cylinder",
1256
1247
  ROUND_CYLINDER = "round-cylinder",
1257
1248
  TRIMESH = "trimesh",
1258
- VOXELS = "voxels",
1259
1249
  WEDGE = "wedge"
1260
1250
  }
1261
1251
 
@@ -5632,15 +5622,6 @@ export declare interface Vector3Like {
5632
5622
  z: number;
5633
5623
  }
5634
5624
 
5635
- /** The options for a voxels collider. @public */
5636
- export declare interface VoxelsColliderOptions extends BaseColliderOptions {
5637
- shape: ColliderShape.VOXELS;
5638
- /** The coordinate of each voxel in the collider. */
5639
- coordinates?: Vector3Like[];
5640
- /** The size of each voxel in the collider. */
5641
- size?: Vector3Like;
5642
- }
5643
-
5644
5625
  /**
5645
5626
  * A callback function called when the entity associated with the
5646
5627
  * PathfindingEntityController finishes moving to a calculate waypoint