@thatopen/components 2.0.0-alpha.15 → 2.0.0-alpha.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.
@@ -7,15 +7,45 @@ export * from "./src";
7
7
  * that are not visible to the camera.
8
8
  */
9
9
  export declare class Cullers extends Component implements Disposable {
10
+ /**
11
+ * A unique identifier for the Cullers component.
12
+ */
10
13
  static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
14
+ /**
15
+ * Indicates whether the Cullers component is enabled.
16
+ */
11
17
  private _enabled;
18
+ /**
19
+ * A map of MeshCullerRenderer instances, keyed by their world UUIDs.
20
+ */
12
21
  list: Map<string, MeshCullerRenderer>;
13
- /** {@link Disposable.onDisposed} */
22
+ /**
23
+ * An event that is triggered when the Cullers component is disposed.
24
+ */
14
25
  readonly onDisposed: Event<unknown>;
15
- /** {@link Component.enabled} */
26
+ /**
27
+ * Gets the enabled state of the Cullers component.
28
+ *
29
+ * @returns The current enabled state.
30
+ */
16
31
  get enabled(): boolean;
32
+ /**
33
+ * Sets the enabled state of the Cullers component.
34
+ * Also sets the enabled state of all MeshCullerRenderer instances.
35
+ *
36
+ * @param value - The new enabled state.
37
+ */
17
38
  set enabled(value: boolean);
18
39
  constructor(components: Components);
40
+ /**
41
+ * Creates a new MeshCullerRenderer for the given world.
42
+ * If a MeshCullerRenderer already exists for the world, it will return the existing one.
43
+ *
44
+ * @param world - The world for which to create the MeshCullerRenderer.
45
+ * @param config - Optional configuration settings for the MeshCullerRenderer.
46
+ *
47
+ * @returns The newly created or existing MeshCullerRenderer for the given world.
48
+ */
19
49
  create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
20
50
  delete(world: World): void;
21
51
  /** {@link Disposable.dispose} */
@@ -3,13 +3,48 @@ import { Components } from "../Components";
3
3
  import { SimpleWorld } from "./src";
4
4
  export * from "./src";
5
5
  export declare class Worlds extends Component implements Updateable, Disposable {
6
+ /**
7
+ * A unique identifier for the component.
8
+ * This UUID is used to register the component within the Components system.
9
+ */
6
10
  static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
11
+ /**
12
+ * Event triggered after the update process of all worlds.
13
+ * Subscribers can listen to this event to perform actions post-update.
14
+ */
7
15
  readonly onAfterUpdate: Event<unknown>;
16
+ /**
17
+ * Event triggered before the update process of all worlds.
18
+ * Subscribers can listen to this event to perform actions pre-update.
19
+ */
8
20
  readonly onBeforeUpdate: Event<unknown>;
21
+ /**
22
+ * Event triggered when the Worlds component is disposed.
23
+ * Subscribers can listen to this event to perform cleanup actions.
24
+ */
9
25
  readonly onDisposed: Event<unknown>;
26
+ /**
27
+ * A collection of worlds managed by this component.
28
+ * The key is the unique identifier (UUID) of the world, and the value is the World instance.
29
+ */
10
30
  list: Map<string, World>;
31
+ /**
32
+ * A flag indicating whether the Worlds component is enabled.
33
+ * If false, the update process will be skipped.
34
+ */
11
35
  enabled: boolean;
12
36
  constructor(components: Components);
37
+ /**
38
+ * Creates a new instance of a SimpleWorld and adds it to the list of worlds.
39
+ *
40
+ * @template T - The type of the scene, extending from BaseScene. Defaults to BaseScene.
41
+ * @template U - The type of the camera, extending from BaseCamera. Defaults to BaseCamera.
42
+ * @template S - The type of the renderer, extending from BaseRenderer. Defaults to BaseRenderer.
43
+ *
44
+ * @returns {SimpleWorld<T, U, S>} - The newly created SimpleWorld instance.
45
+ *
46
+ * @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
47
+ */
13
48
  create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
14
49
  delete(world: World): void;
15
50
  dispose(): void;