hytopia 0.3.29 → 0.3.30

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.
@@ -376,7 +376,7 @@ The position of the audio in the world if explicitly set.
376
376
 
377
377
  </td><td>
378
378
 
379
- number \| undefined
379
+ number
380
380
 
381
381
 
382
382
  </td><td>
@@ -9,5 +9,5 @@ The reference distance of the audio if explicitly set.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- get referenceDistance(): number | undefined;
12
+ get referenceDistance(): number;
13
13
  ```
@@ -25,8 +25,8 @@ world.onPlayerJoin = player => {
25
25
  const playerEntity = new PlayerEntity({
26
26
  player,
27
27
  name: 'Player',
28
- modelUri: 'models/player-with-gun.gltf',
29
- modelLoopedAnimations: [ 'idle' ],
28
+ modelUri: 'models/players/player.gltf',
29
+ modelLoopedAnimations: [ 'idle_lower', 'idle_upper' ],
30
30
  modelScale: 0.5,
31
31
  });
32
32
 
@@ -71,7 +71,7 @@ export default abstract class GunEntity extends ItemEntity {
71
71
  uri: options.shootAudioUri,
72
72
  volume: 0.3,
73
73
  referenceDistance: 8,
74
- cutoffDistance: 60,
74
+ cutoffDistance: 100,
75
75
  });
76
76
  }
77
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.api.json CHANGED
@@ -747,7 +747,7 @@
747
747
  },
748
748
  {
749
749
  "kind": "Content",
750
- "text": "number | undefined"
750
+ "text": "number"
751
751
  },
752
752
  {
753
753
  "kind": "Content",
@@ -27433,7 +27433,7 @@
27433
27433
  {
27434
27434
  "kind": "Class",
27435
27435
  "canonicalReference": "server!PlayerEntity:class",
27436
- "docComment": "/**\n * Represents an entity controlled by a player in a world.\n *\n * @remarks\n *\n * Player entities extend the {@link Entity} class. They can be created and assigned to a player when a player joins a world. PlayerEntity automatically handles mapping player inputs to the associated entity controller of the entity, calling the entity controller's onTickPlayerMovement method when player input has changed.\n *\n * @example\n * ```typescript\n * world.onPlayerJoin = player => {\n * const playerEntity = new PlayerEntity({\n * player,\n * name: 'Player',\n * modelUri: 'models/player-with-gun.gltf',\n * modelLoopedAnimations: [ 'idle' ],\n * modelScale: 0.5,\n * });\n *\n * playerEntity.spawn(world, { x: 10, y: 20, z: 15 });\n * };\n * ```\n *\n * @public\n */\n",
27436
+ "docComment": "/**\n * Represents an entity controlled by a player in a world.\n *\n * @remarks\n *\n * Player entities extend the {@link Entity} class. They can be created and assigned to a player when a player joins a world. PlayerEntity automatically handles mapping player inputs to the associated entity controller of the entity, calling the entity controller's onTickPlayerMovement method when player input has changed.\n *\n * @example\n * ```typescript\n * world.onPlayerJoin = player => {\n * const playerEntity = new PlayerEntity({\n * player,\n * name: 'Player',\n * modelUri: 'models/players/player.gltf',\n * modelLoopedAnimations: [ 'idle_lower', 'idle_upper' ],\n * modelScale: 0.5,\n * });\n *\n * playerEntity.spawn(world, { x: 10, y: 20, z: 15 });\n * };\n * ```\n *\n * @public\n */\n",
27437
27437
  "excerptTokens": [
27438
27438
  {
27439
27439
  "kind": "Content",
package/server.d.ts CHANGED
@@ -4,7 +4,6 @@ import EventEmitter from 'eventemitter3';
4
4
  import http from 'http';
5
5
  import type { IncomingMessage } from 'http';
6
6
  import type { InputSchema } from '@hytopia.com/server-protocol';
7
- import type { IPacket } from '@hytopia.com/server-protocol';
8
7
  import type { LobbyMembershipDto } from '@hytopia.com/creative-lib/dist/impl/getSession';
9
8
  import protocol from '@hytopia.com/server-protocol';
10
9
  import RAPIER from '@dimforge/rapier3d-compat-simd';
@@ -86,7 +85,7 @@ export declare class Audio extends EventRouter implements protocol.Serializable
86
85
  /** The playback rate of the audio if explicitly set. */
87
86
  get playbackRate(): number | undefined;
88
87
  /** The reference distance of the audio if explicitly set. */
89
- get referenceDistance(): number | undefined;
88
+ get referenceDistance(): number;
90
89
  /** The server tick at which the audio started playing. */
91
90
  get startTick(): number | undefined;
92
91
  /** The URI of the audio asset. */
@@ -3569,8 +3568,8 @@ export declare type PlayerCameraOrientation = {
3569
3568
  * const playerEntity = new PlayerEntity({
3570
3569
  * player,
3571
3570
  * name: 'Player',
3572
- * modelUri: 'models/player-with-gun.gltf',
3573
- * modelLoopedAnimations: [ 'idle' ],
3571
+ * modelUri: 'models/players/player.gltf',
3572
+ * modelLoopedAnimations: [ 'idle_lower', 'idle_upper' ],
3574
3573
  * modelScale: 0.5,
3575
3574
  * });
3576
3575
  *
@@ -3797,8 +3796,6 @@ export declare class PlayerManager {
3797
3796
  static readonly instance: PlayerManager;
3798
3797
 
3799
3798
 
3800
-
3801
-
3802
3799
  /**
3803
3800
  * Get all connected players.
3804
3801
  * @returns An array of all connected players.