hytopia 0.1.77 → 0.1.79

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 (37) hide show
  1. package/docs/server.entity.despawn.md +1 -1
  2. package/docs/server.entity.md +44 -2
  3. package/docs/server.entity.parent.md +13 -0
  4. package/docs/server.entity.parentnodename.md +13 -0
  5. package/docs/server.entity.spawn.md +19 -3
  6. package/docs/server.entitymanager.getentitychildren.md +55 -0
  7. package/docs/server.entitymanager.md +14 -0
  8. package/docs/server.entityoptions.md +38 -0
  9. package/docs/server.entityoptions.parent.md +13 -0
  10. package/docs/server.entityoptions.parentnodename.md +13 -0
  11. package/docs/server.gameserver.md +2 -2
  12. package/docs/{server.gameserver.modelmanager.md → server.gameserver.modelregistry.md} +3 -3
  13. package/docs/server.md +1 -1
  14. package/docs/{server.modelmanager.getboundingbox.md → server.modelregistry.getboundingbox.md} +2 -2
  15. package/docs/server.modelregistry.getnodenames.md +55 -0
  16. package/docs/server.modelregistry.instance.md +13 -0
  17. package/docs/server.modelregistry.md +139 -0
  18. package/docs/server.modelregistry.modelhasnode.md +71 -0
  19. package/examples/ai-agents/README.md +47 -0
  20. package/examples/ai-agents/assets/map.json +25828 -0
  21. package/examples/ai-agents/assets/ui/index.html +215 -0
  22. package/examples/ai-agents/index.ts +350 -0
  23. package/examples/ai-agents/package.json +16 -0
  24. package/examples/ai-agents/src/BaseAgent.ts +482 -0
  25. package/examples/ai-agents/src/behaviors/FishingBehavior.ts +181 -0
  26. package/examples/ai-agents/src/behaviors/FollowBehavior.ts +171 -0
  27. package/examples/ai-agents/src/behaviors/MiningBehavior.ts +226 -0
  28. package/examples/ai-agents/src/behaviors/PathfindingBehavior.ts +435 -0
  29. package/examples/ai-agents/src/behaviors/SpeakBehavior.ts +50 -0
  30. package/examples/ai-agents/src/behaviors/TradeBehavior.ts +254 -0
  31. package/examples/entity-controller/MyEntityController.ts +1 -1
  32. package/package.json +1 -1
  33. package/server.api.json +324 -21
  34. package/server.d.ts +47 -22
  35. package/server.js +83 -83
  36. package/docs/server.modelmanager.instance.md +0 -13
  37. package/docs/server.modelmanager.md +0 -111
package/server.api.json CHANGED
@@ -9692,7 +9692,7 @@
9692
9692
  {
9693
9693
  "kind": "Method",
9694
9694
  "canonicalReference": "server!Entity#despawn:member(1)",
9695
- "docComment": "/**\n * Despawns the entity from the world.\n */\n",
9695
+ "docComment": "/**\n * Despawns the entity and all children from the world.\n */\n",
9696
9696
  "excerptTokens": [
9697
9697
  {
9698
9698
  "kind": "Content",
@@ -10423,6 +10423,71 @@
10423
10423
  "isProtected": false,
10424
10424
  "isAbstract": false
10425
10425
  },
10426
+ {
10427
+ "kind": "Property",
10428
+ "canonicalReference": "server!Entity#parent:member",
10429
+ "docComment": "/**\n * The parent entity of the entity.\n */\n",
10430
+ "excerptTokens": [
10431
+ {
10432
+ "kind": "Content",
10433
+ "text": "get parent(): "
10434
+ },
10435
+ {
10436
+ "kind": "Reference",
10437
+ "text": "Entity",
10438
+ "canonicalReference": "server!Entity:class"
10439
+ },
10440
+ {
10441
+ "kind": "Content",
10442
+ "text": " | undefined"
10443
+ },
10444
+ {
10445
+ "kind": "Content",
10446
+ "text": ";"
10447
+ }
10448
+ ],
10449
+ "isReadonly": true,
10450
+ "isOptional": false,
10451
+ "releaseTag": "Public",
10452
+ "name": "parent",
10453
+ "propertyTypeTokenRange": {
10454
+ "startIndex": 1,
10455
+ "endIndex": 3
10456
+ },
10457
+ "isStatic": false,
10458
+ "isProtected": false,
10459
+ "isAbstract": false
10460
+ },
10461
+ {
10462
+ "kind": "Property",
10463
+ "canonicalReference": "server!Entity#parentNodeName:member",
10464
+ "docComment": "/**\n * The name of the parent's node (if parent is a model entity) this entity is attached to when spawned.\n */\n",
10465
+ "excerptTokens": [
10466
+ {
10467
+ "kind": "Content",
10468
+ "text": "get parentNodeName(): "
10469
+ },
10470
+ {
10471
+ "kind": "Content",
10472
+ "text": "string | undefined"
10473
+ },
10474
+ {
10475
+ "kind": "Content",
10476
+ "text": ";"
10477
+ }
10478
+ ],
10479
+ "isReadonly": true,
10480
+ "isOptional": false,
10481
+ "releaseTag": "Public",
10482
+ "name": "parentNodeName",
10483
+ "propertyTypeTokenRange": {
10484
+ "startIndex": 1,
10485
+ "endIndex": 2
10486
+ },
10487
+ "isStatic": false,
10488
+ "isProtected": false,
10489
+ "isAbstract": false
10490
+ },
10426
10491
  {
10427
10492
  "kind": "Method",
10428
10493
  "canonicalReference": "server!Entity#setController:member(1)",
@@ -10676,7 +10741,7 @@
10676
10741
  {
10677
10742
  "kind": "Method",
10678
10743
  "canonicalReference": "server!Entity#spawn:member(1)",
10679
- "docComment": "/**\n * Spawns the entity in the world.\n *\n * @param world - The world to spawn the entity in.\n *\n * @param coordinate - The coordinate to spawn the entity at.\n */\n",
10744
+ "docComment": "/**\n * Spawns the entity in the world.\n *\n * @param world - The world to spawn the entity in.\n *\n * @param position - The position to spawn the entity at.\n *\n * @param rotation - The optional rotation to spawn the entity with.\n */\n",
10680
10745
  "excerptTokens": [
10681
10746
  {
10682
10747
  "kind": "Content",
@@ -10689,13 +10754,22 @@
10689
10754
  },
10690
10755
  {
10691
10756
  "kind": "Content",
10692
- "text": ", coordinate: "
10757
+ "text": ", position: "
10693
10758
  },
10694
10759
  {
10695
10760
  "kind": "Reference",
10696
10761
  "text": "Vector3Like",
10697
10762
  "canonicalReference": "server!Vector3Like:interface"
10698
10763
  },
10764
+ {
10765
+ "kind": "Content",
10766
+ "text": ", rotation?: "
10767
+ },
10768
+ {
10769
+ "kind": "Reference",
10770
+ "text": "QuaternionLike",
10771
+ "canonicalReference": "server!QuaternionLike:interface"
10772
+ },
10699
10773
  {
10700
10774
  "kind": "Content",
10701
10775
  "text": "): "
@@ -10711,8 +10785,8 @@
10711
10785
  ],
10712
10786
  "isStatic": false,
10713
10787
  "returnTypeTokenRange": {
10714
- "startIndex": 5,
10715
- "endIndex": 6
10788
+ "startIndex": 7,
10789
+ "endIndex": 8
10716
10790
  },
10717
10791
  "releaseTag": "Public",
10718
10792
  "isProtected": false,
@@ -10727,12 +10801,20 @@
10727
10801
  "isOptional": false
10728
10802
  },
10729
10803
  {
10730
- "parameterName": "coordinate",
10804
+ "parameterName": "position",
10731
10805
  "parameterTypeTokenRange": {
10732
10806
  "startIndex": 3,
10733
10807
  "endIndex": 4
10734
10808
  },
10735
10809
  "isOptional": false
10810
+ },
10811
+ {
10812
+ "parameterName": "rotation",
10813
+ "parameterTypeTokenRange": {
10814
+ "startIndex": 5,
10815
+ "endIndex": 6
10816
+ },
10817
+ "isOptional": true
10736
10818
  }
10737
10819
  ],
10738
10820
  "isOptional": false,
@@ -12289,6 +12371,60 @@
12289
12371
  "isAbstract": false,
12290
12372
  "name": "getEntity"
12291
12373
  },
12374
+ {
12375
+ "kind": "Method",
12376
+ "canonicalReference": "server!EntityManager#getEntityChildren:member(1)",
12377
+ "docComment": "/**\n * Gets all child entities of an entity.\n *\n * @param entity - The entity to get the children for.\n *\n * @returns All child entities of the entity.\n */\n",
12378
+ "excerptTokens": [
12379
+ {
12380
+ "kind": "Content",
12381
+ "text": "getEntityChildren(entity: "
12382
+ },
12383
+ {
12384
+ "kind": "Reference",
12385
+ "text": "Entity",
12386
+ "canonicalReference": "server!Entity:class"
12387
+ },
12388
+ {
12389
+ "kind": "Content",
12390
+ "text": "): "
12391
+ },
12392
+ {
12393
+ "kind": "Reference",
12394
+ "text": "Entity",
12395
+ "canonicalReference": "server!Entity:class"
12396
+ },
12397
+ {
12398
+ "kind": "Content",
12399
+ "text": "[]"
12400
+ },
12401
+ {
12402
+ "kind": "Content",
12403
+ "text": ";"
12404
+ }
12405
+ ],
12406
+ "isStatic": false,
12407
+ "returnTypeTokenRange": {
12408
+ "startIndex": 3,
12409
+ "endIndex": 5
12410
+ },
12411
+ "releaseTag": "Public",
12412
+ "isProtected": false,
12413
+ "overloadIndex": 1,
12414
+ "parameters": [
12415
+ {
12416
+ "parameterName": "entity",
12417
+ "parameterTypeTokenRange": {
12418
+ "startIndex": 1,
12419
+ "endIndex": 2
12420
+ },
12421
+ "isOptional": false
12422
+ }
12423
+ ],
12424
+ "isOptional": false,
12425
+ "isAbstract": false,
12426
+ "name": "getEntityChildren"
12427
+ },
12292
12428
  {
12293
12429
  "kind": "Method",
12294
12430
  "canonicalReference": "server!EntityManager#getPlayerEntitiesByPlayer:member(1)",
@@ -12664,6 +12800,61 @@
12664
12800
  "endIndex": 2
12665
12801
  }
12666
12802
  },
12803
+ {
12804
+ "kind": "PropertySignature",
12805
+ "canonicalReference": "server!EntityOptions#parent:member",
12806
+ "docComment": "/**\n * The parent entity of the entity, entities with a parent will ignore creating their own colliders.\n */\n",
12807
+ "excerptTokens": [
12808
+ {
12809
+ "kind": "Content",
12810
+ "text": "parent?: "
12811
+ },
12812
+ {
12813
+ "kind": "Reference",
12814
+ "text": "Entity",
12815
+ "canonicalReference": "server!Entity:class"
12816
+ },
12817
+ {
12818
+ "kind": "Content",
12819
+ "text": ";"
12820
+ }
12821
+ ],
12822
+ "isReadonly": false,
12823
+ "isOptional": true,
12824
+ "releaseTag": "Public",
12825
+ "name": "parent",
12826
+ "propertyTypeTokenRange": {
12827
+ "startIndex": 1,
12828
+ "endIndex": 2
12829
+ }
12830
+ },
12831
+ {
12832
+ "kind": "PropertySignature",
12833
+ "canonicalReference": "server!EntityOptions#parentNodeName:member",
12834
+ "docComment": "/**\n * The name of the parent's node (if parent is a model entity) to attach the entity to.\n */\n",
12835
+ "excerptTokens": [
12836
+ {
12837
+ "kind": "Content",
12838
+ "text": "parentNodeName?: "
12839
+ },
12840
+ {
12841
+ "kind": "Content",
12842
+ "text": "string"
12843
+ },
12844
+ {
12845
+ "kind": "Content",
12846
+ "text": ";"
12847
+ }
12848
+ ],
12849
+ "isReadonly": false,
12850
+ "isOptional": true,
12851
+ "releaseTag": "Public",
12852
+ "name": "parentNodeName",
12853
+ "propertyTypeTokenRange": {
12854
+ "startIndex": 1,
12855
+ "endIndex": 2
12856
+ }
12857
+ },
12667
12858
  {
12668
12859
  "kind": "PropertySignature",
12669
12860
  "canonicalReference": "server!EntityOptions#rigidBodyOptions:member",
@@ -13664,17 +13855,17 @@
13664
13855
  },
13665
13856
  {
13666
13857
  "kind": "Property",
13667
- "canonicalReference": "server!GameServer#modelManager:member",
13858
+ "canonicalReference": "server!GameServer#modelRegistry:member",
13668
13859
  "docComment": "/**\n * The model manager for the game server.\n */\n",
13669
13860
  "excerptTokens": [
13670
13861
  {
13671
13862
  "kind": "Content",
13672
- "text": "get modelManager(): "
13863
+ "text": "get modelRegistry(): "
13673
13864
  },
13674
13865
  {
13675
13866
  "kind": "Reference",
13676
- "text": "ModelManager",
13677
- "canonicalReference": "server!ModelManager:class"
13867
+ "text": "ModelRegistry",
13868
+ "canonicalReference": "server!ModelRegistry:class"
13678
13869
  },
13679
13870
  {
13680
13871
  "kind": "Content",
@@ -13684,7 +13875,7 @@
13684
13875
  "isReadonly": true,
13685
13876
  "isOptional": false,
13686
13877
  "releaseTag": "Public",
13687
- "name": "modelManager",
13878
+ "name": "modelRegistry",
13688
13879
  "propertyTypeTokenRange": {
13689
13880
  "startIndex": 1,
13690
13881
  "endIndex": 2
@@ -16691,23 +16882,23 @@
16691
16882
  },
16692
16883
  {
16693
16884
  "kind": "Class",
16694
- "canonicalReference": "server!ModelManager:class",
16695
- "docComment": "/**\n * Manages model data for all known models of the game.\n *\n * @remarks\n *\n * The ModelManager is created internally as a global singletone accessible with the static property `ModelManager.instance`.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ModelManager` class.\n *\n * @example\n * ```typescript\n * import { ModelManager } from 'hytopia';\n *\n * const modelManager = ModelManager.instance;\n * const boundingBox = modelManager.getBoundingBox('models/player.gltf');\n * ```\n *\n * @public\n */\n",
16885
+ "canonicalReference": "server!ModelRegistry:class",
16886
+ "docComment": "/**\n * Manages model data for all known models of the game.\n *\n * @remarks\n *\n * The ModelRegistry is created internally as a global singletone accessible with the static property `ModelRegistry.instance`.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ModelRegistry` class.\n *\n * @example\n * ```typescript\n * import { ModelRegistry } from 'hytopia';\n *\n * const modelRegistry = ModelRegistry.instance;\n * const boundingBox = modelRegistry.getBoundingBox('models/player.gltf');\n * ```\n *\n * @public\n */\n",
16696
16887
  "excerptTokens": [
16697
16888
  {
16698
16889
  "kind": "Content",
16699
- "text": "export default class ModelManager "
16890
+ "text": "export default class ModelRegistry "
16700
16891
  }
16701
16892
  ],
16702
- "fileUrlPath": "src/models/ModelManager.ts",
16893
+ "fileUrlPath": "src/models/ModelRegistry.ts",
16703
16894
  "releaseTag": "Public",
16704
16895
  "isAbstract": false,
16705
- "name": "ModelManager",
16896
+ "name": "ModelRegistry",
16706
16897
  "preserveMemberOrder": false,
16707
16898
  "members": [
16708
16899
  {
16709
16900
  "kind": "Method",
16710
- "canonicalReference": "server!ModelManager#getBoundingBox:member(1)",
16901
+ "canonicalReference": "server!ModelRegistry#getBoundingBox:member(1)",
16711
16902
  "docComment": "/**\n * Retrieves the bounding box of a model.\n *\n * @param modelUri - The URI of the model to retrieve the bounding box for.\n *\n * @returns The bounding box of the model.\n */\n",
16712
16903
  "excerptTokens": [
16713
16904
  {
@@ -16754,10 +16945,58 @@
16754
16945
  "isAbstract": false,
16755
16946
  "name": "getBoundingBox"
16756
16947
  },
16948
+ {
16949
+ "kind": "Method",
16950
+ "canonicalReference": "server!ModelRegistry#getNodeNames:member(1)",
16951
+ "docComment": "/**\n * Retrieves the names of all nodes in a model.\n *\n * @param modelUri - The URI of the model to retrieve the node names for.\n *\n * @returns The names of all nodes in the model.\n */\n",
16952
+ "excerptTokens": [
16953
+ {
16954
+ "kind": "Content",
16955
+ "text": "getNodeNames(modelUri: "
16956
+ },
16957
+ {
16958
+ "kind": "Content",
16959
+ "text": "string"
16960
+ },
16961
+ {
16962
+ "kind": "Content",
16963
+ "text": "): "
16964
+ },
16965
+ {
16966
+ "kind": "Content",
16967
+ "text": "string[]"
16968
+ },
16969
+ {
16970
+ "kind": "Content",
16971
+ "text": ";"
16972
+ }
16973
+ ],
16974
+ "isStatic": false,
16975
+ "returnTypeTokenRange": {
16976
+ "startIndex": 3,
16977
+ "endIndex": 4
16978
+ },
16979
+ "releaseTag": "Public",
16980
+ "isProtected": false,
16981
+ "overloadIndex": 1,
16982
+ "parameters": [
16983
+ {
16984
+ "parameterName": "modelUri",
16985
+ "parameterTypeTokenRange": {
16986
+ "startIndex": 1,
16987
+ "endIndex": 2
16988
+ },
16989
+ "isOptional": false
16990
+ }
16991
+ ],
16992
+ "isOptional": false,
16993
+ "isAbstract": false,
16994
+ "name": "getNodeNames"
16995
+ },
16757
16996
  {
16758
16997
  "kind": "Property",
16759
- "canonicalReference": "server!ModelManager.instance:member",
16760
- "docComment": "/**\n * The global PlayerManager instance as a singleton.\n */\n",
16998
+ "canonicalReference": "server!ModelRegistry.instance:member",
16999
+ "docComment": "/**\n * The global ModelRegistry instance as a singleton.\n */\n",
16761
17000
  "excerptTokens": [
16762
17001
  {
16763
17002
  "kind": "Content",
@@ -16765,8 +17004,8 @@
16765
17004
  },
16766
17005
  {
16767
17006
  "kind": "Reference",
16768
- "text": "ModelManager",
16769
- "canonicalReference": "server!ModelManager:class"
17007
+ "text": "ModelRegistry",
17008
+ "canonicalReference": "server!ModelRegistry:class"
16770
17009
  },
16771
17010
  {
16772
17011
  "kind": "Content",
@@ -16784,6 +17023,70 @@
16784
17023
  "isStatic": true,
16785
17024
  "isProtected": false,
16786
17025
  "isAbstract": false
17026
+ },
17027
+ {
17028
+ "kind": "Method",
17029
+ "canonicalReference": "server!ModelRegistry#modelHasNode:member(1)",
17030
+ "docComment": "/**\n * Checks if a model has a node with the given name.\n *\n * @param modelUri - The URI of the model to check.\n *\n * @param nodeName - The name of the node to check for.\n *\n * @returns Whether the model has a node with the given name.\n */\n",
17031
+ "excerptTokens": [
17032
+ {
17033
+ "kind": "Content",
17034
+ "text": "modelHasNode(modelUri: "
17035
+ },
17036
+ {
17037
+ "kind": "Content",
17038
+ "text": "string"
17039
+ },
17040
+ {
17041
+ "kind": "Content",
17042
+ "text": ", nodeName: "
17043
+ },
17044
+ {
17045
+ "kind": "Content",
17046
+ "text": "string"
17047
+ },
17048
+ {
17049
+ "kind": "Content",
17050
+ "text": "): "
17051
+ },
17052
+ {
17053
+ "kind": "Content",
17054
+ "text": "boolean"
17055
+ },
17056
+ {
17057
+ "kind": "Content",
17058
+ "text": ";"
17059
+ }
17060
+ ],
17061
+ "isStatic": false,
17062
+ "returnTypeTokenRange": {
17063
+ "startIndex": 5,
17064
+ "endIndex": 6
17065
+ },
17066
+ "releaseTag": "Public",
17067
+ "isProtected": false,
17068
+ "overloadIndex": 1,
17069
+ "parameters": [
17070
+ {
17071
+ "parameterName": "modelUri",
17072
+ "parameterTypeTokenRange": {
17073
+ "startIndex": 1,
17074
+ "endIndex": 2
17075
+ },
17076
+ "isOptional": false
17077
+ },
17078
+ {
17079
+ "parameterName": "nodeName",
17080
+ "parameterTypeTokenRange": {
17081
+ "startIndex": 3,
17082
+ "endIndex": 4
17083
+ },
17084
+ "isOptional": false
17085
+ }
17086
+ ],
17087
+ "isOptional": false,
17088
+ "isAbstract": false,
17089
+ "name": "modelHasNode"
16787
17090
  }
16788
17091
  ],
16789
17092
  "implementsTokenRanges": []
package/server.d.ts CHANGED
@@ -1359,6 +1359,8 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1359
1359
 
1360
1360
 
1361
1361
 
1362
+
1363
+
1362
1364
  /**
1363
1365
  * @param options - The options for the entity.
1364
1366
  */
@@ -1385,6 +1387,10 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1385
1387
  get name(): string;
1386
1388
  /** The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque. */
1387
1389
  get opacity(): number | undefined;
1390
+ /** The parent entity of the entity. */
1391
+ get parent(): Entity | undefined;
1392
+ /** The name of the parent's node (if parent is a model entity) this entity is attached to when spawned. */
1393
+ get parentNodeName(): string | undefined;
1388
1394
  /** An arbitrary identifier tag of the entity. Useful for your own logic. */
1389
1395
  get tag(): string | undefined;
1390
1396
  /** The tint color of the entity. */
@@ -1400,11 +1406,12 @@ export declare class Entity extends RigidBody implements protocol.Serializable {
1400
1406
  /**
1401
1407
  * Spawns the entity in the world.
1402
1408
  * @param world - The world to spawn the entity in.
1403
- * @param coordinate - The coordinate to spawn the entity at.
1409
+ * @param position - The position to spawn the entity at.
1410
+ * @param rotation - The optional rotation to spawn the entity with.
1404
1411
  */
1405
- spawn(world: World, coordinate: Vector3Like): void;
1412
+ spawn(world: World, position: Vector3Like, rotation?: QuaternionLike): void;
1406
1413
  /**
1407
- * Despawns the entity from the world.
1414
+ * Despawns the entity and all children from the world.
1408
1415
  */
1409
1416
  despawn(): void;
1410
1417
  /**
@@ -1602,6 +1609,12 @@ export declare class EntityManager {
1602
1609
  * @returns All spawned entities in the world with a tag that includes the provided substring.
1603
1610
  */
1604
1611
  getEntitiesByTagSubstring(tagSubstring: string): Entity[];
1612
+ /**
1613
+ * Gets all child entities of an entity.
1614
+ * @param entity - The entity to get the children for.
1615
+ * @returns All child entities of the entity.
1616
+ */
1617
+ getEntityChildren(entity: Entity): Entity[];
1605
1618
 
1606
1619
 
1607
1620
  }
@@ -1628,6 +1641,10 @@ export declare interface EntityOptions {
1628
1641
  name?: string;
1629
1642
  /** The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque. */
1630
1643
  opacity?: number;
1644
+ /** The parent entity of the entity, entities with a parent will ignore creating their own colliders. */
1645
+ parent?: Entity;
1646
+ /** The name of the parent's node (if parent is a model entity) to attach the entity to. */
1647
+ parentNodeName?: string;
1631
1648
  /** The rigid body options for the entity. */
1632
1649
  rigidBodyOptions?: RigidBodyOptions;
1633
1650
  /** An arbitrary identifier tag of the entity. Useful for your own logic. */
@@ -1768,7 +1785,7 @@ export declare class GameServer {
1768
1785
  /** The singleton instance of the game server. */
1769
1786
  static get instance(): GameServer;
1770
1787
  /** The model manager for the game server. */
1771
- get modelManager(): ModelManager;
1788
+ get modelRegistry(): ModelRegistry;
1772
1789
  /** The player manager for the game server. */
1773
1790
  get playerManager(): PlayerManager;
1774
1791
 
@@ -2077,39 +2094,32 @@ export declare enum LightType {
2077
2094
 
2078
2095
  /** A bounding box for a model. @public */
2079
2096
  declare type ModelBoundingBox = {
2080
- min: {
2081
- x: number;
2082
- y: number;
2083
- z: number;
2084
- };
2085
- max: {
2086
- x: number;
2087
- y: number;
2088
- z: number;
2089
- };
2097
+ min: Vector3Like;
2098
+ max: Vector3Like;
2090
2099
  };
2091
2100
 
2092
2101
  /**
2093
2102
  * Manages model data for all known models of the game.
2094
2103
  *
2095
2104
  * @remarks
2096
- * The ModelManager is created internally as a global
2105
+ * The ModelRegistry is created internally as a global
2097
2106
  * singletone accessible with the static property
2098
- * `ModelManager.instance`.
2107
+ * `ModelRegistry.instance`.
2099
2108
  *
2100
2109
  * @example
2101
2110
  * ```typescript
2102
- * import { ModelManager } from 'hytopia';
2111
+ * import { ModelRegistry } from 'hytopia';
2103
2112
  *
2104
- * const modelManager = ModelManager.instance;
2105
- * const boundingBox = modelManager.getBoundingBox('models/player.gltf');
2113
+ * const modelRegistry = ModelRegistry.instance;
2114
+ * const boundingBox = modelRegistry.getBoundingBox('models/player.gltf');
2106
2115
  * ```
2107
2116
  *
2108
2117
  * @public
2109
2118
  */
2110
- export declare class ModelManager {
2111
- /** The global PlayerManager instance as a singleton. */
2112
- static readonly instance: ModelManager;
2119
+ export declare class ModelRegistry {
2120
+ /** The global ModelRegistry instance as a singleton. */
2121
+ static readonly instance: ModelRegistry;
2122
+
2113
2123
 
2114
2124
 
2115
2125
 
@@ -2121,6 +2131,21 @@ export declare class ModelManager {
2121
2131
  * @returns The bounding box of the model.
2122
2132
  */
2123
2133
  getBoundingBox(modelUri: string): ModelBoundingBox;
2134
+ /**
2135
+ * Retrieves the names of all nodes in a model.
2136
+ *
2137
+ * @param modelUri - The URI of the model to retrieve the node names for.
2138
+ * @returns The names of all nodes in the model.
2139
+ */
2140
+ getNodeNames(modelUri: string): string[];
2141
+ /**
2142
+ * Checks if a model has a node with the given name.
2143
+ *
2144
+ * @param modelUri - The URI of the model to check.
2145
+ * @param nodeName - The name of the node to check for.
2146
+ * @returns Whether the model has a node with the given name.
2147
+ */
2148
+ modelHasNode(modelUri: string, nodeName: string): boolean;
2124
2149
 
2125
2150
 
2126
2151
  }