hytopia 0.1.54 → 0.1.55
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.
- package/docs/server.collider.bounciness.md +13 -0
- package/docs/server.collider.bouncinesscombinerule.md +13 -0
- package/docs/server.collider.collisiongroups.md +13 -0
- package/docs/{server.collider.getfriction.md → server.collider.friction.md} +4 -10
- package/docs/server.collider.frictioncombinerule.md +13 -0
- package/docs/server.collider.md +112 -63
- package/docs/server.collider.relativeposition.md +13 -0
- package/docs/server.collider.relativerotation.md +13 -0
- package/docs/{server.collider.setrelativetranslation.md → server.collider.setrelativeposition.md} +6 -6
- package/docs/server.collideroptions.md +6 -6
- package/docs/server.collideroptions.relativeposition.md +13 -0
- package/docs/server.entityeventpayload.md +2 -2
- package/docs/server.entityeventpayload.updateposition.entity.md +11 -0
- package/docs/{server.entityeventpayload.updatetranslation.md → server.entityeventpayload.updateposition.md} +5 -5
- package/docs/server.entityeventpayload.updateposition.position.md +11 -0
- package/docs/server.entityeventtype.md +4 -4
- package/docs/server.md +1 -1
- package/docs/server.movecallback.md +2 -2
- package/docs/server.movecompletecallback.md +1 -1
- package/docs/server.rigidbody.additionalmass.md +13 -0
- package/docs/server.rigidbody.additionalsolveriterations.md +13 -0
- package/docs/server.rigidbody.angulardamping.md +13 -0
- package/docs/server.rigidbody.angularvelocity.md +13 -0
- package/docs/server.rigidbody.directionfromrotation.md +13 -0
- package/docs/server.rigidbody.dominancegroup.md +13 -0
- package/docs/server.rigidbody.effectiveangularinertia.md +13 -0
- package/docs/server.rigidbody.effectiveinversemass.md +13 -0
- package/docs/server.rigidbody.effectiveworldinverseprincipalangularinertiasqrt.md +13 -0
- package/docs/server.rigidbody.enabledpositions.md +13 -0
- package/docs/server.rigidbody.enabledrotations.md +13 -0
- package/docs/server.rigidbody.gravityscale.md +13 -0
- package/docs/server.rigidbody.inversemass.md +13 -0
- package/docs/server.rigidbody.inverseprincipalangularinertiasqrt.md +13 -0
- package/docs/server.rigidbody.lineardamping.md +13 -0
- package/docs/server.rigidbody.linearvelocity.md +13 -0
- package/docs/server.rigidbody.localcenterofmass.md +13 -0
- package/docs/server.rigidbody.lockallpositions.md +17 -0
- package/docs/{server.rigidbody.getmass.md → server.rigidbody.mass.md} +4 -10
- package/docs/server.rigidbody.md +339 -150
- package/docs/server.rigidbody.nextkinematicposition.md +13 -0
- package/docs/server.rigidbody.nextkinematicrotation.md +13 -0
- package/docs/server.rigidbody.position.md +13 -0
- package/docs/server.rigidbody.principalangularinertia.md +13 -0
- package/docs/server.rigidbody.principalangularinertialocalframe.md +13 -0
- package/docs/server.rigidbody.rotation.md +13 -0
- package/docs/{server.rigidbody.setenabledtranslations.md → server.rigidbody.setenabledpositions.md} +6 -6
- package/docs/{server.rigidbody.setnextkinematictranslation.md → server.rigidbody.setnextkinematicposition.md} +6 -6
- package/docs/{server.rigidbody.settranslation.md → server.rigidbody.setposition.md} +6 -6
- package/docs/server.rigidbody.softccdprediction.md +13 -0
- package/docs/server.rigidbody.type.md +13 -0
- package/docs/server.rigidbody.worldcenterofmass.md +13 -0
- package/docs/server.rigidbodyoptions.enabledpositions.md +13 -0
- package/docs/server.rigidbodyoptions.md +19 -19
- package/docs/server.rigidbodyoptions.position.md +13 -0
- package/examples/block-entity/index.ts +2 -2
- package/examples/custom-ui/index.ts +1 -1
- package/examples/payload-game/index.ts +11 -11
- package/package.json +1 -1
- package/server.api.json +981 -1015
- package/server.d.ts +110 -212
- package/server.js +67 -67
- package/docs/server.collider.getbounciness.md +0 -19
- package/docs/server.collider.getbouncinesscombinerule.md +0 -19
- package/docs/server.collider.getcollisiongroups.md +0 -19
- package/docs/server.collider.getfrictioncombinerule.md +0 -19
- package/docs/server.collider.getrelativerotation.md +0 -19
- package/docs/server.collider.getrelativetranslation.md +0 -19
- package/docs/server.collideroptions.relativetranslation.md +0 -13
- package/docs/server.entityeventpayload.updatetranslation.entity.md +0 -11
- package/docs/server.entityeventpayload.updatetranslation.translation.md +0 -11
- package/docs/server.rigidbody.getadditionalmass.md +0 -19
- package/docs/server.rigidbody.getadditionalsolveriterations.md +0 -19
- package/docs/server.rigidbody.getangulardamping.md +0 -19
- package/docs/server.rigidbody.getangularvelocity.md +0 -19
- package/docs/server.rigidbody.getdirectionfromrotation.md +0 -19
- package/docs/server.rigidbody.getdominancegroup.md +0 -19
- package/docs/server.rigidbody.geteffectiveangularinertia.md +0 -19
- package/docs/server.rigidbody.geteffectiveinversemass.md +0 -19
- package/docs/server.rigidbody.geteffectiveworldinverseprincipalangularinertiasqrt.md +0 -19
- package/docs/server.rigidbody.getenabledrotations.md +0 -19
- package/docs/server.rigidbody.getenabledtranslations.md +0 -19
- package/docs/server.rigidbody.getgravityscale.md +0 -19
- package/docs/server.rigidbody.getinversemass.md +0 -19
- package/docs/server.rigidbody.getinverseprincipalangularinertiasqrt.md +0 -19
- package/docs/server.rigidbody.getlineardamping.md +0 -19
- package/docs/server.rigidbody.getlinearvelocity.md +0 -19
- package/docs/server.rigidbody.getlocalcenterofmass.md +0 -19
- package/docs/server.rigidbody.getnextkinematicrotation.md +0 -19
- package/docs/server.rigidbody.getnextkinematictranslation.md +0 -19
- package/docs/server.rigidbody.getprincipalangularinertia.md +0 -19
- package/docs/server.rigidbody.getprincipalangularinertialocalframe.md +0 -19
- package/docs/server.rigidbody.getrotation.md +0 -19
- package/docs/server.rigidbody.getsoftccdprediction.md +0 -19
- package/docs/server.rigidbody.gettranslation.md +0 -19
- package/docs/server.rigidbody.gettype.md +0 -19
- package/docs/server.rigidbody.getworldcenterofmass.md +0 -19
- package/docs/server.rigidbody.lockalltranslations.md +0 -17
- package/docs/server.rigidbodyoptions.enabledtranslations.md +0 -13
- package/docs/server.rigidbodyoptions.translation.md +0 -13
package/server.d.ts
CHANGED
@@ -826,6 +826,16 @@ export declare class Collider {
|
|
826
826
|
* @param colliderOptions - The options for the collider instance.
|
827
827
|
*/
|
828
828
|
constructor(colliderOptions: ColliderOptions);
|
829
|
+
/** The bounciness of the collider. */
|
830
|
+
get bounciness(): number;
|
831
|
+
/** The bounciness combine rule of the collider. */
|
832
|
+
get bouncinessCombineRule(): CoefficientCombineRule;
|
833
|
+
/** The collision groups the collider belongs to. */
|
834
|
+
get collisionGroups(): CollisionGroups;
|
835
|
+
/** The friction of the collider. */
|
836
|
+
get friction(): number;
|
837
|
+
/** The friction combine rule of the collider. */
|
838
|
+
get frictionCombineRule(): CoefficientCombineRule;
|
829
839
|
/** Whether the collider is enabled. */
|
830
840
|
get isEnabled(): boolean;
|
831
841
|
/** Whether the collider has been removed from the simulation. */
|
@@ -838,45 +848,14 @@ export declare class Collider {
|
|
838
848
|
get parentRigidBody(): RigidBody | undefined;
|
839
849
|
/** The raw collider object from the Rapier physics engine. */
|
840
850
|
get rawCollider(): RAPIER.Collider | undefined;
|
851
|
+
/** The relative position of the collider to its parent rigid body. */
|
852
|
+
get relativePosition(): Vector3Like;
|
853
|
+
/** The relative rotation of the collider. */
|
854
|
+
get relativeRotation(): QuaternionLike;
|
841
855
|
/** The shape of the collider. */
|
842
856
|
get shape(): ColliderShape;
|
843
857
|
/** An arbitrary identifier tag of the collider. Useful for your own logic. */
|
844
858
|
get tag(): string | undefined;
|
845
|
-
/**
|
846
|
-
* Gets the bounciness of the collider.
|
847
|
-
* @returns The bounciness of the collider.
|
848
|
-
*/
|
849
|
-
getBounciness(): number;
|
850
|
-
/**
|
851
|
-
* Gets the bounciness combine rule of the collider.
|
852
|
-
* @returns The bounciness combine rule of the collider.
|
853
|
-
*/
|
854
|
-
getBouncinessCombineRule(): CoefficientCombineRule;
|
855
|
-
/**
|
856
|
-
* Gets the collision groups the collider belongs to.
|
857
|
-
* @returns The collision groups the collider belongs to.
|
858
|
-
*/
|
859
|
-
getCollisionGroups(): CollisionGroups;
|
860
|
-
/**
|
861
|
-
* Gets the friction of the collider.
|
862
|
-
* @returns The friction of the collider.
|
863
|
-
*/
|
864
|
-
getFriction(): number;
|
865
|
-
/**
|
866
|
-
* Gets the friction combine rule of the collider.
|
867
|
-
* @returns The friction combine rule of the collider.
|
868
|
-
*/
|
869
|
-
getFrictionCombineRule(): CoefficientCombineRule;
|
870
|
-
/**
|
871
|
-
* Gets the relative rotation of the collider.
|
872
|
-
* @returns The relative rotation of the collider.
|
873
|
-
*/
|
874
|
-
getRelativeRotation(): QuaternionLike;
|
875
|
-
/**
|
876
|
-
* Gets the relative translation of the collider to its parent rigid body.
|
877
|
-
* @returns The relative translation of the collider.
|
878
|
-
*/
|
879
|
-
getRelativeTranslation(): Vector3Like;
|
880
859
|
/**
|
881
860
|
* Sets the bounciness of the collider.
|
882
861
|
* @param bounciness - The bounciness of the collider.
|
@@ -923,10 +902,10 @@ export declare class Collider {
|
|
923
902
|
*/
|
924
903
|
setRelativeRotation(rotation: QuaternionLike): void;
|
925
904
|
/**
|
926
|
-
* Sets the relative
|
927
|
-
* @param
|
905
|
+
* Sets the relative position of the collider to its parent rigid body.
|
906
|
+
* @param position - The relative position of the collider.
|
928
907
|
*/
|
929
|
-
|
908
|
+
setRelativePosition(position: Vector3Like): void;
|
930
909
|
/**
|
931
910
|
* Sets whether the collider is a sensor.
|
932
911
|
* @param sensor - Whether the collider is a sensor.
|
@@ -1000,10 +979,10 @@ export declare interface ColliderOptions {
|
|
1000
979
|
parentRigidBody?: RigidBody;
|
1001
980
|
/** The radius of the collider if the shape is a ball, capsule, cone, cylinder, or round cylinder. */
|
1002
981
|
radius?: number;
|
982
|
+
/** The relative position of the collider. Relative to parent rigid body. */
|
983
|
+
relativePosition?: Vector3Like;
|
1003
984
|
/** The relative rotation of the collider. Relative to parent rigid body. */
|
1004
985
|
relativeRotation?: QuaternionLike;
|
1005
|
-
/** The relative translation of the collider. Relative to parent rigid body. */
|
1006
|
-
relativeTranslation?: Vector3Like;
|
1007
986
|
/** The simulation the collider is in, if provided the collider will automatically be added to the simulation. */
|
1008
987
|
simulation?: Simulation;
|
1009
988
|
/** An arbitrary identifier tag of the collider. Useful for your own logic. */
|
@@ -1507,13 +1486,13 @@ export declare namespace EntityEventPayload {
|
|
1507
1486
|
entity: Entity;
|
1508
1487
|
animations: Set<string>;
|
1509
1488
|
}
|
1510
|
-
export interface
|
1489
|
+
export interface UpdatePosition {
|
1511
1490
|
entity: Entity;
|
1512
|
-
|
1491
|
+
position: Vector3Like;
|
1513
1492
|
}
|
1514
|
-
export interface
|
1493
|
+
export interface UpdateRotation {
|
1515
1494
|
entity: Entity;
|
1516
|
-
|
1495
|
+
rotation: QuaternionLike;
|
1517
1496
|
}
|
1518
1497
|
}
|
1519
1498
|
|
@@ -1526,8 +1505,8 @@ export declare enum EntityEventType {
|
|
1526
1505
|
START_MODEL_LOOPED_ANIMATIONS = "ENTITY.START_MODEL_LOOPED_ANIMATIONS",
|
1527
1506
|
START_MODEL_ONESHOT_ANIMATIONS = "ENTITY.START_MODEL_ONESHOT_ANIMATIONS",
|
1528
1507
|
STOP_MODEL_ANIMATIONS = "ENTITY.STOP_MODEL_ANIMATIONS",
|
1529
|
-
|
1530
|
-
|
1508
|
+
UPDATE_POSITION = "ENTITY.UPDATE_POSITION",
|
1509
|
+
UPDATE_ROTATION = "ENTITY.UPDATE_ROTATION"
|
1531
1510
|
}
|
1532
1511
|
|
1533
1512
|
/**
|
@@ -1771,22 +1750,22 @@ export declare enum GameServerEventType {
|
|
1771
1750
|
|
1772
1751
|
/**
|
1773
1752
|
* A callback function called when the entity associated with the
|
1774
|
-
* SimpleCharacterController updates its
|
1753
|
+
* SimpleCharacterController updates its position as it is
|
1775
1754
|
* attempting to move to a target coordinate.
|
1776
|
-
* @param
|
1777
|
-
* @param
|
1755
|
+
* @param currentPosition - The current position of the entity.
|
1756
|
+
* @param targetPosition - The target position of the entity.
|
1778
1757
|
* @public
|
1779
1758
|
*/
|
1780
|
-
export declare type MoveCallback = (
|
1759
|
+
export declare type MoveCallback = (currentPosition: Vector3Like, targetPosition: Vector3Like) => void;
|
1781
1760
|
|
1782
1761
|
/**
|
1783
1762
|
* A callback function called when the entity associated with the
|
1784
1763
|
* SimpleCharacterController reaches the target coordinate. An entity
|
1785
1764
|
* must reach the x,y,z coordinate for the callback to be called.
|
1786
|
-
* @param
|
1765
|
+
* @param endPosition - The position of the entity after it has finished moving.
|
1787
1766
|
* @public
|
1788
1767
|
*/
|
1789
|
-
export declare type MoveCompleteCallback = (
|
1768
|
+
export declare type MoveCompleteCallback = (endPosition: Vector3Like) => void;
|
1790
1769
|
|
1791
1770
|
/**
|
1792
1771
|
* Options for the {@link SimpleCharacterController.move} method.
|
@@ -2505,8 +2484,36 @@ export declare class RigidBody {
|
|
2505
2484
|
* @param options - The options for the rigid body instance.
|
2506
2485
|
*/
|
2507
2486
|
constructor(options: RigidBodyOptions);
|
2487
|
+
/** The additional mass of the rigid body. */
|
2488
|
+
get additionalMass(): number;
|
2489
|
+
/** The additional solver iterations of the rigid body. */
|
2490
|
+
get additionalSolverIterations(): number;
|
2491
|
+
/** The angular damping of the rigid body. */
|
2492
|
+
get angularDamping(): number;
|
2493
|
+
/** The angular velocity of the rigid body. */
|
2494
|
+
get angularVelocity(): Vector3Like;
|
2508
2495
|
/** The colliders of the rigid body. */
|
2509
2496
|
get colliders(): Set<Collider>;
|
2497
|
+
/** The dominance group of the rigid body. */
|
2498
|
+
get dominanceGroup(): number;
|
2499
|
+
/** The direction from the rotation of the rigid body. */
|
2500
|
+
get directionFromRotation(): Vector3Like;
|
2501
|
+
/** The effective angular inertia of the rigid body. */
|
2502
|
+
get effectiveAngularInertia(): SpdMatrix3 | undefined;
|
2503
|
+
/** The effective inverse mass of the rigid body. */
|
2504
|
+
get effectiveInverseMass(): Vector3Like | undefined;
|
2505
|
+
/** The effective world inverse principal angular inertia square root of the rigid body. */
|
2506
|
+
get effectiveWorldInversePrincipalAngularInertiaSqrt(): SpdMatrix3 | undefined;
|
2507
|
+
/** The enabled axes of rotational movement of the rigid body. */
|
2508
|
+
get enabledRotations(): Vector3Boolean;
|
2509
|
+
/** The enabled axes of positional movement of the rigid body. */
|
2510
|
+
get enabledPositions(): Vector3Boolean;
|
2511
|
+
/** The gravity scale of the rigid body. */
|
2512
|
+
get gravityScale(): number;
|
2513
|
+
/** The inverse mass of the rigid body. */
|
2514
|
+
get inverseMass(): number | undefined;
|
2515
|
+
/** The inverse principal angular inertia square root of the rigid body. */
|
2516
|
+
get inversePrincipalAngularInertiaSqrt(): Vector3Like | undefined;
|
2510
2517
|
/** Whether the rigid body has continuous collision detection enabled. */
|
2511
2518
|
get isCcdEnabled(): boolean;
|
2512
2519
|
/** Whether the rigid body is dynamic. */
|
@@ -2529,151 +2536,36 @@ export declare class RigidBody {
|
|
2529
2536
|
get isSimulated(): boolean;
|
2530
2537
|
/** Whether the rigid body is sleeping. */
|
2531
2538
|
get isSleeping(): boolean;
|
2539
|
+
/** The linear damping of the rigid body. */
|
2540
|
+
get linearDamping(): number;
|
2541
|
+
/** The linear velocity of the rigid body. */
|
2542
|
+
get linearVelocity(): Vector3Like;
|
2543
|
+
/** The local center of mass of the rigid body. */
|
2544
|
+
get localCenterOfMass(): Vector3Like;
|
2545
|
+
/** The mass of the rigid body. */
|
2546
|
+
get mass(): number;
|
2547
|
+
/** The next kinematic rotation of the rigid body. */
|
2548
|
+
get nextKinematicRotation(): QuaternionLike;
|
2549
|
+
/** The next kinematic position of the rigid body. */
|
2550
|
+
get nextKinematicPosition(): Vector3Like;
|
2532
2551
|
/** The number of colliders in the rigid body. */
|
2533
2552
|
get numColliders(): number;
|
2553
|
+
/** The principal angular inertia of the rigid body. */
|
2554
|
+
get principalAngularInertia(): Vector3Like;
|
2555
|
+
/** The principal angular inertia local frame of the rigid body. */
|
2556
|
+
get principalAngularInertiaLocalFrame(): QuaternionLike | undefined;
|
2557
|
+
/** The position of the rigid body. */
|
2558
|
+
get position(): Vector3Like;
|
2534
2559
|
/** The raw RAPIER rigid body instance. */
|
2535
2560
|
get rawRigidBody(): RAPIER.RigidBody | undefined;
|
2536
|
-
/**
|
2537
|
-
|
2538
|
-
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
|
2544
|
-
*/
|
2545
|
-
getAdditionalSolverIterations(): number;
|
2546
|
-
/**
|
2547
|
-
* Gets the angular damping of the rigid body.
|
2548
|
-
* @returns The angular damping of the rigid body.
|
2549
|
-
*/
|
2550
|
-
getAngularDamping(): number;
|
2551
|
-
/**
|
2552
|
-
* Gets the angular velocity of the rigid body.
|
2553
|
-
* @returns The angular velocity of the rigid body.
|
2554
|
-
*/
|
2555
|
-
getAngularVelocity(): Vector3Like;
|
2556
|
-
/**
|
2557
|
-
* Gets the colliders of the rigid body by tag.
|
2558
|
-
* @param tag - The tag to filter by.
|
2559
|
-
* @returns The colliders of the rigid body with the given tag.
|
2560
|
-
*/
|
2561
|
-
getCollidersByTag(tag: string): Collider[];
|
2562
|
-
/**
|
2563
|
-
* Gets the dominance group of the rigid body.
|
2564
|
-
* @returns The dominance group of the rigid body.
|
2565
|
-
*/
|
2566
|
-
getDominanceGroup(): number;
|
2567
|
-
/**
|
2568
|
-
* Gets the direction from the rotation of the rigid body.
|
2569
|
-
* @returns The direction from the rotation of the rigid body.
|
2570
|
-
*/
|
2571
|
-
getDirectionFromRotation(): Vector3Like;
|
2572
|
-
/**
|
2573
|
-
* Gets the effective angular inertia of the rigid body.
|
2574
|
-
* @returns The effective angular inertia of the rigid body.
|
2575
|
-
*/
|
2576
|
-
getEffectiveAngularInertia(): SpdMatrix3 | undefined;
|
2577
|
-
/**
|
2578
|
-
* Gets the effective inverse mass of the rigid body.
|
2579
|
-
* @returns The effective inverse mass of the rigid body.
|
2580
|
-
*/
|
2581
|
-
getEffectiveInverseMass(): Vector3Like | undefined;
|
2582
|
-
/**
|
2583
|
-
* Gets the effective world inverse principal angular inertia square root of the rigid body.
|
2584
|
-
* @returns The effective world inverse principal angular inertia square root of the rigid body.
|
2585
|
-
*/
|
2586
|
-
getEffectiveWorldInversePrincipalAngularInertiaSqrt(): SpdMatrix3 | undefined;
|
2587
|
-
/**
|
2588
|
-
* Gets the enabled rotations of the rigid body.
|
2589
|
-
* @returns The enabled rotations of the rigid body.
|
2590
|
-
*/
|
2591
|
-
getEnabledRotations(): Vector3Boolean;
|
2592
|
-
/**
|
2593
|
-
* Gets the enabled translations of the rigid body.
|
2594
|
-
* @returns The enabled translations of the rigid body.
|
2595
|
-
*/
|
2596
|
-
getEnabledTranslations(): Vector3Boolean;
|
2597
|
-
/**
|
2598
|
-
* Gets the gravity scale of the rigid body.
|
2599
|
-
* @returns The gravity scale of the rigid body.
|
2600
|
-
*/
|
2601
|
-
getGravityScale(): number;
|
2602
|
-
/**
|
2603
|
-
* Gets the inverse mass of the rigid body.
|
2604
|
-
* @returns The inverse mass of the rigid body.
|
2605
|
-
*/
|
2606
|
-
getInverseMass(): number | undefined;
|
2607
|
-
/**
|
2608
|
-
* Gets the inverse principal angular inertia square root of the rigid body.
|
2609
|
-
* @returns The inverse principal angular inertia square root of the rigid body.
|
2610
|
-
*/
|
2611
|
-
getInversePrincipalAngularInertiaSqrt(): Vector3Like | undefined;
|
2612
|
-
/**
|
2613
|
-
* Gets the linear damping of the rigid body.
|
2614
|
-
* @returns The linear damping of the rigid body.
|
2615
|
-
*/
|
2616
|
-
getLinearDamping(): number;
|
2617
|
-
/**
|
2618
|
-
* Gets the linear velocity of the rigid body.
|
2619
|
-
* @returns The linear velocity of the rigid body.
|
2620
|
-
*/
|
2621
|
-
getLinearVelocity(): Vector3Like;
|
2622
|
-
/**
|
2623
|
-
* Gets the local center of mass of the rigid body.
|
2624
|
-
* @returns The local center of mass of the rigid body.
|
2625
|
-
*/
|
2626
|
-
getLocalCenterOfMass(): Vector3Like;
|
2627
|
-
/**
|
2628
|
-
* Gets the mass of the rigid body.
|
2629
|
-
* @returns The mass of the rigid body.
|
2630
|
-
*/
|
2631
|
-
getMass(): number;
|
2632
|
-
/**
|
2633
|
-
* Gets the next kinematic rotation of the rigid body.
|
2634
|
-
* @returns The next kinematic rotation of the rigid body.
|
2635
|
-
*/
|
2636
|
-
getNextKinematicRotation(): QuaternionLike;
|
2637
|
-
/**
|
2638
|
-
* Gets the next kinematic translation of the rigid body.
|
2639
|
-
* @returns The next kinematic translation of the rigid body.
|
2640
|
-
*/
|
2641
|
-
getNextKinematicTranslation(): Vector3Like;
|
2642
|
-
/**
|
2643
|
-
* Gets the principal angular inertia of the rigid body.
|
2644
|
-
* @returns The principal angular inertia of the rigid body.
|
2645
|
-
*/
|
2646
|
-
getPrincipalAngularInertia(): Vector3Like;
|
2647
|
-
/**
|
2648
|
-
* Gets the principal angular inertia local frame of the rigid body.
|
2649
|
-
* @returns The principal angular inertia local frame of the rigid body.
|
2650
|
-
*/
|
2651
|
-
getPrincipalAngularInertiaLocalFrame(): QuaternionLike | undefined;
|
2652
|
-
/**
|
2653
|
-
* Gets the rotation of the rigid body.
|
2654
|
-
* @returns The rotation of the rigid body.
|
2655
|
-
*/
|
2656
|
-
getRotation(): QuaternionLike;
|
2657
|
-
/**
|
2658
|
-
* Gets the soft ccd prediction of the rigid body.
|
2659
|
-
* @returns The soft ccd prediction of the rigid body.
|
2660
|
-
*/
|
2661
|
-
getSoftCcdPrediction(): number;
|
2662
|
-
/**
|
2663
|
-
* Gets the translation of the rigid body.
|
2664
|
-
* @returns The translation of the rigid body.
|
2665
|
-
*/
|
2666
|
-
getTranslation(): Vector3Like;
|
2667
|
-
/**
|
2668
|
-
* Gets the type of the rigid body.
|
2669
|
-
* @returns The type of the rigid body.
|
2670
|
-
*/
|
2671
|
-
getType(): RigidBodyType;
|
2672
|
-
/**
|
2673
|
-
* Gets the world center of mass of the rigid body.
|
2674
|
-
* @returns The world center of mass of the rigid body.
|
2675
|
-
*/
|
2676
|
-
getWorldCenterOfMass(): Vector3Like | undefined;
|
2561
|
+
/** The rotation of the rigid body. */
|
2562
|
+
get rotation(): QuaternionLike;
|
2563
|
+
/** The soft continuous collision detection prediction of the rigid body. */
|
2564
|
+
get softCcdPrediction(): number;
|
2565
|
+
/** The type of the rigid body. */
|
2566
|
+
get type(): RigidBodyType;
|
2567
|
+
/** The world center of mass of the rigid body. */
|
2568
|
+
get worldCenterOfMass(): Vector3Like | undefined;
|
2677
2569
|
/**
|
2678
2570
|
* Sets the additional mass of the rigid body.
|
2679
2571
|
* @param additionalMass - The additional mass of the rigid body.
|
@@ -2714,16 +2606,16 @@ export declare class RigidBody {
|
|
2714
2606
|
* @param enabled - Whether the rigid body is enabled.
|
2715
2607
|
*/
|
2716
2608
|
setEnabled(enabled: boolean): void;
|
2609
|
+
/**
|
2610
|
+
* Sets whether the rigid body has enabled positional movement.
|
2611
|
+
* @param enabledPositions - Whether the rigid body has enabled positional movement.
|
2612
|
+
*/
|
2613
|
+
setEnabledPositions(enabledPositions: Vector3Boolean): void;
|
2717
2614
|
/**
|
2718
2615
|
* Sets whether the rigid body has enabled rotations.
|
2719
2616
|
* @param enabledRotations - Whether the rigid body has enabled rotations.
|
2720
2617
|
*/
|
2721
2618
|
setEnabledRotations(enabledRotations: Vector3Boolean): void;
|
2722
|
-
/**
|
2723
|
-
* Sets whether the rigid body has enabled translations.
|
2724
|
-
* @param enabledTranslations - Whether the rigid body has enabled translations.
|
2725
|
-
*/
|
2726
|
-
setEnabledTranslations(enabledTranslations: Vector3Boolean): void;
|
2727
2619
|
/**
|
2728
2620
|
* Sets the gravity scale of the rigid body.
|
2729
2621
|
* @param gravityScale - The gravity scale of the rigid body.
|
@@ -2745,10 +2637,15 @@ export declare class RigidBody {
|
|
2745
2637
|
*/
|
2746
2638
|
setNextKinematicRotation(nextKinematicRotation: QuaternionLike): void;
|
2747
2639
|
/**
|
2748
|
-
* Sets the next kinematic
|
2749
|
-
* @param
|
2640
|
+
* Sets the next kinematic position of the rigid body.
|
2641
|
+
* @param nextKinematicPosition - The next kinematic position of the rigid body.
|
2642
|
+
*/
|
2643
|
+
setNextKinematicPosition(nextKinematicPosition: Vector3Like): void;
|
2644
|
+
/**
|
2645
|
+
* Sets the position of the rigid body.
|
2646
|
+
* @param position - The position of the rigid body.
|
2750
2647
|
*/
|
2751
|
-
|
2648
|
+
setPosition(position: Vector3Like): void;
|
2752
2649
|
/**
|
2753
2650
|
* Sets the rotation of the rigid body.
|
2754
2651
|
* @param rotation - The rotation of the rigid body.
|
@@ -2769,11 +2666,6 @@ export declare class RigidBody {
|
|
2769
2666
|
* @param collisionGroups - The collision groups for solid colliders of the rigid body.
|
2770
2667
|
*/
|
2771
2668
|
setCollisionGroupsForSolidColliders(collisionGroups: CollisionGroups): void;
|
2772
|
-
/**
|
2773
|
-
* Sets the translation of the rigid body.
|
2774
|
-
* @param translation - The translation of the rigid body.
|
2775
|
-
*/
|
2776
|
-
setTranslation(translation: Vector3Like): void;
|
2777
2669
|
/**
|
2778
2670
|
* Sets the type of the rigid body.
|
2779
2671
|
* @param type - The type of the rigid body.
|
@@ -2827,15 +2719,21 @@ export declare class RigidBody {
|
|
2827
2719
|
* @returns The child colliders that were added to the rigid body.
|
2828
2720
|
*/
|
2829
2721
|
createAndAddChildCollidersToSimulation(colliderOptions: ColliderOptions[]): Collider[];
|
2722
|
+
/**
|
2723
|
+
* Gets the colliders of the rigid body by tag.
|
2724
|
+
* @param tag - The tag to filter by.
|
2725
|
+
* @returns The colliders of the rigid body with the given tag.
|
2726
|
+
*/
|
2727
|
+
getCollidersByTag(tag: string): Collider[];
|
2830
2728
|
|
2831
2729
|
/**
|
2832
2730
|
* Locks all rotations of the rigid body.
|
2833
2731
|
*/
|
2834
2732
|
lockAllRotations(): void;
|
2835
2733
|
/**
|
2836
|
-
* Locks all
|
2734
|
+
* Locks all positional movement of the rigid body.
|
2837
2735
|
*/
|
2838
|
-
|
2736
|
+
lockAllPositions(): void;
|
2839
2737
|
/**
|
2840
2738
|
* Removes the rigid body from the simulation it belongs to.
|
2841
2739
|
*/
|
@@ -2895,16 +2793,18 @@ export declare interface RigidBodyOptions {
|
|
2895
2793
|
dominanceGroup?: number;
|
2896
2794
|
/** Whether the rigid body is enabled. */
|
2897
2795
|
enabled?: boolean;
|
2796
|
+
/** The enabled axes of positional movement of the rigid body. */
|
2797
|
+
enabledPositions?: Vector3Boolean;
|
2898
2798
|
/** The enabled rotations of the rigid body. */
|
2899
2799
|
enabledRotations?: Vector3Boolean;
|
2900
|
-
/** The enabled translations of the rigid body. */
|
2901
|
-
enabledTranslations?: Vector3Boolean;
|
2902
2800
|
/** The gravity scale of the rigid body. */
|
2903
2801
|
gravityScale?: number;
|
2904
2802
|
/** The linear damping of the rigid body. */
|
2905
2803
|
linearDamping?: number;
|
2906
2804
|
/** The linear velocity of the rigid body. */
|
2907
2805
|
linearVelocity?: Vector3Like;
|
2806
|
+
/** The position of the rigid body. */
|
2807
|
+
position?: Vector3Like;
|
2908
2808
|
/** The rotation of the rigid body. */
|
2909
2809
|
rotation?: QuaternionLike;
|
2910
2810
|
/** The simulation the rigid body is in. If provided, the rigid body will be automatically added to the simulation. */
|
@@ -2913,8 +2813,6 @@ export declare interface RigidBodyOptions {
|
|
2913
2813
|
sleeping?: boolean;
|
2914
2814
|
/** The soft continuous collision detection prediction of the rigid body. */
|
2915
2815
|
softCcdPrediction?: number;
|
2916
|
-
/** The translation of the rigid body. */
|
2917
|
-
translation?: Vector3Like;
|
2918
2816
|
}
|
2919
2817
|
|
2920
2818
|
/** The types a RigidBody can be. @public */
|