@thatopen/components 2.0.1 → 2.0.4
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.
- package/README.md +0 -0
- package/dist/core/Grids/index.d.ts +3 -1
- package/dist/core/Types/src/world.d.ts +1 -0
- package/dist/core/Worlds/index.d.ts +10 -10
- package/dist/core/Worlds/src/simple-world.d.ts +2 -0
- package/dist/fragments/Classifier/index.d.ts +2 -2
- package/dist/fragments/Hider/index.d.ts +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +1207 -1180
- package/dist/namespace.d.ts +1163 -1158
- package/package.json +73 -73
package/README.md
ADDED
|
File without changes
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Component, Disposable, World, Event } from "../Types";
|
|
2
2
|
import { GridConfig, SimpleGrid } from "./src";
|
|
3
|
+
import { Components } from "../Components";
|
|
3
4
|
export declare class Grids extends Component implements Disposable {
|
|
4
5
|
static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
|
|
5
6
|
list: Map<string, SimpleGrid>;
|
|
6
|
-
onDisposed: Event<unknown>;
|
|
7
|
+
readonly onDisposed: Event<unknown>;
|
|
7
8
|
config: Required<GridConfig>;
|
|
8
9
|
/** {@link Component.enabled} */
|
|
9
10
|
enabled: boolean;
|
|
11
|
+
constructor(components: Components);
|
|
10
12
|
create(world: World): SimpleGrid;
|
|
11
13
|
delete(world: World): void;
|
|
12
14
|
dispose(): void;
|
|
@@ -23,6 +23,8 @@ export declare class Worlds extends Component implements Updateable, Disposable
|
|
|
23
23
|
* Subscribers can listen to this event to perform cleanup actions.
|
|
24
24
|
*/
|
|
25
25
|
readonly onDisposed: Event<unknown>;
|
|
26
|
+
readonly onWorldCreated: Event<World>;
|
|
27
|
+
readonly onWorldDeleted: Event<string>;
|
|
26
28
|
/**
|
|
27
29
|
* A collection of worlds managed by this component.
|
|
28
30
|
* The key is the unique identifier (UUID) of the world, and the value is the World instance.
|
|
@@ -35,16 +37,14 @@ export declare class Worlds extends Component implements Updateable, Disposable
|
|
|
35
37
|
enabled: boolean;
|
|
36
38
|
constructor(components: Components);
|
|
37
39
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
|
|
47
|
-
*/
|
|
40
|
+
* Creates a new instance of a SimpleWorld and adds it to the list of worlds.
|
|
41
|
+
*
|
|
42
|
+
* @template T - The type of the scene, extending from BaseScene. Defaults to BaseScene.
|
|
43
|
+
* @template U - The type of the camera, extending from BaseCamera. Defaults to BaseCamera.
|
|
44
|
+
* @template S - The type of the renderer, extending from BaseRenderer. Defaults to BaseRenderer.
|
|
45
|
+
*
|
|
46
|
+
* @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
|
|
47
|
+
*/
|
|
48
48
|
create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
|
|
49
49
|
delete(world: World): void;
|
|
50
50
|
dispose(): void;
|
|
@@ -8,8 +8,10 @@ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends Base
|
|
|
8
8
|
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
9
9
|
readonly onAfterUpdate: Event<unknown>;
|
|
10
10
|
readonly onBeforeUpdate: Event<unknown>;
|
|
11
|
+
isDisposing: boolean;
|
|
11
12
|
enabled: boolean;
|
|
12
13
|
uuid: string;
|
|
14
|
+
name?: string;
|
|
13
15
|
readonly onDisposed: Event<unknown>;
|
|
14
16
|
private _scene?;
|
|
15
17
|
private _camera?;
|
|
@@ -23,9 +23,9 @@ export declare class Classifier extends Component implements Disposable {
|
|
|
23
23
|
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
24
24
|
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
25
25
|
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
26
|
-
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
27
26
|
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
27
|
+
bySpatialStructure(model: FRAGS.FragmentsGroup): Promise<void>;
|
|
28
28
|
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
|
|
29
29
|
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
30
|
-
|
|
30
|
+
protected saveItem(group: FRAGS.FragmentsGroup, systemName: string, className: string, expressID: number): void;
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as FRAGS from "@thatopen/fragments";
|
|
2
2
|
import { Components, Component } from "../../core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class Hider extends Component {
|
|
4
4
|
static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
|
|
5
5
|
enabled: boolean;
|
|
6
6
|
constructor(components: Components);
|