hytopia 0.10.7 → 0.10.9

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.
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [DefaultPlayerEntity](./server.defaultplayerentity.md) &gt; [cosmeticHiddenSlots](./server.defaultplayerentity.cosmetichiddenslots.md)
4
+
5
+ ## DefaultPlayerEntity.cosmeticHiddenSlots property
6
+
7
+ The cosmetic slots that are hidden.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get cosmeticHiddenSlots(): PlayerCosmeticSlot[];
13
+ ```
@@ -60,3 +60,49 @@ Constructs a new instance of the `DefaultPlayerEntity` class
60
60
  </td></tr>
61
61
  </tbody></table>
62
62
 
63
+ ## Properties
64
+
65
+ <table><thead><tr><th>
66
+
67
+ Property
68
+
69
+
70
+ </th><th>
71
+
72
+ Modifiers
73
+
74
+
75
+ </th><th>
76
+
77
+ Type
78
+
79
+
80
+ </th><th>
81
+
82
+ Description
83
+
84
+
85
+ </th></tr></thead>
86
+ <tbody><tr><td>
87
+
88
+ [cosmeticHiddenSlots](./server.defaultplayerentity.cosmetichiddenslots.md)
89
+
90
+
91
+ </td><td>
92
+
93
+ `readonly`
94
+
95
+
96
+ </td><td>
97
+
98
+ PlayerCosmeticSlot\[\]
99
+
100
+
101
+ </td><td>
102
+
103
+ The cosmetic slots that are hidden.
104
+
105
+
106
+ </td></tr>
107
+ </tbody></table>
108
+
@@ -9,7 +9,9 @@ Options for creating a DefaultPlayerEntity instance.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export type DefaultPlayerEntityOptions = {} & PlayerEntityOptions;
12
+ export type DefaultPlayerEntityOptions = {
13
+ cosmeticHiddenSlots?: PlayerCosmeticSlot[];
14
+ } & PlayerEntityOptions;
13
15
  ```
14
16
  **References:** [PlayerEntityOptions](./server.playerentityoptions.md)
15
17
 
package/docs/server.md CHANGED
@@ -1789,6 +1789,28 @@ Options for the [PathfindingEntityController.pathfind()](./server.pathfindingent
1789
1789
  The camera orientation state of a Player.
1790
1790
 
1791
1791
 
1792
+ </td></tr>
1793
+ <tr><td>
1794
+
1795
+ [PlayerCosmetics](./server.playercosmetics.md)
1796
+
1797
+
1798
+ </td><td>
1799
+
1800
+ The cosmetics of a player.
1801
+
1802
+
1803
+ </td></tr>
1804
+ <tr><td>
1805
+
1806
+ [PlayerCosmeticsEquippedItem](./server.playercosmeticsequippeditem.md)
1807
+
1808
+
1809
+ </td><td>
1810
+
1811
+ An equipped item of a player's cosmetics.
1812
+
1813
+
1792
1814
  </td></tr>
1793
1815
  <tr><td>
1794
1816
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Player](./server.player.md) &gt; [cosmetics](./server.player.cosmetics.md)
4
+
5
+ ## Player.cosmetics property
6
+
7
+ The cosmetics for the player
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ readonly cosmetics: Promise<PlayerCosmetics | void>;
13
+ ```
@@ -68,6 +68,27 @@ Description
68
68
  The camera for the player.
69
69
 
70
70
 
71
+ </td></tr>
72
+ <tr><td>
73
+
74
+ [cosmetics](./server.player.cosmetics.md)
75
+
76
+
77
+ </td><td>
78
+
79
+ `readonly`
80
+
81
+
82
+ </td><td>
83
+
84
+ Promise&lt;[PlayerCosmetics](./server.playercosmetics.md) \| void&gt;
85
+
86
+
87
+ </td><td>
88
+
89
+ The cosmetics for the player
90
+
91
+
71
92
  </td></tr>
72
93
  <tr><td>
73
94
 
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCosmetics](./server.playercosmetics.md)
4
+
5
+ ## PlayerCosmetics type
6
+
7
+ The cosmetics of a player.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type PlayerCosmetics = {
13
+ equippedItems: {
14
+ slot: string;
15
+ item: PlayerCosmeticsEquippedItem;
16
+ }[];
17
+ hairStyle: number;
18
+ skinTextureUri: string;
19
+ };
20
+ ```
21
+ **References:** [PlayerCosmeticsEquippedItem](./server.playercosmeticsequippeditem.md)
22
+
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCosmeticsEquippedItem](./server.playercosmeticsequippeditem.md)
4
+
5
+ ## PlayerCosmeticsEquippedItem type
6
+
7
+ An equipped item of a player's cosmetics.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type PlayerCosmeticsEquippedItem = {
13
+ flags: string[];
14
+ type: string;
15
+ modelUrl: string;
16
+ textureUrl?: string;
17
+ };
18
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.10.7",
3
+ "version": "0.10.9",
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": "./server.mjs",
package/server.api.json CHANGED
@@ -11012,6 +11012,41 @@
11012
11012
  "isOptional": false
11013
11013
  }
11014
11014
  ]
11015
+ },
11016
+ {
11017
+ "kind": "Property",
11018
+ "canonicalReference": "server!DefaultPlayerEntity#cosmeticHiddenSlots:member",
11019
+ "docComment": "/**\n * The cosmetic slots that are hidden.\n *\n * @public\n */\n",
11020
+ "excerptTokens": [
11021
+ {
11022
+ "kind": "Content",
11023
+ "text": "get cosmeticHiddenSlots(): "
11024
+ },
11025
+ {
11026
+ "kind": "Reference",
11027
+ "text": "PlayerCosmeticSlot",
11028
+ "canonicalReference": "server!~PlayerCosmeticSlot:type"
11029
+ },
11030
+ {
11031
+ "kind": "Content",
11032
+ "text": "[]"
11033
+ },
11034
+ {
11035
+ "kind": "Content",
11036
+ "text": ";"
11037
+ }
11038
+ ],
11039
+ "isReadonly": true,
11040
+ "isOptional": false,
11041
+ "releaseTag": "Public",
11042
+ "name": "cosmeticHiddenSlots",
11043
+ "propertyTypeTokenRange": {
11044
+ "startIndex": 1,
11045
+ "endIndex": 3
11046
+ },
11047
+ "isStatic": false,
11048
+ "isProtected": false,
11049
+ "isAbstract": false
11015
11050
  }
11016
11051
  ],
11017
11052
  "extendsTokenRange": {
@@ -12927,7 +12962,16 @@
12927
12962
  },
12928
12963
  {
12929
12964
  "kind": "Content",
12930
- "text": "{} & "
12965
+ "text": "{\n cosmeticHiddenSlots?: "
12966
+ },
12967
+ {
12968
+ "kind": "Reference",
12969
+ "text": "PlayerCosmeticSlot",
12970
+ "canonicalReference": "server!~PlayerCosmeticSlot:type"
12971
+ },
12972
+ {
12973
+ "kind": "Content",
12974
+ "text": "[];\n} & "
12931
12975
  },
12932
12976
  {
12933
12977
  "kind": "Reference",
@@ -12944,7 +12988,7 @@
12944
12988
  "name": "DefaultPlayerEntityOptions",
12945
12989
  "typeTokenRange": {
12946
12990
  "startIndex": 1,
12947
- "endIndex": 3
12991
+ "endIndex": 5
12948
12992
  }
12949
12993
  },
12950
12994
  {
@@ -35375,6 +35419,50 @@
35375
35419
  "isProtected": false,
35376
35420
  "isAbstract": false
35377
35421
  },
35422
+ {
35423
+ "kind": "Property",
35424
+ "canonicalReference": "server!Player#cosmetics:member",
35425
+ "docComment": "/**\n * The cosmetics for the player\n */\n",
35426
+ "excerptTokens": [
35427
+ {
35428
+ "kind": "Content",
35429
+ "text": "readonly cosmetics: "
35430
+ },
35431
+ {
35432
+ "kind": "Reference",
35433
+ "text": "Promise",
35434
+ "canonicalReference": "!Promise:interface"
35435
+ },
35436
+ {
35437
+ "kind": "Content",
35438
+ "text": "<"
35439
+ },
35440
+ {
35441
+ "kind": "Reference",
35442
+ "text": "PlayerCosmetics",
35443
+ "canonicalReference": "server!PlayerCosmetics:type"
35444
+ },
35445
+ {
35446
+ "kind": "Content",
35447
+ "text": " | void>"
35448
+ },
35449
+ {
35450
+ "kind": "Content",
35451
+ "text": ";"
35452
+ }
35453
+ ],
35454
+ "isReadonly": true,
35455
+ "isOptional": false,
35456
+ "releaseTag": "Public",
35457
+ "name": "cosmetics",
35458
+ "propertyTypeTokenRange": {
35459
+ "startIndex": 1,
35460
+ "endIndex": 5
35461
+ },
35462
+ "isStatic": false,
35463
+ "isProtected": false,
35464
+ "isAbstract": false
35465
+ },
35378
35466
  {
35379
35467
  "kind": "Method",
35380
35468
  "canonicalReference": "server!Player#disconnect:member(1)",
@@ -38359,6 +38447,67 @@
38359
38447
  "endIndex": 2
38360
38448
  }
38361
38449
  },
38450
+ {
38451
+ "kind": "TypeAlias",
38452
+ "canonicalReference": "server!PlayerCosmetics:type",
38453
+ "docComment": "/**\n * The cosmetics of a player.\n *\n * @public\n */\n",
38454
+ "excerptTokens": [
38455
+ {
38456
+ "kind": "Content",
38457
+ "text": "export type PlayerCosmetics = "
38458
+ },
38459
+ {
38460
+ "kind": "Content",
38461
+ "text": "{\n equippedItems: {\n slot: string;\n item: "
38462
+ },
38463
+ {
38464
+ "kind": "Reference",
38465
+ "text": "PlayerCosmeticsEquippedItem",
38466
+ "canonicalReference": "server!PlayerCosmeticsEquippedItem:type"
38467
+ },
38468
+ {
38469
+ "kind": "Content",
38470
+ "text": ";\n }[];\n hairStyle: number;\n skinTextureUri: string;\n}"
38471
+ },
38472
+ {
38473
+ "kind": "Content",
38474
+ "text": ";"
38475
+ }
38476
+ ],
38477
+ "fileUrlPath": "src/networking/PlatformGateway.ts",
38478
+ "releaseTag": "Public",
38479
+ "name": "PlayerCosmetics",
38480
+ "typeTokenRange": {
38481
+ "startIndex": 1,
38482
+ "endIndex": 4
38483
+ }
38484
+ },
38485
+ {
38486
+ "kind": "TypeAlias",
38487
+ "canonicalReference": "server!PlayerCosmeticsEquippedItem:type",
38488
+ "docComment": "/**\n * An equipped item of a player's cosmetics.\n *\n * @public\n */\n",
38489
+ "excerptTokens": [
38490
+ {
38491
+ "kind": "Content",
38492
+ "text": "export type PlayerCosmeticsEquippedItem = "
38493
+ },
38494
+ {
38495
+ "kind": "Content",
38496
+ "text": "{\n flags: string[];\n type: string;\n modelUrl: string;\n textureUrl?: string;\n}"
38497
+ },
38498
+ {
38499
+ "kind": "Content",
38500
+ "text": ";"
38501
+ }
38502
+ ],
38503
+ "fileUrlPath": "src/networking/PlatformGateway.ts",
38504
+ "releaseTag": "Public",
38505
+ "name": "PlayerCosmeticsEquippedItem",
38506
+ "typeTokenRange": {
38507
+ "startIndex": 1,
38508
+ "endIndex": 2
38509
+ }
38510
+ },
38362
38511
  {
38363
38512
  "kind": "Class",
38364
38513
  "canonicalReference": "server!PlayerEntity:class",
package/server.d.ts CHANGED
@@ -1435,7 +1435,11 @@ export declare const DEFAULT_ENTITY_RIGID_BODY_OPTIONS: RigidBodyOptions;
1435
1435
  * @public
1436
1436
  */
1437
1437
  export declare class DefaultPlayerEntity extends PlayerEntity {
1438
+ private _cosmeticHiddenSlots;
1438
1439
  constructor(options: DefaultPlayerEntityOptions);
1440
+ /** The cosmetic slots that are hidden. @public */
1441
+ get cosmeticHiddenSlots(): PlayerCosmeticSlot[];
1442
+
1439
1443
  }
1440
1444
 
1441
1445
  /**
@@ -1653,7 +1657,9 @@ export declare interface DefaultPlayerEntityControllerOptions {
1653
1657
  }
1654
1658
 
1655
1659
  /** Options for creating a DefaultPlayerEntity instance. @public */
1656
- export declare type DefaultPlayerEntityOptions = {} & PlayerEntityOptions;
1660
+ export declare type DefaultPlayerEntityOptions = {
1661
+ cosmeticHiddenSlots?: PlayerCosmeticSlot[];
1662
+ } & PlayerEntityOptions;
1657
1663
 
1658
1664
  /** The options for a dynamic rigid body, also the default type. @public */
1659
1665
  export declare interface DynamicRigidBodyOptions extends BaseRigidBodyOptions {
@@ -4368,6 +4374,8 @@ export declare class Player extends EventRouter implements protocol.Serializable
4368
4374
  /** The camera for the player. */
4369
4375
  readonly camera: PlayerCamera;
4370
4376
 
4377
+ /** The cosmetics for the player */
4378
+ readonly cosmetics: Promise<PlayerCosmetics | void>;
4371
4379
  /** The UI for the player. */
4372
4380
  readonly ui: PlayerUI;
4373
4381
 
@@ -4718,6 +4726,27 @@ export declare type PlayerCameraOrientation = {
4718
4726
  yaw: number;
4719
4727
  };
4720
4728
 
4729
+ /** The cosmetics of a player. @public */
4730
+ export declare type PlayerCosmetics = {
4731
+ equippedItems: {
4732
+ slot: string;
4733
+ item: PlayerCosmeticsEquippedItem;
4734
+ }[];
4735
+ hairStyle: number;
4736
+ skinTextureUri: string;
4737
+ };
4738
+
4739
+ /** An equipped item of a player's cosmetics. @public */
4740
+ export declare type PlayerCosmeticsEquippedItem = {
4741
+ flags: string[];
4742
+ type: string;
4743
+ modelUrl: string;
4744
+ textureUrl?: string;
4745
+ };
4746
+
4747
+ /** The slots used for player cosmetics. @public */
4748
+ declare type PlayerCosmeticSlot = 'ALL' | 'BACK' | 'HEAD' | 'LEFT_ARM' | 'LEFT_FOOT' | 'LEFT_HAND' | 'LEFT_ITEM' | 'LEFT_LEG' | 'RIGHT_ARM' | 'RIGHT_FOOT' | 'RIGHT_HAND' | 'RIGHT_ITEM' | 'RIGHT_LEG' | 'TORSO';
4749
+
4721
4750
  /**
4722
4751
  * Represents an entity controlled by a player in a world.
4723
4752
  *