hytopia 0.6.14 → 0.6.16

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.6.14",
3
+ "version": "0.6.16",
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
@@ -13434,6 +13434,36 @@
13434
13434
  "isProtected": false,
13435
13435
  "isAbstract": false
13436
13436
  },
13437
+ {
13438
+ "kind": "Property",
13439
+ "canonicalReference": "server!Entity#depth:member",
13440
+ "docComment": "/**\n * The depth (z-axis) of the entity's model with scale consideration or block entity's y*2 half extents.\n */\n",
13441
+ "excerptTokens": [
13442
+ {
13443
+ "kind": "Content",
13444
+ "text": "get depth(): "
13445
+ },
13446
+ {
13447
+ "kind": "Content",
13448
+ "text": "number"
13449
+ },
13450
+ {
13451
+ "kind": "Content",
13452
+ "text": ";"
13453
+ }
13454
+ ],
13455
+ "isReadonly": true,
13456
+ "isOptional": false,
13457
+ "releaseTag": "Public",
13458
+ "name": "depth",
13459
+ "propertyTypeTokenRange": {
13460
+ "startIndex": 1,
13461
+ "endIndex": 2
13462
+ },
13463
+ "isStatic": false,
13464
+ "isProtected": false,
13465
+ "isAbstract": false
13466
+ },
13437
13467
  {
13438
13468
  "kind": "Method",
13439
13469
  "canonicalReference": "server!Entity#despawn:member(1)",
@@ -13468,7 +13498,7 @@
13468
13498
  {
13469
13499
  "kind": "Property",
13470
13500
  "canonicalReference": "server!Entity#height:member",
13471
- "docComment": "/**\n * The height of the entity's model or block entity's y*2 half extents.\n */\n",
13501
+ "docComment": "/**\n * The height (y-axis) of the entity's model with scale consideration or block entity's y*2 half extents.\n */\n",
13472
13502
  "excerptTokens": [
13473
13503
  {
13474
13504
  "kind": "Content",
@@ -14915,6 +14945,36 @@
14915
14945
  "isProtected": false,
14916
14946
  "isAbstract": false
14917
14947
  },
14948
+ {
14949
+ "kind": "Property",
14950
+ "canonicalReference": "server!Entity#width:member",
14951
+ "docComment": "/**\n * The width (x-axis) of the entity's model with scale consideration or block entity's x*2 half extents.\n */\n",
14952
+ "excerptTokens": [
14953
+ {
14954
+ "kind": "Content",
14955
+ "text": "get width(): "
14956
+ },
14957
+ {
14958
+ "kind": "Content",
14959
+ "text": "number"
14960
+ },
14961
+ {
14962
+ "kind": "Content",
14963
+ "text": ";"
14964
+ }
14965
+ ],
14966
+ "isReadonly": true,
14967
+ "isOptional": false,
14968
+ "releaseTag": "Public",
14969
+ "name": "width",
14970
+ "propertyTypeTokenRange": {
14971
+ "startIndex": 1,
14972
+ "endIndex": 2
14973
+ },
14974
+ "isStatic": false,
14975
+ "isProtected": false,
14976
+ "isAbstract": false
14977
+ },
14918
14978
  {
14919
14979
  "kind": "Property",
14920
14980
  "canonicalReference": "server!Entity#world:member",
@@ -27743,6 +27803,54 @@
27743
27803
  "isAbstract": false,
27744
27804
  "name": "getBoundingBox"
27745
27805
  },
27806
+ {
27807
+ "kind": "Method",
27808
+ "canonicalReference": "server!ModelRegistry#getDepth:member(1)",
27809
+ "docComment": "/**\n * Retrieves the Z-axis depth of a model for a scale of 1.\n *\n * @param modelUri - The URI of the model to retrieve the depth for.\n *\n * @returns The depth of the model.\n */\n",
27810
+ "excerptTokens": [
27811
+ {
27812
+ "kind": "Content",
27813
+ "text": "getDepth(modelUri: "
27814
+ },
27815
+ {
27816
+ "kind": "Content",
27817
+ "text": "string"
27818
+ },
27819
+ {
27820
+ "kind": "Content",
27821
+ "text": "): "
27822
+ },
27823
+ {
27824
+ "kind": "Content",
27825
+ "text": "number"
27826
+ },
27827
+ {
27828
+ "kind": "Content",
27829
+ "text": ";"
27830
+ }
27831
+ ],
27832
+ "isStatic": false,
27833
+ "returnTypeTokenRange": {
27834
+ "startIndex": 3,
27835
+ "endIndex": 4
27836
+ },
27837
+ "releaseTag": "Public",
27838
+ "isProtected": false,
27839
+ "overloadIndex": 1,
27840
+ "parameters": [
27841
+ {
27842
+ "parameterName": "modelUri",
27843
+ "parameterTypeTokenRange": {
27844
+ "startIndex": 1,
27845
+ "endIndex": 2
27846
+ },
27847
+ "isOptional": false
27848
+ }
27849
+ ],
27850
+ "isOptional": false,
27851
+ "isAbstract": false,
27852
+ "name": "getDepth"
27853
+ },
27746
27854
  {
27747
27855
  "kind": "Method",
27748
27856
  "canonicalReference": "server!ModelRegistry#getHeight:member(1)",
@@ -27908,6 +28016,54 @@
27908
28016
  "isAbstract": false,
27909
28017
  "name": "getTrimesh"
27910
28018
  },
28019
+ {
28020
+ "kind": "Method",
28021
+ "canonicalReference": "server!ModelRegistry#getWidth:member(1)",
28022
+ "docComment": "/**\n * Retrieves the X-axis width of a model for a scale of 1.\n *\n * @param modelUri - The URI of the model to retrieve the width for.\n *\n * @returns The width of the model.\n */\n",
28023
+ "excerptTokens": [
28024
+ {
28025
+ "kind": "Content",
28026
+ "text": "getWidth(modelUri: "
28027
+ },
28028
+ {
28029
+ "kind": "Content",
28030
+ "text": "string"
28031
+ },
28032
+ {
28033
+ "kind": "Content",
28034
+ "text": "): "
28035
+ },
28036
+ {
28037
+ "kind": "Content",
28038
+ "text": "number"
28039
+ },
28040
+ {
28041
+ "kind": "Content",
28042
+ "text": ";"
28043
+ }
28044
+ ],
28045
+ "isStatic": false,
28046
+ "returnTypeTokenRange": {
28047
+ "startIndex": 3,
28048
+ "endIndex": 4
28049
+ },
28050
+ "releaseTag": "Public",
28051
+ "isProtected": false,
28052
+ "overloadIndex": 1,
28053
+ "parameters": [
28054
+ {
28055
+ "parameterName": "modelUri",
28056
+ "parameterTypeTokenRange": {
28057
+ "startIndex": 1,
28058
+ "endIndex": 2
28059
+ },
28060
+ "isOptional": false
28061
+ }
28062
+ ],
28063
+ "isOptional": false,
28064
+ "isAbstract": false,
28065
+ "name": "getWidth"
28066
+ },
27911
28067
  {
27912
28068
  "kind": "Property",
27913
28069
  "canonicalReference": "server!ModelRegistry.instance:member",
@@ -48585,6 +48741,36 @@
48585
48741
  "isProtected": false,
48586
48742
  "isAbstract": false
48587
48743
  },
48744
+ {
48745
+ "kind": "Property",
48746
+ "canonicalReference": "server!WorldLoop#isStarted:member",
48747
+ "docComment": "/**\n * Whether the world loop is started.\n */\n",
48748
+ "excerptTokens": [
48749
+ {
48750
+ "kind": "Content",
48751
+ "text": "get isStarted(): "
48752
+ },
48753
+ {
48754
+ "kind": "Content",
48755
+ "text": "boolean"
48756
+ },
48757
+ {
48758
+ "kind": "Content",
48759
+ "text": ";"
48760
+ }
48761
+ ],
48762
+ "isReadonly": true,
48763
+ "isOptional": false,
48764
+ "releaseTag": "Public",
48765
+ "name": "isStarted",
48766
+ "propertyTypeTokenRange": {
48767
+ "startIndex": 1,
48768
+ "endIndex": 2
48769
+ },
48770
+ "isStatic": false,
48771
+ "isProtected": false,
48772
+ "isAbstract": false
48773
+ },
48588
48774
  {
48589
48775
  "kind": "Property",
48590
48776
  "canonicalReference": "server!WorldLoop#nextTickMs:member",
package/server.d.ts CHANGED
@@ -1759,6 +1759,8 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1759
1759
 
1760
1760
 
1761
1761
 
1762
+
1763
+
1762
1764
 
1763
1765
 
1764
1766
 
@@ -1774,7 +1776,9 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1774
1776
  get blockTextureUri(): string | undefined;
1775
1777
  /** The controller for the entity. */
1776
1778
  get controller(): BaseEntityController | undefined;
1777
- /** The height of the entity's model or block entity's y*2 half extents. */
1779
+ /** The depth (z-axis) of the entity's model with scale consideration or block entity's y*2 half extents. */
1780
+ get depth(): number;
1781
+ /** The height (y-axis) of the entity's model with scale consideration or block entity's y*2 half extents. */
1778
1782
  get height(): number;
1779
1783
  /** The playback rate of the entity's model animations. */
1780
1784
  get modelAnimationsPlaybackRate(): number;
@@ -1812,6 +1816,8 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1812
1816
  get isModelEntity(): boolean;
1813
1817
  /** Whether the entity is spawned. */
1814
1818
  get isSpawned(): boolean;
1819
+ /** The width (x-axis) of the entity's model with scale consideration or block entity's x*2 half extents. */
1820
+ get width(): number;
1815
1821
  /** The world the entity is in. */
1816
1822
  get world(): World | undefined;
1817
1823
  /**
@@ -3463,6 +3469,13 @@ export declare class ModelRegistry {
3463
3469
  * @returns The bounding box of the model.
3464
3470
  */
3465
3471
  getBoundingBox(modelUri: string): ModelBoundingBox;
3472
+ /**
3473
+ * Retrieves the Z-axis depth of a model for a scale of 1.
3474
+ *
3475
+ * @param modelUri - The URI of the model to retrieve the depth for.
3476
+ * @returns The depth of the model.
3477
+ */
3478
+ getDepth(modelUri: string): number;
3466
3479
  /**
3467
3480
  * Retrieves the Y-axis height of a model for a scale of 1.
3468
3481
  *
@@ -3485,6 +3498,13 @@ export declare class ModelRegistry {
3485
3498
  * @returns The trimesh of the model.
3486
3499
  */
3487
3500
  getTrimesh(modelUri: string, scale?: number): ModelTrimesh | undefined;
3501
+ /**
3502
+ * Retrieves the X-axis width of a model for a scale of 1.
3503
+ *
3504
+ * @param modelUri - The URI of the model to retrieve the width for.
3505
+ * @returns The width of the model.
3506
+ */
3507
+ getWidth(modelUri: string): number;
3488
3508
  /**
3489
3509
  * Checks if a model has a node with the given name.
3490
3510
  *
@@ -6250,6 +6270,8 @@ export declare class WorldLoop extends EventRouter {
6250
6270
 
6251
6271
  /** The current tick of the world loop. */
6252
6272
  get currentTick(): number;
6273
+ /** Whether the world loop is started. */
6274
+ get isStarted(): boolean;
6253
6275
  /** The next tick time in milliseconds. */
6254
6276
  get nextTickMs(): number;
6255
6277
  /** The fixed timestep of the world loop in seconds. */