hytopia 0.5.23 → 0.6.1
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/bun-server.mjs +126 -126
- package/docs/server.defaultplayerentitycontroller.applydirectionalmovementrotations.md +13 -0
- package/docs/server.defaultplayerentitycontroller.jumplandheavyoneshotanimations.md +13 -0
- package/docs/server.defaultplayerentitycontroller.jumplandlightoneshotanimations.md +13 -0
- package/docs/server.defaultplayerentitycontroller.md +77 -1
- package/docs/server.defaultplayerentitycontroller.swimidleloopedanimations.md +13 -0
- package/docs/server.defaultplayerentitycontroller.swimloopedanimations.md +1 -1
- package/docs/server.defaultplayerentitycontrolleroptions.applydirectionalmovementrotations.md +13 -0
- package/docs/server.defaultplayerentitycontrolleroptions.jumplandheavyoneshotanimations.md +13 -0
- package/docs/server.defaultplayerentitycontrolleroptions.jumplandlightoneshotanimations.md +13 -0
- package/docs/server.defaultplayerentitycontrolleroptions.md +77 -1
- package/docs/server.defaultplayerentitycontrolleroptions.swimidleloopedanimations.md +13 -0
- package/docs/server.defaultplayerentitycontrolleroptions.swimloopedanimations.md +1 -1
- package/docs/server.entity.md +43 -1
- package/docs/server.entity.modelscale.md +1 -1
- package/docs/server.entity.stopallmodelanimations.md +53 -0
- package/docs/server.entity.stopallmodelloopedanimations.md +53 -0
- package/docs/server.entity.stopallmodeloneshotanimations.md +53 -0
- package/docs/server.moveoptions.md +1 -0
- package/docs/server.simpleentitycontroller.idleloopedanimations.md +13 -0
- package/docs/server.simpleentitycontroller.idleloopedanimationsspeed.md +13 -0
- package/docs/server.simpleentitycontroller.jumponeshotanimations.md +13 -0
- package/docs/server.simpleentitycontroller.md +153 -0
- package/docs/server.simpleentitycontroller.moveloopedanimations.md +13 -0
- package/docs/server.simpleentitycontroller.moveloopedanimationsspeed.md +13 -0
- package/docs/server.simpleentitycontroller.movespeed.md +13 -0
- package/docs/server.simpleentitycontroller.spawn.md +53 -0
- package/node-server.mjs +144 -144
- package/package.json +1 -1
- package/server.api.json +649 -48
- package/server.d.ts +83 -3
package/server.d.ts
CHANGED
@@ -1470,6 +1470,19 @@ export declare class DefaultPlayerEntity extends PlayerEntity {
|
|
1470
1470
|
* @public
|
1471
1471
|
*/
|
1472
1472
|
export declare class DefaultPlayerEntityController extends BaseEntityController {
|
1473
|
+
private static readonly BASE_ENTITY_HEIGHT;
|
1474
|
+
private static readonly GROUND_SENSOR_HEIGHT_SCALE;
|
1475
|
+
private static readonly GROUND_SENSOR_RADIUS_SCALE;
|
1476
|
+
private static readonly JUMP_LAND_HEAVY_VELOCITY_THRESHOLD;
|
1477
|
+
private static readonly WALL_COLLIDER_HEIGHT_SCALE;
|
1478
|
+
private static readonly WALL_COLLIDER_RADIUS_SCALE;
|
1479
|
+
private static readonly MOVEMENT_ROTATIONS;
|
1480
|
+
private static readonly SWIM_UPWARD_COOLDOWN_MS;
|
1481
|
+
private static readonly SWIMMING_DRAG_FACTOR;
|
1482
|
+
private static readonly WATER_ENTRY_SINKING_FACTOR;
|
1483
|
+
private static readonly WATER_ENTRY_SINKING_MS;
|
1484
|
+
/** Whether to apply directional rotations to the entity while moving, defaults to true. */
|
1485
|
+
applyDirectionalMovementRotations: boolean;
|
1473
1486
|
/** Whether to automatically cancel left click input after first processed tick, defaults to true. */
|
1474
1487
|
autoCancelMouseLeftClick: boolean;
|
1475
1488
|
/**
|
@@ -1500,6 +1513,10 @@ export declare class DefaultPlayerEntityController extends BaseEntityController
|
|
1500
1513
|
idleLoopedAnimations: string[];
|
1501
1514
|
/** The oneshot animation(s) that will play when the entity interacts (left click) */
|
1502
1515
|
interactOneshotAnimations: string[];
|
1516
|
+
/** The oneshot animation(s) that will play when the entity lands with a high velocity. */
|
1517
|
+
jumpLandHeavyOneshotAnimations: string[];
|
1518
|
+
/** The oneshot animation(s) that will play when the entity lands after jumping or being airborne. */
|
1519
|
+
jumpLandLightOneshotAnimations: string[];
|
1503
1520
|
/** The oneshot animation(s) that will play when the entity is jumping. */
|
1504
1521
|
jumpOneshotAnimations: string[];
|
1505
1522
|
/** The upward velocity applied to the entity when it jumps. */
|
@@ -1514,7 +1531,9 @@ export declare class DefaultPlayerEntityController extends BaseEntityController
|
|
1514
1531
|
swimFastVelocity: number;
|
1515
1532
|
/** The gravity modifier applied to the entity when swimming. */
|
1516
1533
|
swimGravity: number;
|
1517
|
-
/** The looped animation(s) that will play when the entity is swimming. */
|
1534
|
+
/** The looped animation(s) that will play when the entity is not moving while swimming. */
|
1535
|
+
swimIdleLoopedAnimations: string[];
|
1536
|
+
/** The looped animation(s) that will play when the entity is swimming in any direction. */
|
1518
1537
|
swimLoopedAnimations: string[];
|
1519
1538
|
/** The maximum downward velocity that the entity can reach when affected by gravity while swimming. */
|
1520
1539
|
swimMaxGravityVelocity: number;
|
@@ -1531,6 +1550,12 @@ export declare class DefaultPlayerEntityController extends BaseEntityController
|
|
1531
1550
|
|
1532
1551
|
|
1533
1552
|
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1557
|
+
|
1558
|
+
|
1534
1559
|
/**
|
1535
1560
|
* @param options - Options for the controller.
|
1536
1561
|
*/
|
@@ -1571,6 +1596,8 @@ export declare class DefaultPlayerEntityController extends BaseEntityController
|
|
1571
1596
|
|
1572
1597
|
/** Options for creating a DefaultPlayerEntityController instance. @public */
|
1573
1598
|
export declare interface DefaultPlayerEntityControllerOptions {
|
1599
|
+
/** Whether to apply directional rotations to the entity while moving, defaults to true. */
|
1600
|
+
applyDirectionalMovementRotations?: boolean;
|
1574
1601
|
/** Whether to automatically cancel left click input after first processed tick, defaults to true. */
|
1575
1602
|
autoCancelMouseLeftClick?: boolean;
|
1576
1603
|
/** A function allowing custom logic to determine if the entity can jump. */
|
@@ -1587,6 +1614,10 @@ export declare interface DefaultPlayerEntityControllerOptions {
|
|
1587
1614
|
interactOneshotAnimations?: string[];
|
1588
1615
|
/** Overrides the animation(s) that will play when the entity is jumping. */
|
1589
1616
|
jumpOneshotAnimations?: string[];
|
1617
|
+
/** Overrides the animation(s) that will play when the entity lands with a high velocity. */
|
1618
|
+
jumpLandHeavyOneshotAnimations?: string[];
|
1619
|
+
/** Overrides the animation(s) that will play when the entity lands after jumping or being airborne. */
|
1620
|
+
jumpLandLightOneshotAnimations?: string[];
|
1590
1621
|
/** The upward velocity applied to the entity when it jumps. */
|
1591
1622
|
jumpVelocity?: number;
|
1592
1623
|
/** The normalized horizontal velocity applied to the entity when it runs. */
|
@@ -1601,8 +1632,10 @@ export declare interface DefaultPlayerEntityControllerOptions {
|
|
1601
1632
|
swimGravity?: number;
|
1602
1633
|
/** The maximum downward velocity that the entity can reach when affected by gravity while swimming. */
|
1603
1634
|
swimMaxGravityVelocity?: number;
|
1604
|
-
/** The looped animation(s) that will play when the entity is swimming. */
|
1635
|
+
/** The looped animation(s) that will play when the entity is swimming in any direction. */
|
1605
1636
|
swimLoopedAnimations?: string[];
|
1637
|
+
/** The looped animation(s) that will play when the entity is not moving while swimming. */
|
1638
|
+
swimIdleLoopedAnimations?: string[];
|
1606
1639
|
/** The normalized horizontal velocity applied to the entity when it swims slowly (equivalent to walking). */
|
1607
1640
|
swimSlowVelocity?: number;
|
1608
1641
|
/** The upward velocity applied to the entity when swimming. */
|
@@ -1734,7 +1767,7 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1734
1767
|
/** The preferred shape of the entity's model when automatically generating its collider when no explicit colliders are provided. */
|
1735
1768
|
get modelPreferredShape(): ColliderShape | undefined;
|
1736
1769
|
/** The scale of the entity's model. */
|
1737
|
-
get modelScale(): number
|
1770
|
+
get modelScale(): number;
|
1738
1771
|
/** The URI or path to the .gltf model asset to be used for the entity. */
|
1739
1772
|
get modelUri(): string | undefined;
|
1740
1773
|
/** The name of the entity. */
|
@@ -1840,6 +1873,27 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1840
1873
|
* @param animations - The animations to start.
|
1841
1874
|
*/
|
1842
1875
|
startModelOneshotAnimations(animations: string[]): void;
|
1876
|
+
/**
|
1877
|
+
* Stops all looped and oneshot animations for the entity,
|
1878
|
+
* optionally excluded the provided animations from stopping.
|
1879
|
+
*
|
1880
|
+
* @param excludedAnimations - The animations to exclude from being stopped.
|
1881
|
+
*/
|
1882
|
+
stopAllModelAnimations(excludedAnimations?: string[]): void;
|
1883
|
+
/**
|
1884
|
+
* Stops all looped animations for the entity, optionally
|
1885
|
+
* excluded the provided animations from stopping.
|
1886
|
+
*
|
1887
|
+
* @param excludedAnimations - The animations to exclude from being stopped.
|
1888
|
+
*/
|
1889
|
+
stopAllModelLoopedAnimations(excludedAnimations?: string[]): void;
|
1890
|
+
/**
|
1891
|
+
* Stops all oneshot animations for the entity, optionally
|
1892
|
+
* excluded the provided animations from stopping.
|
1893
|
+
*
|
1894
|
+
* @param excludedAnimations - The animations to exclude from being stopped.
|
1895
|
+
*/
|
1896
|
+
stopAllModelOneshotAnimations(excludedAnimations?: string[]): void;
|
1843
1897
|
/**
|
1844
1898
|
* Stops the provided model animations for the entity.
|
1845
1899
|
*
|
@@ -1856,6 +1910,7 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
|
|
1856
1910
|
|
1857
1911
|
|
1858
1912
|
|
1913
|
+
|
1859
1914
|
}
|
1860
1915
|
|
1861
1916
|
/** Event types an Entity instance can emit. See {@link EntityEventPayloads} for the payloads. @public */
|
@@ -3298,6 +3353,8 @@ export declare type MoveOptions = {
|
|
3298
3353
|
y?: boolean;
|
3299
3354
|
z?: boolean;
|
3300
3355
|
};
|
3356
|
+
/** Whether to start the idle animations when the entity finishes moving. Defaults to true. */
|
3357
|
+
moveStartIdleAnimationsOnCompletion?: boolean;
|
3301
3358
|
};
|
3302
3359
|
|
3303
3360
|
/** The options for an error type "none" collider. @public */
|
@@ -4902,6 +4959,20 @@ export declare interface SceneUIOptions {
|
|
4902
4959
|
* @public
|
4903
4960
|
*/
|
4904
4961
|
export declare class SimpleEntityController extends BaseEntityController {
|
4962
|
+
/** The speed at which to rotate to the target coordinate when facing. Can be altered while facing. */
|
4963
|
+
private faceSpeed;
|
4964
|
+
/** The animations to loop when the entity is idle. */
|
4965
|
+
idleLoopedAnimations: string[];
|
4966
|
+
/** The speed at which to loop the idle animations. */
|
4967
|
+
idleLoopedAnimationsSpeed: number | undefined;
|
4968
|
+
/** The animations to play when the entity jumps. */
|
4969
|
+
jumpOneshotAnimations: string[];
|
4970
|
+
/** The animations to loop when the entity is moving. */
|
4971
|
+
moveLoopedAnimations: string[];
|
4972
|
+
/** The speed at which to loop the move animations. */
|
4973
|
+
moveLoopedAnimationsSpeed: number | undefined;
|
4974
|
+
/** The speed at which to move the entity. Can be altered while moving. */
|
4975
|
+
moveSpeed: number;
|
4905
4976
|
|
4906
4977
|
|
4907
4978
|
|
@@ -4912,6 +4983,12 @@ export declare class SimpleEntityController extends BaseEntityController {
|
|
4912
4983
|
|
4913
4984
|
|
4914
4985
|
|
4986
|
+
/**
|
4987
|
+
* Override of the {@link BaseEntityController.spawn} method. Starts
|
4988
|
+
* the set idle animations (if any) when the entity is spawned.
|
4989
|
+
* @param entity - The entity that was spawned.
|
4990
|
+
*/
|
4991
|
+
spawn(entity: Entity): void;
|
4915
4992
|
/**
|
4916
4993
|
* Rotates the entity at a given speed to face a target coordinate.
|
4917
4994
|
*
|
@@ -4946,6 +5023,9 @@ export declare class SimpleEntityController extends BaseEntityController {
|
|
4946
5023
|
*/
|
4947
5024
|
move(target: Vector3Like, speed: number, options?: MoveOptions): void;
|
4948
5025
|
|
5026
|
+
|
5027
|
+
|
5028
|
+
|
4949
5029
|
}
|
4950
5030
|
|
4951
5031
|
/**
|