hytopia 0.3.10 → 0.3.11

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 (140) hide show
  1. package/docs/server.ballcollideroptions.md +75 -0
  2. package/docs/server.ballcollideroptions.radius.md +13 -0
  3. package/docs/server.ballcollideroptions.shape.md +11 -0
  4. package/docs/server.basecollideroptions.bounciness.md +13 -0
  5. package/docs/server.basecollideroptions.bouncinesscombinerule.md +13 -0
  6. package/docs/server.basecollideroptions.collisiongroups.md +13 -0
  7. package/docs/server.basecollideroptions.enabled.md +13 -0
  8. package/docs/server.basecollideroptions.flags.md +13 -0
  9. package/docs/server.basecollideroptions.friction.md +13 -0
  10. package/docs/server.basecollideroptions.frictioncombinerule.md +13 -0
  11. package/docs/server.basecollideroptions.issensor.md +13 -0
  12. package/docs/server.basecollideroptions.mass.md +13 -0
  13. package/docs/server.basecollideroptions.md +342 -0
  14. package/docs/server.basecollideroptions.oncollision.md +13 -0
  15. package/docs/server.basecollideroptions.parentrigidbody.md +13 -0
  16. package/docs/server.basecollideroptions.relativeposition.md +13 -0
  17. package/docs/server.basecollideroptions.relativerotation.md +13 -0
  18. package/docs/server.basecollideroptions.shape.md +13 -0
  19. package/docs/{server.collideroptions.simulation.md → server.basecollideroptions.simulation.md} +2 -2
  20. package/docs/{server.collideroptions.tag.md → server.basecollideroptions.tag.md} +2 -2
  21. package/docs/{server.rigidbodyoptions.colliders.md → server.baserigidbodyoptions.colliders.md} +2 -2
  22. package/docs/server.baserigidbodyoptions.enabled.md +13 -0
  23. package/docs/server.baserigidbodyoptions.md +152 -0
  24. package/docs/server.baserigidbodyoptions.position.md +13 -0
  25. package/docs/server.baserigidbodyoptions.rotation.md +13 -0
  26. package/docs/{server.rigidbodyoptions.simulation.md → server.baserigidbodyoptions.simulation.md} +2 -2
  27. package/docs/server.baserigidbodyoptions.type.md +13 -0
  28. package/docs/server.blockcollideroptions.halfextents.md +13 -0
  29. package/docs/server.blockcollideroptions.md +75 -0
  30. package/docs/server.blockcollideroptions.shape.md +11 -0
  31. package/docs/server.blocktype.collideroptions.md +1 -1
  32. package/docs/server.blocktype.md +1 -1
  33. package/docs/server.blocktypeoptions.customcollideroptions.md +1 -1
  34. package/docs/server.blocktypeoptions.md +1 -1
  35. package/docs/server.capsulecollideroptions.halfheight.md +13 -0
  36. package/docs/server.capsulecollideroptions.md +94 -0
  37. package/docs/server.capsulecollideroptions.radius.md +13 -0
  38. package/docs/server.capsulecollideroptions.shape.md +11 -0
  39. package/docs/server.collideroptions.md +4 -445
  40. package/docs/server.collidershape.md +14 -0
  41. package/docs/server.conecollideroptions.halfheight.md +13 -0
  42. package/docs/server.conecollideroptions.md +94 -0
  43. package/docs/server.conecollideroptions.radius.md +13 -0
  44. package/docs/server.conecollideroptions.shape.md +11 -0
  45. package/docs/server.cylindercollideroptions.halfheight.md +13 -0
  46. package/docs/server.cylindercollideroptions.md +94 -0
  47. package/docs/server.cylindercollideroptions.radius.md +13 -0
  48. package/docs/server.cylindercollideroptions.shape.md +11 -0
  49. package/docs/server.dynamicrigidbodyoptions.additionalmass.md +13 -0
  50. package/docs/server.dynamicrigidbodyoptions.additionalmassproperties.md +13 -0
  51. package/docs/server.dynamicrigidbodyoptions.additionalsolveriterations.md +13 -0
  52. package/docs/server.dynamicrigidbodyoptions.angulardamping.md +13 -0
  53. package/docs/server.dynamicrigidbodyoptions.angularvelocity.md +13 -0
  54. package/docs/server.dynamicrigidbodyoptions.ccdenabled.md +13 -0
  55. package/docs/server.dynamicrigidbodyoptions.dominancegroup.md +13 -0
  56. package/docs/server.dynamicrigidbodyoptions.enabledpositions.md +13 -0
  57. package/docs/server.dynamicrigidbodyoptions.enabledrotations.md +13 -0
  58. package/docs/server.dynamicrigidbodyoptions.gravityscale.md +13 -0
  59. package/docs/server.dynamicrigidbodyoptions.lineardamping.md +13 -0
  60. package/docs/server.dynamicrigidbodyoptions.linearvelocity.md +13 -0
  61. package/docs/server.dynamicrigidbodyoptions.md +324 -0
  62. package/docs/server.dynamicrigidbodyoptions.sleeping.md +13 -0
  63. package/docs/server.dynamicrigidbodyoptions.softccdprediction.md +13 -0
  64. package/docs/server.dynamicrigidbodyoptions.type.md +11 -0
  65. package/docs/server.errorhandler.error.md +69 -0
  66. package/docs/server.errorhandler.fatalerror.md +73 -0
  67. package/docs/server.errorhandler.md +81 -0
  68. package/docs/server.errorhandler.warning.md +69 -0
  69. package/docs/server.fixedrigidbodyoptions.md +56 -0
  70. package/docs/server.fixedrigidbodyoptions.type.md +11 -0
  71. package/docs/server.kinematicpositionrigidbodyoptions.md +56 -0
  72. package/docs/server.kinematicpositionrigidbodyoptions.type.md +11 -0
  73. package/docs/server.kinematicvelocityrigidbodyoptions.angularvelocity.md +13 -0
  74. package/docs/server.kinematicvelocityrigidbodyoptions.linearvelocity.md +13 -0
  75. package/docs/server.kinematicvelocityrigidbodyoptions.md +94 -0
  76. package/docs/server.kinematicvelocityrigidbodyoptions.type.md +11 -0
  77. package/docs/server.md +169 -4
  78. package/docs/server.nonecollideroptions.md +56 -0
  79. package/docs/server.nonecollideroptions.shape.md +11 -0
  80. package/docs/server.rigidbodyoptions.md +4 -407
  81. package/docs/server.roundcylindercollideroptions.borderradius.md +13 -0
  82. package/docs/server.roundcylindercollideroptions.halfheight.md +13 -0
  83. package/docs/server.roundcylindercollideroptions.md +113 -0
  84. package/docs/server.roundcylindercollideroptions.radius.md +13 -0
  85. package/docs/server.roundcylindercollideroptions.shape.md +11 -0
  86. package/docs/server.trimeshcollideroptions.indices.md +13 -0
  87. package/docs/server.trimeshcollideroptions.md +94 -0
  88. package/docs/server.trimeshcollideroptions.shape.md +11 -0
  89. package/docs/server.trimeshcollideroptions.vertices.md +13 -0
  90. package/examples/hygrounds/classes/ChestEntity.ts +2 -1
  91. package/examples/hygrounds/classes/weapons/PistolEntity.ts +2 -2
  92. package/examples/hygrounds/classes/weapons/RevolverEntity.ts +1 -1
  93. package/examples/hygrounds/classes/weapons/RocketLauncherEntity.ts +1 -1
  94. package/examples/hygrounds/classes/weapons/ShotgunEntity.ts +2 -2
  95. package/examples/hygrounds/gameConfig.ts +1 -1
  96. package/examples/hygrounds/hygrounds-10.zip +0 -0
  97. package/examples/zombies-fps/classes/PurchaseBarrierEntity.ts +2 -2
  98. package/examples/zombies-fps/classes/WeaponCrateEntity.ts +2 -1
  99. package/package.json +1 -1
  100. package/server.api.json +5781 -4440
  101. package/server.d.ts +207 -94
  102. package/server.js +118 -113
  103. package/docs/server.collideroptions.borderradius.md +0 -13
  104. package/docs/server.collideroptions.bounciness.md +0 -13
  105. package/docs/server.collideroptions.bouncinesscombinerule.md +0 -13
  106. package/docs/server.collideroptions.collisiongroups.md +0 -13
  107. package/docs/server.collideroptions.enabled.md +0 -13
  108. package/docs/server.collideroptions.flags.md +0 -13
  109. package/docs/server.collideroptions.friction.md +0 -13
  110. package/docs/server.collideroptions.frictioncombinerule.md +0 -13
  111. package/docs/server.collideroptions.halfextents.md +0 -13
  112. package/docs/server.collideroptions.halfheight.md +0 -13
  113. package/docs/server.collideroptions.indices.md +0 -13
  114. package/docs/server.collideroptions.issensor.md +0 -13
  115. package/docs/server.collideroptions.mass.md +0 -13
  116. package/docs/server.collideroptions.oncollision.md +0 -13
  117. package/docs/server.collideroptions.parentrigidbody.md +0 -13
  118. package/docs/server.collideroptions.radius.md +0 -13
  119. package/docs/server.collideroptions.relativeposition.md +0 -13
  120. package/docs/server.collideroptions.relativerotation.md +0 -13
  121. package/docs/server.collideroptions.shape.md +0 -13
  122. package/docs/server.collideroptions.vertices.md +0 -13
  123. package/docs/server.rigidbodyoptions.additionalmass.md +0 -13
  124. package/docs/server.rigidbodyoptions.additionalmassproperties.md +0 -13
  125. package/docs/server.rigidbodyoptions.additionalsolveriterations.md +0 -13
  126. package/docs/server.rigidbodyoptions.angulardamping.md +0 -13
  127. package/docs/server.rigidbodyoptions.angularvelocity.md +0 -13
  128. package/docs/server.rigidbodyoptions.ccdenabled.md +0 -13
  129. package/docs/server.rigidbodyoptions.dominancegroup.md +0 -13
  130. package/docs/server.rigidbodyoptions.enabled.md +0 -13
  131. package/docs/server.rigidbodyoptions.enabledpositions.md +0 -13
  132. package/docs/server.rigidbodyoptions.enabledrotations.md +0 -13
  133. package/docs/server.rigidbodyoptions.gravityscale.md +0 -13
  134. package/docs/server.rigidbodyoptions.lineardamping.md +0 -13
  135. package/docs/server.rigidbodyoptions.linearvelocity.md +0 -13
  136. package/docs/server.rigidbodyoptions.position.md +0 -13
  137. package/docs/server.rigidbodyoptions.rotation.md +0 -13
  138. package/docs/server.rigidbodyoptions.sleeping.md +0 -13
  139. package/docs/server.rigidbodyoptions.softccdprediction.md +0 -13
  140. package/docs/server.rigidbodyoptions.type.md +0 -13
package/server.d.ts CHANGED
@@ -305,6 +305,49 @@ export declare interface AudioOptions {
305
305
  volume?: number;
306
306
  }
307
307
 
308
+ /** The options for a ball collider. @public */
309
+ export declare interface BallColliderOptions extends BaseColliderOptions {
310
+ shape: ColliderShape.BALL;
311
+ /** The radius of the ball collider. */
312
+ radius?: number;
313
+ }
314
+
315
+ /** The base options for a collider. @public */
316
+ export declare interface BaseColliderOptions {
317
+ /** The shape of the collider. */
318
+ shape: ColliderShape;
319
+ /** The bounciness of the collider. */
320
+ bounciness?: number;
321
+ /** The bounciness combine rule of the collider. */
322
+ bouncinessCombineRule?: CoefficientCombineRule;
323
+ /** The collision groups the collider belongs to. */
324
+ collisionGroups?: CollisionGroups;
325
+ /** Whether the collider is enabled. */
326
+ enabled?: boolean;
327
+ /** The flags of the collider if the shape is a trimesh */
328
+ flags?: number;
329
+ /** The friction of the collider. */
330
+ friction?: number;
331
+ /** The friction combine rule of the collider. */
332
+ frictionCombineRule?: CoefficientCombineRule;
333
+ /** Whether the collider is a sensor. */
334
+ isSensor?: boolean;
335
+ /** The mass of the collider. */
336
+ mass?: number;
337
+ /** The on collision callback for the collider. */
338
+ onCollision?: CollisionCallback;
339
+ /** The parent rigid body of the collider. */
340
+ parentRigidBody?: RigidBody;
341
+ /** The relative position of the collider. Relative to parent rigid body. */
342
+ relativePosition?: Vector3Like;
343
+ /** The relative rotation of the collider. Relative to parent rigid body. */
344
+ relativeRotation?: QuaternionLike;
345
+ /** The simulation the collider is in, if provided the collider will automatically be added to the simulation. */
346
+ simulation?: Simulation;
347
+ /** An arbitrary identifier tag of the collider. Useful for your own logic. */
348
+ tag?: string;
349
+ }
350
+
308
351
  /**
309
352
  * A base class for entity controller implementations.
310
353
  *
@@ -410,6 +453,22 @@ export declare interface BaseEntityControllerEventPayloads {
410
453
  };
411
454
  }
412
455
 
456
+ /** The base options for a rigid body. @public */
457
+ export declare interface BaseRigidBodyOptions {
458
+ /** The type of the rigid body, defaults to {@link RigidBodyType.DYNAMIC}. */
459
+ type?: RigidBodyType;
460
+ /** The colliders of the rigid body, provided as {@link ColliderOptions}. */
461
+ colliders?: ColliderOptions[];
462
+ /** Whether the rigid body is enabled. */
463
+ enabled?: boolean;
464
+ /** The position of the rigid body. */
465
+ position?: Vector3Like;
466
+ /** The rotation of the rigid body. */
467
+ rotation?: QuaternionLike;
468
+ /** The simulation the rigid body is in. If provided, the rigid body will be automatically added to the simulation. */
469
+ simulation?: Simulation;
470
+ }
471
+
413
472
  /**
414
473
  * Represents a block in a world.
415
474
  *
@@ -437,6 +496,13 @@ export declare class Block {
437
496
  getNeighborGlobalCoordinateFromHitPoint(hitPoint: Vector3Like): Vector3Like;
438
497
  }
439
498
 
499
+ /** The options for a block collider. @public */
500
+ export declare interface BlockColliderOptions extends BaseColliderOptions {
501
+ shape: ColliderShape.BLOCK;
502
+ /** The half extents of the block collider. */
503
+ halfExtents?: Vector3Like;
504
+ }
505
+
440
506
  /**
441
507
  * Represents a block type.
442
508
  *
@@ -483,7 +549,7 @@ export declare class BlockType extends EventRouter implements protocol.Serializa
483
549
  /** The unique identifier for the block type. */
484
550
  get id(): number;
485
551
  /** The collider options for the block type. */
486
- get colliderOptions(): ColliderOptions;
552
+ get colliderOptions(): TrimeshColliderOptions;
487
553
  /** Whether the block type is a liquid. */
488
554
  get isLiquid(): boolean;
489
555
  /** Whether the block type is meshable. */
@@ -525,7 +591,7 @@ export declare interface BlockTypeOptions {
525
591
  /** The unique numeric identifier for the block type. */
526
592
  id: number;
527
593
  /** The custom collider options for the block type. */
528
- customColliderOptions?: ColliderOptions;
594
+ customColliderOptions?: TrimeshColliderOptions;
529
595
  /** Whether the block type is a liquid. */
530
596
  isLiquid?: boolean;
531
597
  /** The name of the block type. */
@@ -605,6 +671,15 @@ export declare interface BlockTypeRegistryEventPayloads {
605
671
  };
606
672
  }
607
673
 
674
+ /** The options for a capsule collider. @public */
675
+ export declare interface CapsuleColliderOptions extends BaseColliderOptions {
676
+ shape: ColliderShape.CAPSULE;
677
+ /** The half height of the capsule collider. */
678
+ halfHeight?: number;
679
+ /** The radius of the capsule collider. */
680
+ radius?: number;
681
+ }
682
+
608
683
  /** Event types a ChatManager instance can emit. See {@link ChatEventPayloads} for the payloads. @public */
609
684
  export declare enum ChatEvent {
610
685
  BROADCAST_MESSAGE = "CHAT.BROADCAST_MESSAGE",
@@ -1089,56 +1164,12 @@ export declare class Collider extends EventRouter {
1089
1164
 
1090
1165
  }
1091
1166
 
1092
- /** Options for creating a Collider instance. @public */
1093
- export declare interface ColliderOptions {
1094
- /** The shape of the collider. */
1095
- shape: ColliderShape;
1096
- /** The border radius of the collider if the shape is a round cylinder. */
1097
- borderRadius?: number;
1098
- /** The bounciness of the collider. */
1099
- bounciness?: number;
1100
- /** The bounciness combine rule of the collider. */
1101
- bouncinessCombineRule?: CoefficientCombineRule;
1102
- /** The collision groups the collider belongs to. */
1103
- collisionGroups?: CollisionGroups;
1104
- /** Whether the collider is enabled. */
1105
- enabled?: boolean;
1106
- /** The flags of the collider if the shape is a trimesh */
1107
- flags?: number;
1108
- /** The friction of the collider. */
1109
- friction?: number;
1110
- /** The friction combine rule of the collider. */
1111
- frictionCombineRule?: CoefficientCombineRule;
1112
- /** The half extents of the collider if the shape is a block. */
1113
- halfExtents?: Vector3Like;
1114
- /** The half height of the collider if the shape is a capsule, cone, cylinder, or round cylinder. */
1115
- halfHeight?: number;
1116
- /** The indices of the collider if the shape is a trimesh. */
1117
- indices?: Uint32Array;
1118
- /** Whether the collider is a sensor. */
1119
- isSensor?: boolean;
1120
- /** The mass of the collider. */
1121
- mass?: number;
1122
- /** The on collision callback for the collider. */
1123
- onCollision?: CollisionCallback;
1124
- /** The parent rigid body of the collider. */
1125
- parentRigidBody?: RigidBody;
1126
- /** The radius of the collider if the shape is a ball, capsule, cone, cylinder, or round cylinder. */
1127
- radius?: number;
1128
- /** The relative position of the collider. Relative to parent rigid body. */
1129
- relativePosition?: Vector3Like;
1130
- /** The relative rotation of the collider. Relative to parent rigid body. */
1131
- relativeRotation?: QuaternionLike;
1132
- /** The simulation the collider is in, if provided the collider will automatically be added to the simulation. */
1133
- simulation?: Simulation;
1134
- /** An arbitrary identifier tag of the collider. Useful for your own logic. */
1135
- tag?: string;
1136
- /** The vertices of the collider if the shape is a trimesh. */
1137
- vertices?: Float32Array;
1138
- }
1167
+ /** The options for a collider. @public */
1168
+ export declare type ColliderOptions = BallColliderOptions | BlockColliderOptions | CapsuleColliderOptions | ConeColliderOptions | CylinderColliderOptions | RoundCylinderColliderOptions | TrimeshColliderOptions | NoneColliderOptions;
1139
1169
 
1140
1170
  /** The shapes a collider can be. @public */
1141
1171
  export declare enum ColliderShape {
1172
+ NONE = "none",
1142
1173
  BALL = "ball",
1143
1174
  BLOCK = "block",
1144
1175
  CAPSULE = "capsule",
@@ -1265,6 +1296,15 @@ export declare class CollisionGroupsBuilder {
1265
1296
  */
1266
1297
  export declare type CommandCallback = (player: Player, args: string[], message: string) => void;
1267
1298
 
1299
+ /** The options for a cone collider. @public */
1300
+ export declare interface ConeColliderOptions extends BaseColliderOptions {
1301
+ shape: ColliderShape.CONE;
1302
+ /** The half height of the cone collider. */
1303
+ halfHeight?: number;
1304
+ /** The radius of the cone collider. */
1305
+ radius?: number;
1306
+ }
1307
+
1268
1308
  /** Data for contact forces. @public */
1269
1309
  export declare type ContactForceData = {
1270
1310
  /** The total force vector. */
@@ -1289,6 +1329,15 @@ export declare type ContactManifold = {
1289
1329
  normal: Vector3Like;
1290
1330
  };
1291
1331
 
1332
+ /** The options for a cylinder collider. @public */
1333
+ export declare interface CylinderColliderOptions extends BaseColliderOptions {
1334
+ shape: ColliderShape.CYLINDER;
1335
+ /** The half height of the cylinder collider. */
1336
+ halfHeight?: number;
1337
+ /** The radius of the cylinder collider. */
1338
+ radius?: number;
1339
+ }
1340
+
1292
1341
  /** A decoded set of collision groups represented as their string equivalents. @public */
1293
1342
  export declare type DecodedCollisionGroups = {
1294
1343
  belongsTo: string[];
@@ -1298,6 +1347,39 @@ export declare type DecodedCollisionGroups = {
1298
1347
  /** The default rigid body options for a model entity when EntityOptions.rigidBodyOptions is not provided. @public */
1299
1348
  export declare const DEFAULT_ENTITY_RIGID_BODY_OPTIONS: RigidBodyOptions;
1300
1349
 
1350
+ /** The options for a dynamic rigid body, also the default type. @public */
1351
+ export declare interface DynamicRigidBodyOptions extends BaseRigidBodyOptions {
1352
+ type?: RigidBodyType.DYNAMIC;
1353
+ /** The additional mass of the rigid body. */
1354
+ additionalMass?: number;
1355
+ /** The additional mass properties of the rigid body. */
1356
+ additionalMassProperties?: RigidBodyAdditionalMassProperties;
1357
+ /** The additional solver iterations of the rigid body. */
1358
+ additionalSolverIterations?: number;
1359
+ /** The angular damping of the rigid body. */
1360
+ angularDamping?: number;
1361
+ /** The angular velocity of the rigid body. */
1362
+ angularVelocity?: Vector3Like;
1363
+ /** Whether the rigid body has continuous collision detection enabled. */
1364
+ ccdEnabled?: boolean;
1365
+ /** The dominance group of the rigid body. */
1366
+ dominanceGroup?: number;
1367
+ /** The enabled axes of positional movement of the rigid body. */
1368
+ enabledPositions?: Vector3Boolean;
1369
+ /** The enabled rotations of the rigid body. */
1370
+ enabledRotations?: Vector3Boolean;
1371
+ /** The gravity scale of the rigid body. */
1372
+ gravityScale?: number;
1373
+ /** The linear damping of the rigid body. */
1374
+ linearDamping?: number;
1375
+ /** The linear velocity of the rigid body. */
1376
+ linearVelocity?: Vector3Like;
1377
+ /** Whether the rigid body is sleeping. */
1378
+ sleeping?: boolean;
1379
+ /** The soft continuous collision detection prediction of the rigid body. */
1380
+ softCcdPrediction?: number;
1381
+ }
1382
+
1301
1383
  /**
1302
1384
  * Represents an entity in a world.
1303
1385
  *
@@ -1726,6 +1808,36 @@ export declare interface EntityOptions {
1726
1808
  tintColor?: RgbColor;
1727
1809
  }
1728
1810
 
1811
+ /**
1812
+ * Manages error and warning logging.
1813
+ *
1814
+ * @public
1815
+ */
1816
+ export declare class ErrorHandler {
1817
+ private static errorCount;
1818
+ private static warningCount;
1819
+ /**
1820
+ * Logs a formatted warning message to alert about potential issues
1821
+ * @param message - The warning message to display
1822
+ * @param context - Optional context information about the warning
1823
+ */
1824
+ static warning(message: string, context?: string): void;
1825
+ /**
1826
+ * Logs a formatted error message with stack trace to help debug issues
1827
+ * @param message - The error message to display
1828
+ * @param context - Optional context information about the error
1829
+ */
1830
+ static error(message: string, context?: string): void;
1831
+ /**
1832
+ * Logs a formatted fatal error message with stack trace and throws the error
1833
+ * @param message - The error message to display
1834
+ * @param context - Optional context information about the error
1835
+ * @throws The created Error object
1836
+ */
1837
+ static fatalError(message: string, context?: string): never;
1838
+
1839
+ }
1840
+
1729
1841
  /**
1730
1842
  * The payloads for all events in the game server.
1731
1843
  *
@@ -1858,6 +1970,11 @@ export declare type FaceOptions = {
1858
1970
  faceCompleteCallback?: FaceCompleteCallback;
1859
1971
  };
1860
1972
 
1973
+ /** The options for a fixed rigid body. @public */
1974
+ export declare interface FixedRigidBodyOptions extends BaseRigidBodyOptions {
1975
+ type: RigidBodyType.FIXED;
1976
+ }
1977
+
1861
1978
  /**
1862
1979
  * Manages the game and associated worlds and systems.
1863
1980
  *
@@ -1910,6 +2027,20 @@ export declare interface GameServerEventPayloads {
1910
2027
  };
1911
2028
  }
1912
2029
 
2030
+ /** The options for a kinematic position rigid body. @public */
2031
+ export declare interface KinematicPositionRigidBodyOptions extends BaseRigidBodyOptions {
2032
+ type: RigidBodyType.KINEMATIC_POSITION;
2033
+ }
2034
+
2035
+ /** The options for a kinematic velocity rigid body. @public */
2036
+ export declare interface KinematicVelocityRigidBodyOptions extends BaseRigidBodyOptions {
2037
+ type: RigidBodyType.KINEMATIC_VELOCITY;
2038
+ /** The angular velocity of the rigid body. */
2039
+ angularVelocity?: Vector3Like;
2040
+ /** The linear velocity of the rigid body. */
2041
+ linearVelocity?: Vector3Like;
2042
+ }
2043
+
1913
2044
  /**
1914
2045
  * Represents a light in a world. Lights can be point lights
1915
2046
  * or spotlights.
@@ -2897,6 +3028,11 @@ export declare type MoveOptions = {
2897
3028
  };
2898
3029
  };
2899
3030
 
3031
+ /** The options for an error type "none" collider. @public */
3032
+ export declare interface NoneColliderOptions extends BaseColliderOptions {
3033
+ shape: ColliderShape.NONE;
3034
+ }
3035
+
2900
3036
  /**
2901
3037
  * A callback function called when the pathfinding algorithm aborts.
2902
3038
  * @public
@@ -4321,8 +4457,6 @@ export declare class RigidBody extends EventRouter {
4321
4457
 
4322
4458
 
4323
4459
 
4324
-
4325
-
4326
4460
  }
4327
4461
 
4328
4462
  /** Additional mass properties for a RigidBody. @public */
@@ -4333,49 +4467,8 @@ export declare type RigidBodyAdditionalMassProperties = {
4333
4467
  principalAngularInertiaLocalFrame: QuaternionLike;
4334
4468
  };
4335
4469
 
4336
- /** Options for creating a RigidBody instance. @public */
4337
- export declare interface RigidBodyOptions {
4338
- /** The type of the rigid body. */
4339
- type?: RigidBodyType;
4340
- /** The additional mass of the rigid body. */
4341
- additionalMass?: number;
4342
- /** The additional mass properties of the rigid body. */
4343
- additionalMassProperties?: RigidBodyAdditionalMassProperties;
4344
- /** The additional solver iterations of the rigid body. */
4345
- additionalSolverIterations?: number;
4346
- /** The angular damping of the rigid body. */
4347
- angularDamping?: number;
4348
- /** The angular velocity of the rigid body. */
4349
- angularVelocity?: Vector3Like;
4350
- /** Whether the rigid body has continuous collision detection enabled. */
4351
- ccdEnabled?: boolean;
4352
- /** The colliders of the rigid body, provided as {@link ColliderOptions}. */
4353
- colliders?: ColliderOptions[];
4354
- /** The dominance group of the rigid body. */
4355
- dominanceGroup?: number;
4356
- /** Whether the rigid body is enabled. */
4357
- enabled?: boolean;
4358
- /** The enabled axes of positional movement of the rigid body. */
4359
- enabledPositions?: Vector3Boolean;
4360
- /** The enabled rotations of the rigid body. */
4361
- enabledRotations?: Vector3Boolean;
4362
- /** The gravity scale of the rigid body. */
4363
- gravityScale?: number;
4364
- /** The linear damping of the rigid body. */
4365
- linearDamping?: number;
4366
- /** The linear velocity of the rigid body. */
4367
- linearVelocity?: Vector3Like;
4368
- /** The position of the rigid body. */
4369
- position?: Vector3Like;
4370
- /** The rotation of the rigid body. */
4371
- rotation?: QuaternionLike;
4372
- /** The simulation the rigid body is in. If provided, the rigid body will be automatically added to the simulation. */
4373
- simulation?: Simulation;
4374
- /** Whether the rigid body is sleeping. */
4375
- sleeping?: boolean;
4376
- /** The soft continuous collision detection prediction of the rigid body. */
4377
- softCcdPrediction?: number;
4378
- }
4470
+ /** The options for a rigid body. @public */
4471
+ export declare type RigidBodyOptions = DynamicRigidBodyOptions | FixedRigidBodyOptions | KinematicPositionRigidBodyOptions | KinematicVelocityRigidBodyOptions;
4379
4472
 
4380
4473
  /** The types a RigidBody can be. @public */
4381
4474
  export declare enum RigidBodyType {
@@ -4385,6 +4478,17 @@ export declare enum RigidBodyType {
4385
4478
  KINEMATIC_VELOCITY = "kinematic_velocity"
4386
4479
  }
4387
4480
 
4481
+ /** The options for a round cylinder collider. @public */
4482
+ export declare interface RoundCylinderColliderOptions extends BaseColliderOptions {
4483
+ shape: ColliderShape.ROUND_CYLINDER;
4484
+ /** The border radius of the round cylinder collider. */
4485
+ borderRadius?: number;
4486
+ /** The half height of the round cylinder collider. */
4487
+ halfHeight?: number;
4488
+ /** The radius of the round cylinder collider. */
4489
+ radius?: number;
4490
+ }
4491
+
4388
4492
  /**
4389
4493
  * UI rendered within the 3D space of a world's
4390
4494
  * game scene.
@@ -4823,6 +4927,15 @@ export declare function startServer(init: (world: World) => void): void;
4823
4927
  /** The input keys that are included in the PlayerInput. @public */
4824
4928
  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"];
4825
4929
 
4930
+ /** The options for a trimesh collider. @public */
4931
+ export declare interface TrimeshColliderOptions extends BaseColliderOptions {
4932
+ shape: ColliderShape.TRIMESH;
4933
+ /** The indices of the trimesh collider. */
4934
+ indices?: Uint32Array;
4935
+ /** The vertices of the trimesh collider. */
4936
+ vertices?: Float32Array;
4937
+ }
4938
+
4826
4939
  /**
4827
4940
  * Represents a 2D vector.
4828
4941
  *