@needle-tools/engine 4.3.0-alpha → 4.3.0-alpha.1

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 (101) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/needle-engine.bundle.js +1467 -222
  3. package/dist/needle-engine.bundle.light.js +1467 -222
  4. package/dist/needle-engine.bundle.light.min.js +32 -32
  5. package/dist/needle-engine.bundle.light.umd.cjs +3 -3
  6. package/dist/needle-engine.bundle.min.js +3 -3
  7. package/dist/needle-engine.bundle.umd.cjs +3 -3
  8. package/dist/needle-engine.light.d.ts +9 -9
  9. package/lib/engine/engine_types.d.ts +162 -17
  10. package/lib/engine-components/Animator.d.ts +129 -21
  11. package/lib/engine-components/Animator.js +115 -21
  12. package/lib/engine-components/Animator.js.map +1 -1
  13. package/lib/engine-components/AnimatorController.d.ts +161 -32
  14. package/lib/engine-components/AnimatorController.js +176 -29
  15. package/lib/engine-components/AnimatorController.js.map +1 -1
  16. package/lib/engine-components/AudioListener.d.ts +16 -5
  17. package/lib/engine-components/AudioListener.js +16 -5
  18. package/lib/engine-components/AudioListener.js.map +1 -1
  19. package/lib/engine-components/AudioSource.d.ts +120 -28
  20. package/lib/engine-components/AudioSource.js +120 -37
  21. package/lib/engine-components/AudioSource.js.map +1 -1
  22. package/lib/engine-components/AvatarLoader.d.ts +61 -0
  23. package/lib/engine-components/AvatarLoader.js +61 -1
  24. package/lib/engine-components/AvatarLoader.js.map +1 -1
  25. package/lib/engine-components/AxesHelper.d.ts +19 -1
  26. package/lib/engine-components/AxesHelper.js +19 -1
  27. package/lib/engine-components/AxesHelper.js.map +1 -1
  28. package/lib/engine-components/BoxHelperComponent.d.ts +26 -0
  29. package/lib/engine-components/BoxHelperComponent.js +26 -0
  30. package/lib/engine-components/BoxHelperComponent.js.map +1 -1
  31. package/lib/engine-components/Camera.d.ts +126 -37
  32. package/lib/engine-components/Camera.js +139 -37
  33. package/lib/engine-components/Camera.js.map +1 -1
  34. package/lib/engine-components/CameraUtils.js +20 -0
  35. package/lib/engine-components/CameraUtils.js.map +1 -1
  36. package/lib/engine-components/Collider.d.ts +95 -21
  37. package/lib/engine-components/Collider.js +100 -23
  38. package/lib/engine-components/Collider.js.map +1 -1
  39. package/lib/engine-components/Component.d.ts +554 -106
  40. package/lib/engine-components/Component.js +352 -81
  41. package/lib/engine-components/Component.js.map +1 -1
  42. package/lib/engine-components/DragControls.d.ts +95 -21
  43. package/lib/engine-components/DragControls.js +126 -32
  44. package/lib/engine-components/DragControls.js.map +1 -1
  45. package/lib/engine-components/DropListener.d.ts +99 -16
  46. package/lib/engine-components/DropListener.js +119 -14
  47. package/lib/engine-components/DropListener.js.map +1 -1
  48. package/lib/engine-components/Light.d.ts +102 -5
  49. package/lib/engine-components/Light.js +102 -44
  50. package/lib/engine-components/Light.js.map +1 -1
  51. package/lib/engine-components/NeedleMenu.d.ts +28 -11
  52. package/lib/engine-components/NeedleMenu.js +28 -11
  53. package/lib/engine-components/NeedleMenu.js.map +1 -1
  54. package/lib/engine-components/Networking.d.ts +37 -5
  55. package/lib/engine-components/Networking.js +37 -5
  56. package/lib/engine-components/Networking.js.map +1 -1
  57. package/lib/engine-components/SceneSwitcher.js +44 -0
  58. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  59. package/lib/engine-components/SpatialTrigger.d.ts +66 -1
  60. package/lib/engine-components/SpatialTrigger.js +74 -2
  61. package/lib/engine-components/SpatialTrigger.js.map +1 -1
  62. package/lib/engine-components/SpectatorCamera.d.ts +66 -4
  63. package/lib/engine-components/SpectatorCamera.js +132 -6
  64. package/lib/engine-components/SpectatorCamera.js.map +1 -1
  65. package/lib/engine-components/SyncedTransform.d.ts +45 -6
  66. package/lib/engine-components/SyncedTransform.js +45 -6
  67. package/lib/engine-components/SyncedTransform.js.map +1 -1
  68. package/lib/engine-components/TransformGizmo.d.ts +49 -3
  69. package/lib/engine-components/TransformGizmo.js +49 -3
  70. package/lib/engine-components/TransformGizmo.js.map +1 -1
  71. package/lib/engine-components/webxr/WebXR.d.ts +131 -22
  72. package/lib/engine-components/webxr/WebXR.js +132 -23
  73. package/lib/engine-components/webxr/WebXR.js.map +1 -1
  74. package/lib/engine-components-experimental/networking/PlayerSync.d.ts +82 -9
  75. package/lib/engine-components-experimental/networking/PlayerSync.js +76 -11
  76. package/lib/engine-components-experimental/networking/PlayerSync.js.map +1 -1
  77. package/package.json +1 -1
  78. package/src/engine/engine_types.ts +179 -18
  79. package/src/engine-components/Animator.ts +142 -22
  80. package/src/engine-components/AnimatorController.ts +184 -34
  81. package/src/engine-components/AudioListener.ts +16 -5
  82. package/src/engine-components/AudioSource.ts +126 -37
  83. package/src/engine-components/AvatarLoader.ts +61 -2
  84. package/src/engine-components/AxesHelper.ts +21 -1
  85. package/src/engine-components/BoxHelperComponent.ts +26 -0
  86. package/src/engine-components/Camera.ts +147 -41
  87. package/src/engine-components/CameraUtils.ts +20 -0
  88. package/src/engine-components/Collider.ts +102 -27
  89. package/src/engine-components/Component.ts +605 -129
  90. package/src/engine-components/DragControls.ts +134 -38
  91. package/src/engine-components/DropListener.ts +143 -23
  92. package/src/engine-components/Light.ts +105 -44
  93. package/src/engine-components/NeedleMenu.ts +29 -11
  94. package/src/engine-components/Networking.ts +37 -6
  95. package/src/engine-components/SceneSwitcher.ts +48 -1
  96. package/src/engine-components/SpatialTrigger.ts +80 -3
  97. package/src/engine-components/SpectatorCamera.ts +136 -18
  98. package/src/engine-components/SyncedTransform.ts +50 -7
  99. package/src/engine-components/TransformGizmo.ts +49 -4
  100. package/src/engine-components/webxr/WebXR.ts +144 -27
  101. package/src/engine-components-experimental/networking/PlayerSync.ts +85 -13
@@ -33,59 +33,109 @@ const debugQuicklook = getParam("debugusdz");
33
33
  */
34
34
  export class WebXR extends Behaviour {
35
35
  // UI
36
- /** When enabled a button will be added to the UI to enter VR */
36
+ /**
37
+ * When enabled, a button will be automatically added to {@link NeedleMenu} that allows users to enter VR mode.
38
+ */
37
39
  createVRButton = true;
38
- /** When enabled a button will be added to the UI to enter AR */
40
+ /**
41
+ * When enabled, a button will be automatically added to {@link NeedleMenu} that allows users to enter AR mode.
42
+ */
39
43
  createARButton = true;
40
- /** When enabled a send to quest button will be shown if the device does not support VR */
44
+ /**
45
+ * When enabled, a button to send the experience to an Oculus Quest will be shown if the current device does not support VR.
46
+ * This helps direct users to compatible devices for optimal VR experiences.
47
+ */
41
48
  createSendToQuestButton = true;
42
- /** When enabled a QRCode will be created to open the website on a mobile device */
49
+ /**
50
+ * When enabled, a QR code will be generated and displayed on desktop devices to allow easy opening of the experience on mobile devices.
51
+ */
43
52
  createQRCode = true;
44
53
  // VR Settings
45
- /** When enabled default movement behaviour will be added */
54
+ /**
55
+ * When enabled, default movement controls will be automatically added to the scene when entering VR.
56
+ * This includes teleportation and smooth locomotion options for VR controllers.
57
+ */
46
58
  useDefaultControls = true;
47
- /** When enabled controller models will automatically be created and updated when you are using controllers in WebXR */
59
+ /**
60
+ * When enabled, 3D models representing the user's VR controllers will be automatically created and rendered in the scene.
61
+ */
48
62
  showControllerModels = true;
49
- /** When enabled hand models will automatically be created and updated when you are using hands in WebXR */
63
+ /**
64
+ * When enabled, 3D models representing the user's hands will be automatically created and rendered when hand tracking is available.
65
+ */
50
66
  showHandModels = true;
51
67
  // AR Settings
52
- /** When enabled the scene must be placed in AR */
68
+ /**
69
+ * When enabled, a reticle will be displayed to help place the scene in AR. The user must tap on a detected surface to position the scene.
70
+ */
53
71
  usePlacementReticle = true;
54
- /** When assigned this object will be used as the AR placement reticle */
72
+ /**
73
+ * Optional custom 3D object to use as the AR placement reticle instead of the default one.
74
+ */
55
75
  customARPlacementReticle;
56
- /** When enabled you can position, rotate or scale your AR scene with one or two fingers */
76
+ /**
77
+ * When enabled, users can adjust the position, rotation, and scale of the AR scene with one or two fingers after initial placement.
78
+ */
57
79
  usePlacementAdjustment = true;
58
- /** Used when `usePlacementReticle` is enabled. This is the scale of the user in the scene in AR. Larger values make the 3D content appear smaller */
80
+ /**
81
+ * Determines the scale of the user relative to the scene in AR. Larger values make the 3D content appear smaller.
82
+ * Only applies when `usePlacementReticle` is enabled.
83
+ */
59
84
  arScale = 1;
60
- /** Experimental: When enabled an XRAnchor will be created for the AR scene and the position will be updated to the anchor position every few frames */
85
+ /**
86
+ * When enabled, an XRAnchor will be created for the AR scene and its position will be regularly updated to match the anchor.
87
+ * This can help with spatial persistence in AR experiences.
88
+ * @experimental
89
+ */
61
90
  useXRAnchor = false;
62
91
  /**
63
- * When enabled the scene will be placed automatically when a point in the real world is found
92
+ * When enabled, the scene will be automatically placed as soon as a suitable surface is detected in AR,
93
+ * without requiring the user to tap to confirm placement.
94
+ */
95
+ autoPlace = false;
96
+ /**
97
+ * When enabled, the AR session root center will be automatically adjusted to place the center of the scene.
98
+ * This helps ensure the scene is properly aligned with detected surfaces.
64
99
  */
65
- autoPlace = true;
66
- /** When enabled the AR session root center will be automatically adjusted to place the center of the scene */
67
100
  autoCenter = false;
68
- /** When enabled a USDZExporter component will be added to the scene (if none is found) */
101
+ /**
102
+ * When enabled, a USDZExporter component will be automatically added to the scene if none is found.
103
+ * This allows iOS and visionOS devices to view 3D content using Apple's AR QuickLook.
104
+ */
69
105
  useQuicklookExport = false;
70
- /** Preview feature enabling occlusion (when available: https://github.com/cabanier/three.js/commit/b6ee92bcd8f20718c186120b7f19a3b68a1d4e47)
71
- * Enables the 'depth-sensing' WebXR feature to provide realtime depth occlusion. Only supported on Oculus Quest right now.
106
+ /**
107
+ * When enabled, the 'depth-sensing' WebXR feature will be requested to provide real-time depth occlusion.
108
+ * Currently only supported on Oculus Quest devices.
109
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XRDepthInformation
110
+ * @experimental
72
111
  */
73
112
  useDepthSensing = false;
74
113
  /**
75
- * When enabled the spatial grab raycaster will be added or enabled in the scene
114
+ * When enabled, a {@link SpatialGrabRaycaster} will be added or enabled in the scene,
115
+ * allowing users to interact with objects at a distance in VR/AR.
76
116
  * @default true
77
117
  */
78
118
  useSpatialGrab = true;
79
- /** This avatar representation will be spawned when you enter a webxr session */
119
+ /**
120
+ * Specifies the avatar representation that will be created when entering a WebXR session.
121
+ * Can be a reference to a 3D model or a boolean to use the default avatar.
122
+ */
80
123
  defaultAvatar;
81
124
  _playerSync;
82
125
  /** these components were created by the WebXR component on session start and will be cleaned up again in session end */
83
126
  _createdComponentsInSession = [];
84
127
  _usdzExporter;
85
128
  static activeWebXRComponent = null;
129
+ /**
130
+ * Initializes the WebXR component by obtaining the XR sync object for this context.
131
+ */
86
132
  awake() {
87
133
  NeedleXRSession.getXRSync(this.context);
88
134
  }
135
+ /**
136
+ * Sets up the WebXR component when it's enabled. Checks for HTTPS connection,
137
+ * sets up USDZ export if enabled, creates UI buttons, and configures avatar settings.
138
+ */
89
139
  onEnable() {
90
140
  // check if we're on a secure connection:
91
141
  if (window.location.protocol !== "https:") {
@@ -121,10 +171,19 @@ export class WebXR extends Behaviour {
121
171
  this._playerSync.onPlayerSpawned?.addEventListener(this.onAvatarSpawned);
122
172
  }
123
173
  }
174
+ /**
175
+ * Cleans up resources when the component is disabled.
176
+ * Destroys the USDZ exporter if one was created and removes UI buttons.
177
+ */
124
178
  onDisable() {
125
179
  this._usdzExporter?.destroy();
126
180
  this.removeButtons();
127
181
  }
182
+ /**
183
+ * Checks if WebXR is supported and offers an appropriate session.
184
+ * This is used to show the WebXR session joining prompt in browsers that support it.
185
+ * @returns A Promise that resolves to true if a session was offered, false otherwise
186
+ */
128
187
  async handleOfferSession() {
129
188
  if (this.createVRButton) {
130
189
  const hasVRSupport = await NeedleXRSession.isVRSupported();
@@ -167,6 +226,11 @@ export class WebXR extends Behaviour {
167
226
  get isActiveWebXR() {
168
227
  return !WebXR.activeWebXRComponent || WebXR.activeWebXRComponent === this;
169
228
  }
229
+ /**
230
+ * Called before entering a WebXR session. Sets up optional features like depth sensing, if needed.
231
+ * @param _mode The XR session mode being requested (immersive-ar or immersive-vr)
232
+ * @param args The XRSessionInit object that will be passed to the WebXR API
233
+ */
170
234
  onBeforeXR(_mode, args) {
171
235
  if (!this.isActiveWebXR) {
172
236
  console.warn(`WebXR: another WebXR component is already active (${WebXR.activeWebXRComponent?.name}). This is ignored: ${this.name}`);
@@ -178,6 +242,11 @@ export class WebXR extends Behaviour {
178
242
  args.optionalFeatures.push("depth-sensing");
179
243
  }
180
244
  }
245
+ /**
246
+ * Called when a WebXR session begins. Sets up the scene for XR by configuring controllers,
247
+ * AR placement, and other features based on component settings.
248
+ * @param args Event arguments containing information about the started XR session
249
+ */
181
250
  async onEnterXR(args) {
182
251
  if (!this.isActiveWebXR)
183
252
  return;
@@ -242,6 +311,11 @@ export class WebXR extends Behaviour {
242
311
  });
243
312
  }
244
313
  }
314
+ /**
315
+ * Called every frame during an active WebXR session.
316
+ * Updates components that depend on the current XR state.
317
+ * @param _args Event arguments containing information about the current XR session frame
318
+ */
245
319
  onUpdateXR(_args) {
246
320
  if (!this.isActiveWebXR)
247
321
  return;
@@ -249,6 +323,11 @@ export class WebXR extends Behaviour {
249
323
  this._spatialGrabRaycaster.enabled = this.useSpatialGrab;
250
324
  }
251
325
  }
326
+ /**
327
+ * Called when a WebXR session ends. Restores pre-session state,
328
+ * removes temporary components, and cleans up resources.
329
+ * @param _ Event arguments containing information about the ended XR session
330
+ */
252
331
  onLeaveXR(_) {
253
332
  this._exitXRMenuButton?.remove();
254
333
  if (!this.isActiveWebXR)
@@ -287,12 +366,21 @@ export class WebXR extends Behaviour {
287
366
  models.enabled = enabled;
288
367
  return models;
289
368
  }
369
+ /**
370
+ * Creates and instantiates the user's avatar representation in the WebXR session.
371
+ * @param xr The active session
372
+ */
290
373
  async createLocalAvatar(xr) {
291
374
  if (this._playerSync && xr.running && typeof this.defaultAvatar != "boolean") {
292
375
  this._playerSync.asset = this.defaultAvatar;
293
376
  await this._playerSync.getInstance();
294
377
  }
295
378
  }
379
+ /**
380
+ * Event handler called when a player avatar is spawned.
381
+ * Ensures the avatar has the necessary Avatar component.
382
+ * @param instance The spawned avatar 3D object
383
+ */
296
384
  onAvatarSpawned = (instance) => {
297
385
  // spawned webxr avatars must have a avatar component
298
386
  if (debug)
@@ -301,19 +389,29 @@ export class WebXR extends Behaviour {
301
389
  avatar ??= GameObject.addComponent(instance, Avatar);
302
390
  };
303
391
  // HTML UI
304
- /** @deprecated use `getButtonsFactory()` or access `WebXRButtonFactory.getOrCreate()` directory */
392
+ /** @deprecated use {@link getButtonsFactory} or directly access {@link WebXRButtonFactory.getOrCreate} */
305
393
  getButtonsContainer() {
306
394
  return this.getButtonsFactory();
307
395
  }
308
- /** Calling this function will get the Needle WebXR button factory (it will be created if it doesnt exist yet)
309
- * @returns the Needle WebXR button factory */
396
+ /**
397
+ * Returns the WebXR button factory, creating one if it doesn't exist.
398
+ * Use this to access and modify WebXR UI buttons.
399
+ * @returns The WebXRButtonFactory instance
400
+ */
310
401
  getButtonsFactory() {
311
402
  if (!this._buttonFactory) {
312
403
  this._buttonFactory = WebXRButtonFactory.getOrCreate();
313
404
  }
314
405
  return this._buttonFactory;
315
406
  }
407
+ /**
408
+ * Reference to the WebXR button factory used by this component.
409
+ */
316
410
  _buttonFactory;
411
+ /**
412
+ * Creates and sets up UI elements for WebXR interaction based on component settings
413
+ * and device capabilities. Handles creating AR, VR, QuickLook buttons and utility buttons like QR codes.
414
+ */
317
415
  handleCreatingHTML() {
318
416
  const xrButtonsPriority = 50;
319
417
  if (this.createARButton || this.createVRButton || this.useQuicklookExport) {
@@ -358,12 +456,23 @@ export class WebXR extends Behaviour {
358
456
  }
359
457
  }
360
458
  }
459
+ /**
460
+ * Storage for UI buttons created by this component.
461
+ */
361
462
  _buttons = [];
463
+ /**
464
+ * Adds a button to the UI with the specified priority.
465
+ * @param button The HTML element to add
466
+ * @param priority The button's priority value (lower numbers appear first)
467
+ */
362
468
  addButton(button, priority) {
363
469
  this._buttons.push(button);
364
470
  button.setAttribute("priority", priority.toString());
365
471
  this.context.menu.appendChild(button);
366
472
  }
473
+ /**
474
+ * Removes all buttons created by this component from the UI.
475
+ */
367
476
  removeButtons() {
368
477
  for (const button of this._buttons) {
369
478
  button.remove();
@@ -1 +1 @@
1
- {"version":3,"file":"WebXR.js","sourceRoot":"","sources":["../../../src/engine-components/webxr/WebXR.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAA0B,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+DAA+D,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,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I,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,CAAC;;AAtgBD;IADC,YAAY,EAAE;6CACgB;AAM/B;IADC,YAAY,EAAE;6CACgB;AAO/B;IADC,YAAY,EAAE;sDACyB;AAMxC;IADC,YAAY,EAAE;2CACc;AAQ7B;IADC,YAAY,EAAE;iDACoB;AAMnC;IADC,YAAY,EAAE;mDACsB;AAMrC;IADC,YAAY,EAAE;6CACgB;AAO/B;IADC,YAAY,EAAE;kDACqB;AAMpC;IADC,YAAY,CAAC,cAAc,CAAC;uDACa;AAM1C;IADC,YAAY,EAAE;qDACwB;AAOvC;IADC,YAAY,EAAE;sCACK;AAQpB;IADC,YAAY,EAAE;0CACc;AAO7B;IADC,YAAY,EAAE;wCACY;AAO3B;IADC,YAAY,EAAE;yCACa;AAO5B;IADC,YAAY,EAAE;iDACqB;AASpC;IADC,YAAY,EAAE;8CACkB;AAQjC;IADC,YAAY,EAAE;6CACgB;AAO/B;IADC,YAAY,CAAC,cAAc,CAAC;4CACY"}
@@ -3,6 +3,7 @@ import { AssetReference } from "../../engine/engine_addressables.js";
3
3
  import type { ComponentInit, IGameObject } from "../../engine/engine_types.js";
4
4
  import { Behaviour, Component } from "../../engine-components/Component.js";
5
5
  import { EventList } from "../../engine-components/EventList.js";
6
+ /** Type definition for a PlayerSync instance with a guaranteed asset property */
6
7
  declare type PlayerSyncWithAsset = PlayerSync & Required<Pick<PlayerSync, "asset">>;
7
8
  /**
8
9
  * This component instantiates an asset for each player that joins a networked room. The asset will be destroyed when the player leaves the room.
@@ -12,7 +13,10 @@ declare type PlayerSyncWithAsset = PlayerSync & Required<Pick<PlayerSync, "asset
12
13
  export declare class PlayerSync extends Behaviour {
13
14
  /**
14
15
  * This API is experimental and may change or be removed in the future.
15
- * Create a PlayerSync instance at runtime from a given URL
16
+ * Creates a PlayerSync instance at runtime from a given URL and sets it up for networking
17
+ * @param url Path to the asset that should be instantiated for each player
18
+ * @param init Optional initialization parameters for the PlayerSync component
19
+ * @returns Promise resolving to a PlayerSync instance with a guaranteed asset property
16
20
  * @example
17
21
  * ```typescript
18
22
  * const res = await PlayerSync.setupFrom("/assets/demo.glb");
@@ -22,62 +26,131 @@ export declare class PlayerSync extends Behaviour {
22
26
  * ```
23
27
  */
24
28
  static setupFrom(url: string, init?: Omit<ComponentInit<PlayerSync>, "asset">): Promise<PlayerSyncWithAsset>;
25
- /** when enabled PlayerSync will automatically load and instantiate the assigned asset when joining a networked room */
29
+ /**
30
+ * When enabled, PlayerSync will automatically load and instantiate the assigned asset when joining a networked room
31
+ */
26
32
  autoSync: boolean;
27
- /** This asset will be loaded and instantiated when PlayerSync becomes active and joins a networked room */
33
+ /**
34
+ * The asset that will be loaded and instantiated when PlayerSync becomes active and joins a networked room
35
+ */
28
36
  asset?: AssetReference;
29
- /** Event called when an instance is spawned */
37
+ /**
38
+ * Event invoked when a player instance is spawned with the spawned {@link Object3D} as parameter
39
+ * @serializable
40
+ */
30
41
  onPlayerSpawned?: EventList<Object3D>;
31
42
  private _localInstance?;
32
43
  awake(): void;
33
44
  onEnable(): void;
34
45
  onDisable(): void;
35
46
  private onJoinedRoom;
47
+ /**
48
+ * Gets or creates an instance of the assigned asset for the local player
49
+ * @returns Promise resolving to the instantiated player object or null if creation failed
50
+ */
36
51
  getInstance(): Promise<IGameObject | null | undefined>;
52
+ /**
53
+ * Destroys the current player instance and cleans up networking state
54
+ */
37
55
  destroyInstance: () => void;
56
+ /**
57
+ * Sets up visibility change listeners to handle player cleanup when browser tab visibility changes
58
+ */
38
59
  private watchTabVisible;
39
60
  }
61
+ /**
62
+ * Enum defining events that can be triggered by PlayerState
63
+ */
40
64
  export declare enum PlayerStateEvent {
65
+ /** Triggered when a PlayerState's owner property changes */
41
66
  OwnerChanged = "ownerChanged"
42
67
  }
68
+ /** Arguments passed when a PlayerState's owner changes */
43
69
  export declare interface PlayerStateOwnerChangedArgs {
70
+ /** The PlayerState instance that changed */
44
71
  playerState: PlayerState;
72
+ /** Previous owner's connection ID */
45
73
  oldValue: string;
74
+ /** New owner's connection ID */
46
75
  newValue: string;
47
76
  }
77
+ /** Callback type for PlayerState events */
48
78
  export declare type PlayerStateEventCallback = (args: CustomEvent<PlayerStateOwnerChangedArgs>) => void;
79
+ /**
80
+ * Represents a player instance in the networked environment.
81
+ * Handles ownership, synchronization, and lifecycle management of player objects.
82
+ */
49
83
  export declare class PlayerState extends Behaviour {
50
84
  private static _all;
51
- /** all instances for all players */
85
+ /** All PlayerState instances for all players in the scene */
52
86
  static get all(): PlayerState[];
53
87
  private static _local;
54
- /** all instances for the local player */
88
+ /** All PlayerState instances that belong to the local player */
55
89
  static get local(): PlayerState[];
90
+ /**
91
+ * Gets the PlayerState component for a given object or component
92
+ * @param obj Object3D or Component to find the PlayerState for
93
+ * @returns The PlayerState component if found, undefined otherwise
94
+ */
56
95
  static getFor(obj: Object3D | Component): PlayerState | null | undefined;
96
+ /**
97
+ * Checks if a given object or component belongs to the local player
98
+ * @param obj Object3D or Component to check
99
+ * @returns True if the object belongs to the local player, false otherwise
100
+ */
57
101
  static isLocalPlayer(obj: Object3D | Component): boolean;
58
102
  private static _callbacks;
59
103
  /**
60
- * Add a callback for a PlayerStateEvent
104
+ * Registers a callback for a specific PlayerState event
105
+ * @param event The event to listen for
106
+ * @param cb Callback function that will be invoked when the event occurs
107
+ * @returns The provided callback function for chaining
61
108
  */
62
109
  static addEventListener(event: PlayerStateEvent, cb: PlayerStateEventCallback): PlayerStateEventCallback;
110
+ /**
111
+ * Removes a previously registered event callback
112
+ * @param event The event type to remove the callback from
113
+ * @param cb The callback function to remove
114
+ */
63
115
  static removeEventListener(event: PlayerStateEvent, cb: PlayerStateEventCallback): void;
64
116
  private static dispatchEvent;
117
+ /** Event triggered when the owner of this PlayerState changes */
65
118
  onOwnerChangeEvent: EventList<any>;
119
+ /** Event triggered the first time an owner is assigned to this PlayerState */
66
120
  onFirstOwnerChangeEvent: EventList<any>;
121
+ /** Indicates if this PlayerState has an owner assigned */
67
122
  hasOwner: boolean;
123
+ /**
124
+ * The connection ID of the player who owns this PlayerState instance
125
+ * @syncField Synchronized across the network
126
+ */
68
127
  owner?: string;
69
- /** when enabled PlayerSync will not destroy itself when not connected anymore */
128
+ /**
129
+ * When enabled, PlayerState will not destroy itself when the owner is not connected anymore
130
+ */
70
131
  dontDestroy: boolean;
132
+ /**
133
+ * Indicates if this PlayerState belongs to the local player
134
+ */
71
135
  get isLocalPlayer(): boolean;
136
+ /**
137
+ * Handles owner change events and updates relevant state
138
+ * @param newOwner The new owner's connection ID
139
+ * @param oldOwner The previous owner's connection ID
140
+ */
72
141
  private onOwnerChange;
73
142
  /** @internal */
74
143
  awake(): void;
75
144
  /** @internal */
76
145
  start(): Promise<void>;
77
- /** this tells the server that this client has been destroyed and the networking message for the instantiate will be removed */
146
+ /** Tells the server that this client has been destroyed, and the networking message for the instantiate will be removed */
78
147
  doDestroy(): void;
79
148
  /** @internal */
80
149
  onDestroy(): void;
150
+ /**
151
+ * Handler for when a user leaves the networked room
152
+ * @param model Object containing the ID of the user who left
153
+ */
81
154
  private onUserLeftRoom;
82
155
  }
83
156
  export {};