hytopia 0.5.23 → 0.5.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.5.23",
3
+ "version": "0.5.24",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./node-server.mjs",
package/server.api.json CHANGED
@@ -25860,7 +25860,7 @@
25860
25860
  },
25861
25861
  {
25862
25862
  "kind": "Content",
25863
- "text": ";\n moveIgnoreAxes?: {\n x?: boolean;\n y?: boolean;\n z?: boolean;\n };\n}"
25863
+ "text": ";\n moveIgnoreAxes?: {\n x?: boolean;\n y?: boolean;\n z?: boolean;\n };\n moveStartIdleAnimationsOnCompletion?: boolean;\n}"
25864
25864
  },
25865
25865
  {
25866
25866
  "kind": "Content",
@@ -38430,6 +38430,66 @@
38430
38430
  "isAbstract": false,
38431
38431
  "name": "face"
38432
38432
  },
38433
+ {
38434
+ "kind": "Property",
38435
+ "canonicalReference": "server!SimpleEntityController#idleLoopedAnimations:member",
38436
+ "docComment": "/**\n * The animations to loop when the entity is idle.\n */\n",
38437
+ "excerptTokens": [
38438
+ {
38439
+ "kind": "Content",
38440
+ "text": "idleLoopedAnimations: "
38441
+ },
38442
+ {
38443
+ "kind": "Content",
38444
+ "text": "string[]"
38445
+ },
38446
+ {
38447
+ "kind": "Content",
38448
+ "text": ";"
38449
+ }
38450
+ ],
38451
+ "isReadonly": false,
38452
+ "isOptional": false,
38453
+ "releaseTag": "Public",
38454
+ "name": "idleLoopedAnimations",
38455
+ "propertyTypeTokenRange": {
38456
+ "startIndex": 1,
38457
+ "endIndex": 2
38458
+ },
38459
+ "isStatic": false,
38460
+ "isProtected": false,
38461
+ "isAbstract": false
38462
+ },
38463
+ {
38464
+ "kind": "Property",
38465
+ "canonicalReference": "server!SimpleEntityController#idleLoopedAnimationsSpeed:member",
38466
+ "docComment": "/**\n * The speed at which to loop the idle animations.\n */\n",
38467
+ "excerptTokens": [
38468
+ {
38469
+ "kind": "Content",
38470
+ "text": "idleLoopedAnimationsSpeed: "
38471
+ },
38472
+ {
38473
+ "kind": "Content",
38474
+ "text": "number | undefined"
38475
+ },
38476
+ {
38477
+ "kind": "Content",
38478
+ "text": ";"
38479
+ }
38480
+ ],
38481
+ "isReadonly": false,
38482
+ "isOptional": false,
38483
+ "releaseTag": "Public",
38484
+ "name": "idleLoopedAnimationsSpeed",
38485
+ "propertyTypeTokenRange": {
38486
+ "startIndex": 1,
38487
+ "endIndex": 2
38488
+ },
38489
+ "isStatic": false,
38490
+ "isProtected": false,
38491
+ "isAbstract": false
38492
+ },
38433
38493
  {
38434
38494
  "kind": "Method",
38435
38495
  "canonicalReference": "server!SimpleEntityController#jump:member(1)",
@@ -38478,6 +38538,36 @@
38478
38538
  "isAbstract": false,
38479
38539
  "name": "jump"
38480
38540
  },
38541
+ {
38542
+ "kind": "Property",
38543
+ "canonicalReference": "server!SimpleEntityController#jumpOneshotAnimations:member",
38544
+ "docComment": "/**\n * The animations to play when the entity jumps.\n */\n",
38545
+ "excerptTokens": [
38546
+ {
38547
+ "kind": "Content",
38548
+ "text": "jumpOneshotAnimations: "
38549
+ },
38550
+ {
38551
+ "kind": "Content",
38552
+ "text": "string[]"
38553
+ },
38554
+ {
38555
+ "kind": "Content",
38556
+ "text": ";"
38557
+ }
38558
+ ],
38559
+ "isReadonly": false,
38560
+ "isOptional": false,
38561
+ "releaseTag": "Public",
38562
+ "name": "jumpOneshotAnimations",
38563
+ "propertyTypeTokenRange": {
38564
+ "startIndex": 1,
38565
+ "endIndex": 2
38566
+ },
38567
+ "isStatic": false,
38568
+ "isProtected": false,
38569
+ "isAbstract": false
38570
+ },
38481
38571
  {
38482
38572
  "kind": "Method",
38483
38573
  "canonicalReference": "server!SimpleEntityController#move:member(1)",
@@ -38559,6 +38649,145 @@
38559
38649
  "isOptional": false,
38560
38650
  "isAbstract": false,
38561
38651
  "name": "move"
38652
+ },
38653
+ {
38654
+ "kind": "Property",
38655
+ "canonicalReference": "server!SimpleEntityController#moveLoopedAnimations:member",
38656
+ "docComment": "/**\n * The animations to loop when the entity is moving.\n */\n",
38657
+ "excerptTokens": [
38658
+ {
38659
+ "kind": "Content",
38660
+ "text": "moveLoopedAnimations: "
38661
+ },
38662
+ {
38663
+ "kind": "Content",
38664
+ "text": "string[]"
38665
+ },
38666
+ {
38667
+ "kind": "Content",
38668
+ "text": ";"
38669
+ }
38670
+ ],
38671
+ "isReadonly": false,
38672
+ "isOptional": false,
38673
+ "releaseTag": "Public",
38674
+ "name": "moveLoopedAnimations",
38675
+ "propertyTypeTokenRange": {
38676
+ "startIndex": 1,
38677
+ "endIndex": 2
38678
+ },
38679
+ "isStatic": false,
38680
+ "isProtected": false,
38681
+ "isAbstract": false
38682
+ },
38683
+ {
38684
+ "kind": "Property",
38685
+ "canonicalReference": "server!SimpleEntityController#moveLoopedAnimationsSpeed:member",
38686
+ "docComment": "/**\n * The speed at which to loop the move animations.\n */\n",
38687
+ "excerptTokens": [
38688
+ {
38689
+ "kind": "Content",
38690
+ "text": "moveLoopedAnimationsSpeed: "
38691
+ },
38692
+ {
38693
+ "kind": "Content",
38694
+ "text": "number | undefined"
38695
+ },
38696
+ {
38697
+ "kind": "Content",
38698
+ "text": ";"
38699
+ }
38700
+ ],
38701
+ "isReadonly": false,
38702
+ "isOptional": false,
38703
+ "releaseTag": "Public",
38704
+ "name": "moveLoopedAnimationsSpeed",
38705
+ "propertyTypeTokenRange": {
38706
+ "startIndex": 1,
38707
+ "endIndex": 2
38708
+ },
38709
+ "isStatic": false,
38710
+ "isProtected": false,
38711
+ "isAbstract": false
38712
+ },
38713
+ {
38714
+ "kind": "Property",
38715
+ "canonicalReference": "server!SimpleEntityController#moveSpeed:member",
38716
+ "docComment": "/**\n * The speed at which to move the entity. Can be altered while moving.\n */\n",
38717
+ "excerptTokens": [
38718
+ {
38719
+ "kind": "Content",
38720
+ "text": "moveSpeed: "
38721
+ },
38722
+ {
38723
+ "kind": "Content",
38724
+ "text": "number"
38725
+ },
38726
+ {
38727
+ "kind": "Content",
38728
+ "text": ";"
38729
+ }
38730
+ ],
38731
+ "isReadonly": false,
38732
+ "isOptional": false,
38733
+ "releaseTag": "Public",
38734
+ "name": "moveSpeed",
38735
+ "propertyTypeTokenRange": {
38736
+ "startIndex": 1,
38737
+ "endIndex": 2
38738
+ },
38739
+ "isStatic": false,
38740
+ "isProtected": false,
38741
+ "isAbstract": false
38742
+ },
38743
+ {
38744
+ "kind": "Method",
38745
+ "canonicalReference": "server!SimpleEntityController#spawn:member(1)",
38746
+ "docComment": "/**\n * Override of the {@link BaseEntityController.spawn} method. Starts the set idle animations (if any) when the entity is spawned.\n *\n * @param entity - The entity that was spawned.\n */\n",
38747
+ "excerptTokens": [
38748
+ {
38749
+ "kind": "Content",
38750
+ "text": "spawn(entity: "
38751
+ },
38752
+ {
38753
+ "kind": "Reference",
38754
+ "text": "Entity",
38755
+ "canonicalReference": "server!Entity:class"
38756
+ },
38757
+ {
38758
+ "kind": "Content",
38759
+ "text": "): "
38760
+ },
38761
+ {
38762
+ "kind": "Content",
38763
+ "text": "void"
38764
+ },
38765
+ {
38766
+ "kind": "Content",
38767
+ "text": ";"
38768
+ }
38769
+ ],
38770
+ "isStatic": false,
38771
+ "returnTypeTokenRange": {
38772
+ "startIndex": 3,
38773
+ "endIndex": 4
38774
+ },
38775
+ "releaseTag": "Public",
38776
+ "isProtected": false,
38777
+ "overloadIndex": 1,
38778
+ "parameters": [
38779
+ {
38780
+ "parameterName": "entity",
38781
+ "parameterTypeTokenRange": {
38782
+ "startIndex": 1,
38783
+ "endIndex": 2
38784
+ },
38785
+ "isOptional": false
38786
+ }
38787
+ ],
38788
+ "isOptional": false,
38789
+ "isAbstract": false,
38790
+ "name": "spawn"
38562
38791
  }
38563
38792
  ],
38564
38793
  "extendsTokenRange": {
package/server.d.ts CHANGED
@@ -3298,6 +3298,8 @@ export declare type MoveOptions = {
3298
3298
  y?: boolean;
3299
3299
  z?: boolean;
3300
3300
  };
3301
+ /** Whether to start the idle animations when the entity finishes moving. Defaults to true. */
3302
+ moveStartIdleAnimationsOnCompletion?: boolean;
3301
3303
  };
3302
3304
 
3303
3305
  /** The options for an error type "none" collider. @public */
@@ -4902,6 +4904,20 @@ export declare interface SceneUIOptions {
4902
4904
  * @public
4903
4905
  */
4904
4906
  export declare class SimpleEntityController extends BaseEntityController {
4907
+ /** The speed at which to rotate to the target coordinate when facing. Can be altered while facing. */
4908
+ private faceSpeed;
4909
+ /** The animations to loop when the entity is idle. */
4910
+ idleLoopedAnimations: string[];
4911
+ /** The speed at which to loop the idle animations. */
4912
+ idleLoopedAnimationsSpeed: number | undefined;
4913
+ /** The animations to play when the entity jumps. */
4914
+ jumpOneshotAnimations: string[];
4915
+ /** The animations to loop when the entity is moving. */
4916
+ moveLoopedAnimations: string[];
4917
+ /** The speed at which to loop the move animations. */
4918
+ moveLoopedAnimationsSpeed: number | undefined;
4919
+ /** The speed at which to move the entity. Can be altered while moving. */
4920
+ moveSpeed: number;
4905
4921
 
4906
4922
 
4907
4923
 
@@ -4912,6 +4928,12 @@ export declare class SimpleEntityController extends BaseEntityController {
4912
4928
 
4913
4929
 
4914
4930
 
4931
+ /**
4932
+ * Override of the {@link BaseEntityController.spawn} method. Starts
4933
+ * the set idle animations (if any) when the entity is spawned.
4934
+ * @param entity - The entity that was spawned.
4935
+ */
4936
+ spawn(entity: Entity): void;
4915
4937
  /**
4916
4938
  * Rotates the entity at a given speed to face a target coordinate.
4917
4939
  *
@@ -4946,6 +4968,9 @@ export declare class SimpleEntityController extends BaseEntityController {
4946
4968
  */
4947
4969
  move(target: Vector3Like, speed: number, options?: MoveOptions): void;
4948
4970
 
4971
+
4972
+
4973
+
4949
4974
  }
4950
4975
 
4951
4976
  /**