hytopia 0.6.9 → 0.6.10

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 (59) hide show
  1. package/bun-server.mjs +158 -158
  2. package/docs/server.collider.md +22 -1
  3. package/docs/server.collider.rawcollider.md +1 -1
  4. package/docs/server.collider.rawshape.md +13 -0
  5. package/docs/server.defaultplayerentitycontroller.faceforwardonstop.md +13 -0
  6. package/docs/server.defaultplayerentitycontroller.md +19 -0
  7. package/docs/server.defaultplayerentitycontrolleroptions.faceforwardonstop.md +13 -0
  8. package/docs/server.defaultplayerentitycontrolleroptions.md +19 -0
  9. package/docs/server.dynamicrigidbodyoptions.md +1 -3
  10. package/docs/server.dynamicrigidbodyoptions.type.md +1 -1
  11. package/docs/server.entity.md +35 -0
  12. package/docs/server.entity.modelshownnodes.md +13 -0
  13. package/docs/server.entity.setmodelshownnodes.md +53 -0
  14. package/docs/server.entityevent.md +14 -0
  15. package/docs/server.entityeventpayloads._entity.set_model_hidden_nodes_.md +1 -1
  16. package/docs/server.entityeventpayloads._entity.set_model_shown_nodes_.md +16 -0
  17. package/docs/server.entityeventpayloads.md +20 -1
  18. package/docs/server.eventrouter.emit_1.md +63 -0
  19. package/docs/server.eventrouter.emitwithglobal_1.md +63 -0
  20. package/docs/server.eventrouter.emitwithworld_1.md +77 -0
  21. package/docs/server.eventrouter.final_1.md +63 -0
  22. package/docs/server.eventrouter.globalinstance.md +13 -0
  23. package/docs/server.eventrouter.haslisteners.md +2 -2
  24. package/docs/server.eventrouter.haslisteners_1.md +49 -0
  25. package/docs/server.eventrouter.listenercount.md +2 -2
  26. package/docs/server.eventrouter.listenercount_1.md +49 -0
  27. package/docs/server.eventrouter.listeners.md +2 -2
  28. package/docs/server.eventrouter.listeners_1.md +49 -0
  29. package/docs/server.eventrouter.md +180 -0
  30. package/docs/server.eventrouter.off_1.md +63 -0
  31. package/docs/server.eventrouter.offall.md +2 -2
  32. package/docs/server.eventrouter.offall_1.md +51 -0
  33. package/docs/server.eventrouter.on_1.md +63 -0
  34. package/docs/server.eventrouter.once_1.md +63 -0
  35. package/docs/server.filteroptions.md +21 -0
  36. package/docs/server.intersectionresult.md +18 -0
  37. package/docs/server.md +44 -0
  38. package/docs/server.modelentityoptions.md +19 -0
  39. package/docs/server.modelentityoptions.modelshownnodes.md +13 -0
  40. package/docs/server.moveoptions.md +1 -0
  41. package/docs/server.pathfindingoptions.md +1 -0
  42. package/docs/server.playercamera.facingquaternion.md +13 -0
  43. package/docs/server.playercamera.md +56 -0
  44. package/docs/server.playercamera.modelshownnodes.md +13 -0
  45. package/docs/server.playercamera.setmodelshownnodes.md +53 -0
  46. package/docs/server.playercameraevent.md +14 -0
  47. package/docs/server.playercameraeventpayloads._player_camera.set_model_shown_nodes_.md +16 -0
  48. package/docs/server.playercameraeventpayloads.md +19 -0
  49. package/docs/server.playermanager.md +19 -0
  50. package/docs/server.playermanager.worldselectionhandler.md +13 -0
  51. package/docs/server.rawcollider.md +13 -0
  52. package/docs/server.rawshape.md +13 -0
  53. package/docs/server.raycastoptions.md +4 -7
  54. package/docs/server.simulation.intersectionswithrawshape.md +107 -0
  55. package/docs/server.simulation.md +14 -0
  56. package/node-server.mjs +159 -159
  57. package/package.json +1 -1
  58. package/server.api.json +1751 -217
  59. package/server.d.ts +132 -35
package/server.d.ts CHANGED
@@ -1122,7 +1122,9 @@ export declare class Collider extends EventRouter {
1122
1122
  /** The parent rigid body of the collider. */
1123
1123
  get parentRigidBody(): RigidBody | undefined;
1124
1124
  /** The raw collider object from the Rapier physics engine. */
1125
- get rawCollider(): RAPIER.Collider | undefined;
1125
+ get rawCollider(): RawCollider | undefined;
1126
+ /** The raw shape object from the Rapier physics engine. */
1127
+ get rawShape(): RawShape | undefined;
1126
1128
  /** The relative position of the collider to its parent rigid body. */
1127
1129
  get relativePosition(): Vector3Like;
1128
1130
  /** The relative rotation of the collider. */
@@ -1510,6 +1512,8 @@ export declare class DefaultPlayerEntityController extends BaseEntityController
1510
1512
  * @returns Whether the entity of the entity controller can walk.
1511
1513
  */
1512
1514
  canWalk: (controller: DefaultPlayerEntityController) => boolean;
1515
+ /** Whether to face forward when the entity stops moving. */
1516
+ faceForwardOnStop: boolean;
1513
1517
  /** The looped animation(s) that will play when the entity is idle. */
1514
1518
  idleLoopedAnimations: string[];
1515
1519
  /** The oneshot animation(s) that will play when the entity interacts (left click) */
@@ -1615,6 +1619,8 @@ export declare interface DefaultPlayerEntityControllerOptions {
1615
1619
  canSwim?: () => boolean;
1616
1620
  /** A function allowing custom logic to determine if the entity can walk. */
1617
1621
  canWalk?: () => boolean;
1622
+ /** Whether to face forward when the entity stops moving. */
1623
+ faceForwardOnStop?: boolean;
1618
1624
  /** Overrides the animation(s) that will play when the entity is idle. */
1619
1625
  idleLoopedAnimations?: string[];
1620
1626
  /** Overrides the animation(s) that will play when the entity interacts (left click) */
@@ -1658,7 +1664,7 @@ export declare type DefaultPlayerEntityOptions = {} & PlayerEntityOptions;
1658
1664
 
1659
1665
  /** The options for a dynamic rigid body, also the default type. @public */
1660
1666
  export declare interface DynamicRigidBodyOptions extends BaseRigidBodyOptions {
1661
- type?: RigidBodyType.DYNAMIC;
1667
+ type: RigidBodyType.DYNAMIC;
1662
1668
  /** The additional mass of the rigid body. */
1663
1669
  additionalMass?: number;
1664
1670
  /** The additional mass properties of the rigid body. */
@@ -1750,6 +1756,7 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1750
1756
 
1751
1757
 
1752
1758
 
1759
+
1753
1760
 
1754
1761
 
1755
1762
  /**
@@ -1776,6 +1783,8 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1776
1783
  get modelPreferredShape(): ColliderShape | undefined;
1777
1784
  /** The scale of the entity's model. */
1778
1785
  get modelScale(): number;
1786
+ /** The nodes to show on the entity's model, overriding hidden nodes. */
1787
+ get modelShownNodes(): ReadonlySet<string>;
1779
1788
  /** The URI or path to the texture that overrides the model entity's default texture. */
1780
1789
  get modelTextureUri(): string | undefined;
1781
1790
  /** The URI or path to the .gltf model asset to be used for the entity. */
@@ -1834,6 +1843,13 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1834
1843
  * @param modelHiddenNodes - The nodes to hide on the entity's model.
1835
1844
  */
1836
1845
  setModelHiddenNodes(modelHiddenNodes: string[]): void;
1846
+ /**
1847
+ * Sets the nodes to show on the entity's model, overriding hidden nodes.
1848
+ * Matched nodes will be shown for all players. Uses case insensitive
1849
+ * substring matching.
1850
+ * @param modelShownNodes - The nodes to show on the entity's model.
1851
+ */
1852
+ setModelShownNodes(modelShownNodes: string[]): void;
1837
1853
  /**
1838
1854
  * Sets the texture uri of the entity's model. Setting
1839
1855
  * this overrides the model's default texture.
@@ -1938,6 +1954,7 @@ export declare enum EntityEvent {
1938
1954
  ENTITY_CONTACT_FORCE = "ENTITY.ENTITY_CONTACT_FORCE",
1939
1955
  SET_MODEL_ANIMATIONS_PLAYBACK_RATE = "ENTITY.SET_MODEL_ANIMATIONS_PLAYBACK_RATE",
1940
1956
  SET_MODEL_HIDDEN_NODES = "ENTITY.SET_MODEL_HIDDEN_NODES",
1957
+ SET_MODEL_SHOWN_NODES = "ENTITY.SET_MODEL_SHOWN_NODES",
1941
1958
  SET_MODEL_TEXTURE_URI = "ENTITY.SET_MODEL_TEXTURE_URI",
1942
1959
  SET_OPACITY = "ENTITY.SET_OPACITY",
1943
1960
  SET_PARENT = "ENTITY.SET_PARENT",
@@ -1990,11 +2007,16 @@ export declare interface EntityEventPayloads {
1990
2007
  entity: Entity;
1991
2008
  playbackRate: number;
1992
2009
  };
1993
- /** Emitted when the nodes of the entity's model are set to be hidden. */
2010
+ /** Emitted when nodes of the entity's model are set to be hidden. */
1994
2011
  [EntityEvent.SET_MODEL_HIDDEN_NODES]: {
1995
2012
  entity: Entity;
1996
2013
  modelHiddenNodes: Set<string>;
1997
2014
  };
2015
+ /** Emitted when nodes of the entity's model are set to be shown. */
2016
+ [EntityEvent.SET_MODEL_SHOWN_NODES]: {
2017
+ entity: Entity;
2018
+ modelShownNodes: Set<string>;
2019
+ };
1998
2020
  /** Emitted when the texture uri of the entity's model is set. */
1999
2021
  [EntityEvent.SET_MODEL_TEXTURE_URI]: {
2000
2022
  entity: Entity;
@@ -2172,7 +2194,9 @@ export declare interface EventPayloads extends AudioEventPayloads, BaseEntityCon
2172
2194
  * @public
2173
2195
  */
2174
2196
  export declare class EventRouter {
2175
- private _emitter;
2197
+ /** The global event router instance. */
2198
+ static readonly globalInstance: EventRouter;
2199
+
2176
2200
  private _finalListeners;
2177
2201
  /**
2178
2202
  * Emit an event, invoking all registered listeners for the event type.
@@ -2183,6 +2207,7 @@ export declare class EventRouter {
2183
2207
  * @returns `true` if any listeners were found and invoked, `false` otherwise.
2184
2208
  */
2185
2209
  emit<TEventType extends keyof EventPayloads>(eventType: TEventType, payload: EventPayloads[TEventType]): boolean;
2210
+ emit(eventType: string, payload: any): boolean;
2186
2211
  /**
2187
2212
  * Emits an event to the local and global server instance event routers.
2188
2213
  *
@@ -2190,6 +2215,7 @@ export declare class EventRouter {
2190
2215
  * @param payload - The payload to emit.
2191
2216
  */
2192
2217
  emitWithGlobal<TEventType extends keyof EventPayloads>(eventType: TEventType, payload: EventPayloads[TEventType]): void;
2218
+ emitWithGlobal(eventType: string, payload: any): void;
2193
2219
  /**
2194
2220
  * Emits an event to local and provided world event routers.
2195
2221
  *
@@ -2198,7 +2224,9 @@ export declare class EventRouter {
2198
2224
  * @param payload - The payload to broadcast.
2199
2225
  */
2200
2226
  emitWithWorld<TEventType extends keyof EventPayloads>(world: World, eventType: TEventType, payload: EventPayloads[TEventType]): void;
2227
+ emitWithWorld(world: World, eventType: string, payload: any): void;
2201
2228
 
2229
+ final(eventType: string, listener: (payload: any) => void): void;
2202
2230
  /**
2203
2231
  * Check if there are listeners for a specific event type.
2204
2232
  *
@@ -2206,7 +2234,8 @@ export declare class EventRouter {
2206
2234
  *
2207
2235
  * @returns `true` if listeners are found, `false` otherwise.
2208
2236
  */
2209
- hasListeners(eventType: keyof EventPayloads): boolean;
2237
+ hasListeners<TEventType extends keyof EventPayloads>(eventType: TEventType): boolean;
2238
+ hasListeners(eventType: string): boolean;
2210
2239
  /**
2211
2240
  * Get all listeners for a specific event type.
2212
2241
  *
@@ -2214,7 +2243,8 @@ export declare class EventRouter {
2214
2243
  *
2215
2244
  * @returns All listeners for the event type.
2216
2245
  */
2217
- listeners(eventType: keyof EventPayloads): EventEmitter.EventListener<any, string>[];
2246
+ listeners<TEventType extends keyof EventPayloads>(eventType: TEventType): EventEmitter.EventListener<any, string>[];
2247
+ listeners(eventType: string): EventEmitter.EventListener<any, string>[];
2218
2248
  /**
2219
2249
  * Get the number of listeners for a specific event type.
2220
2250
  *
@@ -2222,7 +2252,8 @@ export declare class EventRouter {
2222
2252
  *
2223
2253
  * @returns The number of listeners for the event type.
2224
2254
  */
2225
- listenerCount(eventType: keyof EventPayloads): number;
2255
+ listenerCount<TEventType extends keyof EventPayloads>(eventType: TEventType): number;
2256
+ listenerCount(eventType: string): number;
2226
2257
  /**
2227
2258
  * Remove a listener for a specific event type.
2228
2259
  *
@@ -2230,12 +2261,14 @@ export declare class EventRouter {
2230
2261
  * @param listener - The listener function to remove.
2231
2262
  */
2232
2263
  off<TEventType extends keyof EventPayloads>(eventType: TEventType, listener: (payload: EventPayloads[TEventType]) => void): void;
2264
+ off(eventType: string, listener: (payload: any) => void): void;
2233
2265
  /**
2234
2266
  * Remove all listeners or all listeners for a provided event type.
2235
2267
  *
2236
2268
  * @param eventType - The type of event to remove all listeners from.
2237
2269
  */
2238
- offAll(eventType?: keyof EventPayloads): void;
2270
+ offAll<TEventType extends keyof EventPayloads>(eventType?: TEventType): void;
2271
+ offAll(eventType?: string): void;
2239
2272
  /**
2240
2273
  * Register a listener for a specific event type.
2241
2274
  *
@@ -2246,6 +2279,7 @@ export declare class EventRouter {
2246
2279
  * @param listener - The listener function to invoke when the event is emitted.
2247
2280
  */
2248
2281
  on<TEventType extends keyof EventPayloads>(eventType: TEventType, listener: (payload: EventPayloads[TEventType]) => void): void;
2282
+ on(eventType: string, listener: (payload: any) => void): void;
2249
2283
  /**
2250
2284
  * Register a listener for a specific event type that will be invoked once.
2251
2285
  *
@@ -2253,6 +2287,7 @@ export declare class EventRouter {
2253
2287
  * @param listener - The listener function to invoke when the event is emitted.
2254
2288
  */
2255
2289
  once<TEventType extends keyof EventPayloads>(eventType: TEventType, listener: (payload: EventPayloads[TEventType]) => void): void;
2290
+ once(eventType: string, listener: (payload: any) => void): void;
2256
2291
  }
2257
2292
 
2258
2293
  /**
@@ -2283,6 +2318,20 @@ export declare type FaceOptions = {
2283
2318
  faceCompleteCallback?: FaceCompleteCallback;
2284
2319
  };
2285
2320
 
2321
+ /** Filter options for various operations like raycasting and intersections. @public */
2322
+ export declare type FilterOptions = {
2323
+ /** The query filter flags. */
2324
+ filterFlags?: RAPIER.QueryFilterFlags;
2325
+ /** The collision group to filter by. */
2326
+ filterGroups?: number;
2327
+ /** The collider to exclude. */
2328
+ filterExcludeCollider?: RawCollider;
2329
+ /** The rigid body to exclude. */
2330
+ filterExcludeRigidBody?: RAPIER.RigidBody;
2331
+ /** The predicate to filter by. */
2332
+ filterPredicate?: (collider: RawCollider) => boolean;
2333
+ };
2334
+
2286
2335
  /** The options for a fixed rigid body. @public */
2287
2336
  export declare interface FixedRigidBodyOptions extends BaseRigidBodyOptions {
2288
2337
  type: RigidBodyType.FIXED;
@@ -2337,6 +2386,14 @@ export declare interface GameServerEventPayloads {
2337
2386
  };
2338
2387
  }
2339
2388
 
2389
+ /** A intersection result. @public */
2390
+ export declare type IntersectionResult = {
2391
+ /** The block type that was intersected. */
2392
+ intersectedBlockType?: BlockType;
2393
+ /** The entity that was intersected. */
2394
+ intersectedEntity?: Entity;
2395
+ };
2396
+
2340
2397
  /** The options for a kinematic position rigid body. @public */
2341
2398
  export declare interface KinematicPositionRigidBodyOptions extends BaseRigidBodyOptions {
2342
2399
  type: RigidBodyType.KINEMATIC_POSITION;
@@ -3245,6 +3302,8 @@ export declare interface ModelEntityOptions extends BaseEntityOptions {
3245
3302
  modelPreferredShape?: ColliderShape;
3246
3303
  /** The scale of the entity's model. */
3247
3304
  modelScale?: number;
3305
+ /** The nodes to show on the entity's model, overriding hidden nodes. */
3306
+ modelShownNodes?: string[];
3248
3307
  /** The texture uri of the entity's model. Setting this overrides the model's default texture. */
3249
3308
  modelTextureUri?: string;
3250
3309
  /** The URI or path to the .gltf model asset to be used for the entity. */
@@ -3381,6 +3440,8 @@ export declare type MoveOptions = {
3381
3440
  moveStartIdleAnimationsOnCompletion?: boolean;
3382
3441
  /** The distance from the target at which the entity will stop moving and consider movement complete. Defaults to 0.316~ blocks away from target. */
3383
3442
  moveStoppingDistance?: number;
3443
+ /** Whether to stop moving and consider movement complete when the entity is stuck, such as pushing into a block. Defaults to false. */
3444
+ moveCompletesWhenStuck?: boolean;
3384
3445
  };
3385
3446
 
3386
3447
  /** The options for an error type "none" collider. @public */
@@ -3428,6 +3489,7 @@ export declare class PathfindingEntityController extends SimpleEntityController
3428
3489
 
3429
3490
 
3430
3491
 
3492
+
3431
3493
  /**
3432
3494
  * @param options - Options for the controller.
3433
3495
  */
@@ -3498,6 +3560,8 @@ export declare type PathfindingOptions = {
3498
3560
  waypointMoveCompleteCallback?: WaypointMoveCompleteCallback;
3499
3561
  /** Callback called when the entity associated with the PathfindingEntityController skips a waypoint because it took too long to reach. */
3500
3562
  waypointMoveSkippedCallback?: WaypointMoveSkippedCallback;
3563
+ /** The distance in blocks from the waypoint that the entity will stop moving and consider the waypoint reached. */
3564
+ waypointStoppingDistance?: number;
3501
3565
  /** The timeout in milliseconds for a waypoint to be considered reached. Defaults to 2000ms divided by the speed of the entity. */
3502
3566
  waypointTimeoutMs?: number;
3503
3567
  };
@@ -3673,12 +3737,15 @@ export declare class PlayerCamera extends EventRouter implements protocol.Serial
3673
3737
 
3674
3738
 
3675
3739
 
3740
+
3676
3741
  /** The entity the camera is attached to. */
3677
3742
  get attachedToEntity(): Entity | undefined;
3678
3743
  /** The position the camera is attached to. */
3679
3744
  get attachedToPosition(): Vector3Like | undefined;
3680
3745
  /** The facing direction vector of the camera based on its current orientation. */
3681
3746
  get facingDirection(): Vector3Like;
3747
+ /** The quaternion representing the camera's facing direction. */
3748
+ get facingQuaternion(): QuaternionLike;
3682
3749
  /** The film offset of the camera. A positive value shifts the camera right, a negative value shifts it left. */
3683
3750
  get filmOffset(): number;
3684
3751
  /** Only used in first-person mode. The forward offset of the camera. A positive number shifts the camera forward, a negative number shifts it backward. */
@@ -3687,6 +3754,8 @@ export declare class PlayerCamera extends EventRouter implements protocol.Serial
3687
3754
  get fov(): number;
3688
3755
  /** The nodes of the model the camera is attached to that will not be rendered for the player. Uses case insensitive substring matching. */
3689
3756
  get modelHiddenNodes(): Set<string>;
3757
+ /** The nodes of the model the camera is attached to that will be rendered for the player, overriding hidden nodes. Uses case insensitive substring matching. */
3758
+ get modelShownNodes(): Set<string>;
3690
3759
  /** The mode of the camera. */
3691
3760
  get mode(): PlayerCameraMode;
3692
3761
  /** The relative offset of the camera from the entity or position it is attached to. */
@@ -3755,6 +3824,13 @@ export declare class PlayerCamera extends EventRouter implements protocol.Serial
3755
3824
  * @param modelHiddenNodes - Determines nodes to hide that match these case insensitive substrings.
3756
3825
  */
3757
3826
  setModelHiddenNodes(modelHiddenNodes: string[]): void;
3827
+ /**
3828
+ * Sets the nodes of the model the camera is attached to
3829
+ * that will be rendered for the player, overriding hidden
3830
+ * nodes. Uses case insensitive substring matching.
3831
+ * @param modelShownNodes - Determines nodes to show that match these case insensitive substrings.
3832
+ */
3833
+ setModelShownNodes(modelShownNodes: string[]): void;
3758
3834
  /**
3759
3835
  * Sets the mode of the camera.
3760
3836
  * @param mode - The mode to set.
@@ -3807,6 +3883,7 @@ export declare enum PlayerCameraEvent {
3807
3883
  SET_FORWARD_OFFSET = "PLAYER_CAMERA.SET_FORWARD_OFFSET",
3808
3884
  SET_FOV = "PLAYER_CAMERA.SET_FOV",
3809
3885
  SET_MODEL_HIDDEN_NODES = "PLAYER_CAMERA.SET_MODEL_HIDDEN_NODES",
3886
+ SET_MODEL_SHOWN_NODES = "PLAYER_CAMERA.SET_MODEL_SHOWN_NODES",
3810
3887
  SET_MODE = "PLAYER_CAMERA.SET_MODE",
3811
3888
  SET_OFFSET = "PLAYER_CAMERA.SET_OFFSET",
3812
3889
  SET_SHOULDER_ANGLE = "PLAYER_CAMERA.SET_SHOULDER_ANGLE",
@@ -3857,6 +3934,11 @@ export declare interface PlayerCameraEventPayloads {
3857
3934
  playerCamera: PlayerCamera;
3858
3935
  modelHiddenNodes: Set<string>;
3859
3936
  };
3937
+ /** Emitted when the nodes of the model the camera is attached to are set to be shown. */
3938
+ [PlayerCameraEvent.SET_MODEL_SHOWN_NODES]: {
3939
+ playerCamera: PlayerCamera;
3940
+ modelShownNodes: Set<string>;
3941
+ };
3860
3942
  /** Emitted when the mode of the camera is set. */
3861
3943
  [PlayerCameraEvent.SET_MODE]: {
3862
3944
  playerCamera: PlayerCamera;
@@ -4019,6 +4101,8 @@ export declare type PlayerInput = Partial<Record<keyof InputSchema, boolean>>;
4019
4101
  export declare class PlayerManager {
4020
4102
  /** The global PlayerManager instance as a singleton. */
4021
4103
  static readonly instance: PlayerManager;
4104
+ /** Optional handler for selecting the world a newly connected player joins. Returning no world results in the player joining the default WorldManager world. */
4105
+ worldSelectionHandler?: (player: Player) => Promise<World | undefined>;
4022
4106
 
4023
4107
 
4024
4108
  /** The number of players currently connected to the server. */
@@ -4371,9 +4455,15 @@ export declare interface QuaternionLike {
4371
4455
  w: number;
4372
4456
  }
4373
4457
 
4458
+ /** A raw collider object from the Rapier physics engine. @public */
4459
+ export declare type RawCollider = RAPIER.Collider;
4460
+
4374
4461
  /** A raw set of collision groups represented as a 32-bit number. @public */
4375
4462
  export declare type RawCollisionGroups = RAPIER.InteractionGroups;
4376
4463
 
4464
+ /** A raw shape object from the Rapier physics engine. @public */
4465
+ export declare type RawShape = RAPIER.Shape;
4466
+
4377
4467
  /** A hit result from a raycast. @public */
4378
4468
  export declare type RaycastHit = {
4379
4469
  /** The block the raycast hit. */
@@ -4388,19 +4478,9 @@ export declare type RaycastHit = {
4388
4478
 
4389
4479
  /** Options for raycasting. @public */
4390
4480
  export declare type RaycastOptions = {
4391
- /** Whether to ignore sensor colliders. */
4392
- ignoresSensors?: boolean;
4393
- /** The query filter flags. */
4394
- filterFlags?: RAPIER.QueryFilterFlags;
4395
- /** The collision group to filter by. */
4396
- filterGroups?: number;
4397
- /** The collider to exclude. */
4398
- filterExcludeCollider?: RAPIER.Collider;
4399
- /** The rigid body to exclude. */
4400
- filterExcludeRigidBody?: RAPIER.RigidBody;
4401
- /** The predicate to filter by. */
4402
- filterPredicate?: (collider: RAPIER.Collider) => boolean;
4403
- };
4481
+ /** Whether to use solid mode for the raycast, defaults to true. */
4482
+ solidMode?: boolean;
4483
+ } & FilterOptions;
4404
4484
 
4405
4485
  /** A RGB color. @public */
4406
4486
  export declare interface RgbColor {
@@ -5041,6 +5121,9 @@ export declare class SimpleEntityController extends BaseEntityController {
5041
5121
 
5042
5122
 
5043
5123
 
5124
+
5125
+
5126
+
5044
5127
  /**
5045
5128
  * @param options - Options for the controller.
5046
5129
  */
@@ -5148,20 +5231,6 @@ export declare class Simulation extends EventRouter {
5148
5231
  get timestepS(): number;
5149
5232
  /** The world the simulation is for. */
5150
5233
  get world(): World;
5151
- /**
5152
- * Casts a ray through the simulation.
5153
- *
5154
- * @remarks
5155
- * The cast ray will stop at the the first block or
5156
- * entity hit within the length of the ray.
5157
- *
5158
- * @param origin - The origin of the ray.
5159
- * @param direction - The direction of the ray.
5160
- * @param length - The length of the ray.
5161
- * @param options - The options for the raycast.
5162
- * @returns A RaycastHit object containing the first block or entity hit by the ray, or null if no hit.
5163
- */
5164
- raycast(origin: RAPIER.Vector3, direction: RAPIER.Vector3, length: number, options?: RaycastOptions): RaycastHit | null;
5165
5234
 
5166
5235
 
5167
5236
  /**
@@ -5191,6 +5260,34 @@ export declare class Simulation extends EventRouter {
5191
5260
  * @returns The contact manifolds, or an empty array if no contact.
5192
5261
  */
5193
5262
  getContactManifolds(colliderHandleA: RAPIER.ColliderHandle, colliderHandleB: RAPIER.ColliderHandle): ContactManifold[];
5263
+ /**
5264
+ * Gets the intersections with a raw shape.
5265
+ *
5266
+ * @remarks
5267
+ * rawShape can be retrieved from a simulated or
5268
+ * unsimulated collider using {@link Collider.rawShape}.
5269
+ *
5270
+ * @param rawShape - The raw shape to get intersections with.
5271
+ * @param position - The position of the shape.
5272
+ * @param rotation - The rotation of the shape.
5273
+ * @param options - The options for the intersections.
5274
+ * @returns The intersections.
5275
+ */
5276
+ intersectionsWithRawShape(rawShape: RawShape, position: Vector3Like, rotation: QuaternionLike, options?: FilterOptions): IntersectionResult[];
5277
+ /**
5278
+ * Casts a ray through the simulation.
5279
+ *
5280
+ * @remarks
5281
+ * The cast ray will stop at the the first block or
5282
+ * entity hit within the length of the ray.
5283
+ *
5284
+ * @param origin - The origin of the ray.
5285
+ * @param direction - The direction of the ray.
5286
+ * @param length - The length of the ray.
5287
+ * @param options - The options for the raycast.
5288
+ * @returns A RaycastHit object containing the first block or entity hit by the ray, or null if no hit.
5289
+ */
5290
+ raycast(origin: RAPIER.Vector3, direction: RAPIER.Vector3, length: number, options?: RaycastOptions): RaycastHit | null;
5194
5291
 
5195
5292
 
5196
5293
  /**