@thatopen/components 2.4.11 → 3.1.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.
- package/dist/index.cjs +18440 -25937
- package/dist/index.d.ts +4530 -6
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.mjs +3 -3
- package/dist/index.mjs +18442 -25939
- package/package.json +8 -10
- package/dist/core/Clipper/index.d.ts +0 -142
- package/dist/core/Clipper/src/clipper-config.d.ts +0 -33
- package/dist/core/Clipper/src/index.d.ts +0 -1
- package/dist/core/Clipper/src/simple-plane.d.ts +0 -99
- package/dist/core/Components/index.d.ts +0 -93
- package/dist/core/ConfigManager/index.d.ts +0 -21
- package/dist/core/ConfigManager/src/configurator.d.ts +0 -13
- package/dist/core/ConfigManager/src/index.d.ts +0 -1
- package/dist/core/Cullers/index.d.ts +0 -56
- package/dist/core/Cullers/src/culler-renderer-config.d.ts +0 -74
- package/dist/core/Cullers/src/culler-renderer.d.ts +0 -76
- package/dist/core/Cullers/src/index.d.ts +0 -3
- package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +0 -59
- package/dist/core/Cullers/src/screen-culler-helper.d.ts +0 -1
- package/dist/core/Disposer/index.d.ts +0 -45
- package/dist/core/Grids/index.d.ts +0 -46
- package/dist/core/Grids/src/index.d.ts +0 -2
- package/dist/core/Grids/src/simple-grid-config.d.ts +0 -80
- package/dist/core/Grids/src/simple-grid.d.ts +0 -48
- package/dist/core/MiniMap/index.d.ts +0 -50
- package/dist/core/MiniMap/src/index.d.ts +0 -2
- package/dist/core/MiniMap/src/mini-map-config.d.ts +0 -112
- package/dist/core/MiniMap/src/mini-map.d.ts +0 -100
- package/dist/core/OrthoPerspectiveCamera/index.d.ts +0 -65
- package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +0 -16
- package/dist/core/OrthoPerspectiveCamera/src/index.d.ts +0 -5
- package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +0 -16
- package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +0 -20
- package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +0 -45
- package/dist/core/OrthoPerspectiveCamera/src/types.d.ts +0 -26
- package/dist/core/Raycasters/index.d.ts +0 -43
- package/dist/core/Raycasters/src/index.d.ts +0 -2
- package/dist/core/Raycasters/src/mouse.d.ts +0 -24
- package/dist/core/Raycasters/src/simple-raycaster.d.ts +0 -54
- package/dist/core/ShadowedScene/index.d.ts +0 -57
- package/dist/core/ShadowedScene/src/distance-renderer.d.ts +0 -67
- package/dist/core/ShadowedScene/src/index.d.ts +0 -1
- package/dist/core/Types/index.d.ts +0 -1
- package/dist/core/Types/src/async-event.d.ts +0 -32
- package/dist/core/Types/src/base-camera.d.ts +0 -28
- package/dist/core/Types/src/base-renderer.d.ts +0 -65
- package/dist/core/Types/src/base-scene.d.ts +0 -25
- package/dist/core/Types/src/base-world-item.d.ts +0 -23
- package/dist/core/Types/src/base.d.ts +0 -19
- package/dist/core/Types/src/component-with-ui.d.ts +0 -18
- package/dist/core/Types/src/component.d.ts +0 -13
- package/dist/core/Types/src/config-types.d.ts +0 -47
- package/dist/core/Types/src/data-map.d.ts +0 -73
- package/dist/core/Types/src/data-set.d.ts +0 -58
- package/dist/core/Types/src/event-manager.d.ts +0 -30
- package/dist/core/Types/src/event.d.ts +0 -32
- package/dist/core/Types/src/index.d.ts +0 -15
- package/dist/core/Types/src/interfaces.d.ts +0 -117
- package/dist/core/Types/src/world.d.ts +0 -34
- package/dist/core/Viewpoints/index.d.ts +0 -38
- package/dist/core/Viewpoints/src/index.d.ts +0 -2
- package/dist/core/Viewpoints/src/types.d.ts +0 -36
- package/dist/core/Viewpoints/src/viewpoint.d.ts +0 -197
- package/dist/core/Viewpoints/src/viewpoints-config.d.ts +0 -23
- package/dist/core/Worlds/index.d.ts +0 -54
- package/dist/core/Worlds/src/index.d.ts +0 -5
- package/dist/core/Worlds/src/simple-camera.d.ts +0 -62
- package/dist/core/Worlds/src/simple-renderer.d.ts +0 -54
- package/dist/core/Worlds/src/simple-scene-config.d.ts +0 -59
- package/dist/core/Worlds/src/simple-scene.d.ts +0 -25
- package/dist/core/Worlds/src/simple-world.d.ts +0 -79
- package/dist/core/index.d.ts +0 -13
- package/dist/fragments/BoundingBoxer/index.d.ts +0 -208
- package/dist/fragments/Classifier/index.d.ts +0 -197
- package/dist/fragments/Exploder/index.d.ts +0 -50
- package/dist/fragments/FragmentsManager/index.d.ts +0 -152
- package/dist/fragments/Hider/index.d.ts +0 -38
- package/dist/fragments/IfcGeometryTiler/index.d.ts +0 -103
- package/dist/fragments/IfcGeometryTiler/src/base-types.d.ts +0 -29
- package/dist/fragments/IfcGeometryTiler/src/index.d.ts +0 -2
- package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +0 -20
- package/dist/fragments/IfcLoader/index.d.ts +0 -116
- package/dist/fragments/IfcLoader/src/civil-reader.d.ts +0 -15
- package/dist/fragments/IfcLoader/src/ifc-fragment-settings.d.ts +0 -41
- package/dist/fragments/IfcLoader/src/ifc-metadata-reader.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/index.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/spatial-ids-finder.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/spatial-structure.d.ts +0 -8
- package/dist/fragments/IfcLoader/src/transform-helper.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/units.d.ts +0 -10
- package/dist/fragments/IfcPropertiesTiler/index.d.ts +0 -66
- package/dist/fragments/IfcPropertiesTiler/src/index.d.ts +0 -1
- package/dist/fragments/IfcPropertiesTiler/src/streaming-settings.d.ts +0 -11
- package/dist/fragments/index.d.ts +0 -8
- package/dist/ifc/IfcFinder/index.d.ts +0 -50
- package/dist/ifc/IfcFinder/src/ifc-basic-query.d.ts +0 -35
- package/dist/ifc/IfcFinder/src/ifc-finder-query.d.ts +0 -96
- package/dist/ifc/IfcFinder/src/ifc-property-query.d.ts +0 -36
- package/dist/ifc/IfcFinder/src/ifc-query-group.d.ts +0 -69
- package/dist/ifc/IfcFinder/src/index.d.ts +0 -4
- package/dist/ifc/IfcFinder/src/types.d.ts +0 -84
- package/dist/ifc/IfcIsolator/index.d.ts +0 -24
- package/dist/ifc/IfcJsonExporter/index.d.ts +0 -26
- package/dist/ifc/IfcJsonExporter/src/ifc-geometry-types.d.ts +0 -4
- package/dist/ifc/IfcJsonExporter/src/index.d.ts +0 -1
- package/dist/ifc/IfcPropertiesManager/index.d.ts +0 -289
- package/dist/ifc/IfcPropertiesManager/src/index.d.ts +0 -3
- package/dist/ifc/IfcPropertiesManager/src/rel-attrs.d.ts +0 -7
- package/dist/ifc/IfcPropertiesManager/src/rel-names.d.ts +0 -3
- package/dist/ifc/IfcPropertiesManager/src/types.d.ts +0 -18
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +0 -195
- package/dist/ifc/IfcRelationsIndexer/src/index.d.ts +0 -2
- package/dist/ifc/IfcRelationsIndexer/src/newVersion.d.ts +0 -51
- package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +0 -5
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +0 -73
- package/dist/ifc/Utils/ifc-categories.d.ts +0 -7
- package/dist/ifc/Utils/ifc-category-case.d.ts +0 -3
- package/dist/ifc/Utils/ifc-category-map.d.ts +0 -6
- package/dist/ifc/Utils/ifc-elements-map.d.ts +0 -11
- package/dist/ifc/Utils/index.d.ts +0 -5
- package/dist/ifc/Utils/properties-utils.d.ts +0 -25
- package/dist/ifc/index.d.ts +0 -6
- package/dist/measurement/MeasurementUtils/index.d.ts +0 -105
- package/dist/measurement/index.d.ts +0 -1
- package/dist/namespace.d.ts +0 -6018
- package/dist/openbim/BCFTopics/index.d.ts +0 -114
- package/dist/openbim/BCFTopics/src/Comment.d.ts +0 -40
- package/dist/openbim/BCFTopics/src/Topic.d.ts +0 -127
- package/dist/openbim/BCFTopics/src/bcf-topics-config.d.ts +0 -121
- package/dist/openbim/BCFTopics/src/importers/extensions.d.ts +0 -2
- package/dist/openbim/BCFTopics/src/importers/index.d.ts +0 -1
- package/dist/openbim/BCFTopics/src/index.d.ts +0 -5
- package/dist/openbim/BCFTopics/src/types.d.ts +0 -19
- package/dist/openbim/IDSSpecifications/index.d.ts +0 -60
- package/dist/openbim/IDSSpecifications/src/Specification.d.ts +0 -40
- package/dist/openbim/IDSSpecifications/src/exporters/parameter.d.ts +0 -2
- package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +0 -13
- package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +0 -21
- package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +0 -15
- package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +0 -26
- package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +0 -10
- package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +0 -26
- package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +0 -25
- package/dist/openbim/IDSSpecifications/src/facets/index.d.ts +0 -5
- package/dist/openbim/IDSSpecifications/src/importers/attribute.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/classification.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/entity.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/index.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/parameter.d.ts +0 -2
- package/dist/openbim/IDSSpecifications/src/importers/property.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/index.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/types.d.ts +0 -70
- package/dist/openbim/index.d.ts +0 -2
- package/dist/utils/bbox.d.ts +0 -7
- package/dist/utils/geometry.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/materials.d.ts +0 -4
- package/dist/utils/section-generator.d.ts +0 -31
- package/dist/utils/uuid.d.ts +0 -6
- package/dist/utils/vertex-picker.d.ts +0 -116
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { CullerRenderer } from "./culler-renderer";
|
|
3
|
-
import { Components } from "../../Components";
|
|
4
|
-
import { Event, World, Disposable } from "../../Types";
|
|
5
|
-
/**
|
|
6
|
-
* A renderer to hide/show meshes depending on their visibility from the user's point of view.
|
|
7
|
-
*/
|
|
8
|
-
export declare class MeshCullerRenderer extends CullerRenderer implements Disposable {
|
|
9
|
-
/**
|
|
10
|
-
* Event triggered when the visibility of meshes is updated.
|
|
11
|
-
* Contains two sets: seen and unseen.
|
|
12
|
-
*/
|
|
13
|
-
readonly onViewUpdated: Event<{
|
|
14
|
-
seen: Set<THREE.Mesh>;
|
|
15
|
-
unseen: Set<THREE.Mesh>;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* Map of color code to THREE.InstancedMesh.
|
|
19
|
-
* Used to keep track of color-coded meshes.
|
|
20
|
-
*/
|
|
21
|
-
colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.InstancedMeshEventMap>>;
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated use config.threshold instead.
|
|
24
|
-
*/
|
|
25
|
-
get threshold(): number;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated use config.threshold instead.
|
|
28
|
-
*/
|
|
29
|
-
set threshold(value: number);
|
|
30
|
-
private _colorCodeMeshMap;
|
|
31
|
-
private _meshIDColorCodeMap;
|
|
32
|
-
private _currentVisibleMeshes;
|
|
33
|
-
private _recentlyHiddenMeshes;
|
|
34
|
-
private readonly _transparentMat;
|
|
35
|
-
constructor(components: Components, world: World);
|
|
36
|
-
/** {@link Disposable.dispose} */
|
|
37
|
-
dispose(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Adds a mesh to the culler. When the mesh is not visibile anymore, it will be removed from the scene. When it's visible again, it will be added to the scene.
|
|
40
|
-
* @param mesh - The mesh to add. It can be a regular THREE.Mesh or an instance of THREE.InstancedMesh.
|
|
41
|
-
*/
|
|
42
|
-
add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
43
|
-
/**
|
|
44
|
-
* Removes a mesh from the culler, so its visibility is not controlled by the culler anymore.
|
|
45
|
-
* When the mesh is removed, it will be hidden from the scene and its color-coded mesh will be destroyed.
|
|
46
|
-
* @param mesh - The mesh to remove. It can be a regular THREE.Mesh or an instance of THREE.InstancedMesh.
|
|
47
|
-
*/
|
|
48
|
-
remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
49
|
-
/**
|
|
50
|
-
* Updates the given instanced meshes inside the culler. You should use this if you change the count property, e.g. when changing the visibility of fragments.
|
|
51
|
-
*
|
|
52
|
-
* @param meshes - The meshes to update.
|
|
53
|
-
*
|
|
54
|
-
* @returns {void}
|
|
55
|
-
*/
|
|
56
|
-
updateInstanced(meshes: Iterable<THREE.InstancedMesh>): void;
|
|
57
|
-
private handleWorkerMessage;
|
|
58
|
-
private getAvailableMaterial;
|
|
59
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { Components } from "../Components";
|
|
3
|
-
import { Component } from "../Types";
|
|
4
|
-
/**
|
|
5
|
-
* A tool to safely remove meshes, geometries, materials and other items from memory to [prevent memory leaks](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
|
|
6
|
-
*/
|
|
7
|
-
export declare class Disposer extends Component {
|
|
8
|
-
private _disposedComponents;
|
|
9
|
-
/** {@link Component.enabled} */
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* A unique identifier for the component.
|
|
13
|
-
* This UUID is used to register the component within the Components system.
|
|
14
|
-
*/
|
|
15
|
-
static readonly uuid: "76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe";
|
|
16
|
-
constructor(components: Components);
|
|
17
|
-
/**
|
|
18
|
-
* Return the UUIDs of all disposed components.
|
|
19
|
-
*/
|
|
20
|
-
get(): Set<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Removes a mesh, its geometry and its materials from memory. If you are
|
|
23
|
-
* using any of these in other parts of the application, make sure that you
|
|
24
|
-
* remove them from the mesh before disposing it.
|
|
25
|
-
*
|
|
26
|
-
* @param object - the [object](https://threejs.org/docs/#api/en/core/Object3D)
|
|
27
|
-
* to remove.
|
|
28
|
-
*
|
|
29
|
-
* @param materials - whether to dispose the materials of the mesh.
|
|
30
|
-
*
|
|
31
|
-
* @param recursive - whether to recursively dispose the children of the mesh.
|
|
32
|
-
*/
|
|
33
|
-
destroy(object: THREE.Object3D, materials?: boolean, recursive?: boolean): void;
|
|
34
|
-
/**
|
|
35
|
-
* Disposes a geometry from memory.
|
|
36
|
-
*
|
|
37
|
-
* @param geometry - the
|
|
38
|
-
* [geometry](https://threejs.org/docs/#api/en/core/BufferGeometry)
|
|
39
|
-
* to remove.
|
|
40
|
-
*/
|
|
41
|
-
disposeGeometry(geometry: THREE.BufferGeometry): void;
|
|
42
|
-
private disposeGeometryAndMaterials;
|
|
43
|
-
private disposeChildren;
|
|
44
|
-
private static disposeMaterial;
|
|
45
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Component, Disposable, World, Event } from "../Types";
|
|
2
|
-
import { SimpleGrid } from "./src";
|
|
3
|
-
import { Components } from "../Components";
|
|
4
|
-
export * from "./src";
|
|
5
|
-
/**
|
|
6
|
-
* A component that manages grid instances. Each grid is associated with a unique world. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Grids). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Grids).
|
|
7
|
-
*/
|
|
8
|
-
export declare class Grids extends Component implements Disposable {
|
|
9
|
-
/**
|
|
10
|
-
* A unique identifier for the component.
|
|
11
|
-
* This UUID is used to register the component within the Components system.
|
|
12
|
-
*/
|
|
13
|
-
static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
|
|
14
|
-
/**
|
|
15
|
-
* A map of world UUIDs to their corresponding grid instances.
|
|
16
|
-
*/
|
|
17
|
-
list: Map<string, SimpleGrid>;
|
|
18
|
-
/** {@link Disposable.onDisposed} */
|
|
19
|
-
readonly onDisposed: Event<unknown>;
|
|
20
|
-
/** {@link Component.enabled} */
|
|
21
|
-
enabled: boolean;
|
|
22
|
-
constructor(components: Components);
|
|
23
|
-
/**
|
|
24
|
-
* Creates a new grid for the given world.
|
|
25
|
-
* Throws an error if a grid already exists for the world.
|
|
26
|
-
*
|
|
27
|
-
* @param world - The world to create the grid for.
|
|
28
|
-
* @returns The newly created grid.
|
|
29
|
-
*
|
|
30
|
-
* @throws Will throw an error if a grid already exists for the given world.
|
|
31
|
-
*/
|
|
32
|
-
create(world: World): SimpleGrid;
|
|
33
|
-
/**
|
|
34
|
-
* Deletes the grid associated with the given world.
|
|
35
|
-
* If a grid does not exist for the given world, this method does nothing.
|
|
36
|
-
*
|
|
37
|
-
* @param world - The world for which to delete the grid.
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* This method will dispose of the grid and remove it from the internal list.
|
|
41
|
-
* If the world is disposed before calling this method, the grid will be automatically deleted.
|
|
42
|
-
*/
|
|
43
|
-
delete(world: World): void;
|
|
44
|
-
/** {@link Disposable.dispose} */
|
|
45
|
-
dispose(): void;
|
|
46
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { BooleanSettingsControl, ColorSettingsControl, NumberSettingControl } from "../../Types";
|
|
3
|
-
import { Configurator } from "../../ConfigManager";
|
|
4
|
-
import { SimpleGrid } from "./simple-grid";
|
|
5
|
-
type SimpleGridConfigType = {
|
|
6
|
-
visible: BooleanSettingsControl;
|
|
7
|
-
color: ColorSettingsControl;
|
|
8
|
-
primarySize: NumberSettingControl;
|
|
9
|
-
secondarySize: NumberSettingControl;
|
|
10
|
-
distance: NumberSettingControl;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Configuration interface for the {@link SimpleGrid}.
|
|
14
|
-
*/
|
|
15
|
-
export interface SimpleGridConfig {
|
|
16
|
-
/**
|
|
17
|
-
* Whether the grid is visible or not.
|
|
18
|
-
*/
|
|
19
|
-
visible: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The color of the grid lines.
|
|
22
|
-
*/
|
|
23
|
-
color: THREE.Color;
|
|
24
|
-
/**
|
|
25
|
-
* The size of the primary grid lines.
|
|
26
|
-
*/
|
|
27
|
-
primarySize: number;
|
|
28
|
-
/**
|
|
29
|
-
* The size of the secondary grid lines.
|
|
30
|
-
*/
|
|
31
|
-
secondarySize: number;
|
|
32
|
-
/**
|
|
33
|
-
* The distance at which the grid lines start to fade away.
|
|
34
|
-
*/
|
|
35
|
-
distance: number;
|
|
36
|
-
}
|
|
37
|
-
export declare class SimpleGridConfigManager extends Configurator<SimpleGrid, SimpleGridConfigType> {
|
|
38
|
-
protected _config: SimpleGridConfigType;
|
|
39
|
-
/**
|
|
40
|
-
* Whether the grid is visible or not.
|
|
41
|
-
*/
|
|
42
|
-
get visible(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the grid is visible or not.
|
|
45
|
-
*/
|
|
46
|
-
set visible(value: boolean);
|
|
47
|
-
/**
|
|
48
|
-
* The color of the grid lines.
|
|
49
|
-
*/
|
|
50
|
-
get color(): THREE.Color;
|
|
51
|
-
/**
|
|
52
|
-
* The color of the grid lines.
|
|
53
|
-
*/
|
|
54
|
-
set color(value: THREE.Color);
|
|
55
|
-
/**
|
|
56
|
-
* The size of the primary grid lines.
|
|
57
|
-
*/
|
|
58
|
-
get primarySize(): number;
|
|
59
|
-
/**
|
|
60
|
-
* The size of the primary grid lines.
|
|
61
|
-
*/
|
|
62
|
-
set primarySize(value: number);
|
|
63
|
-
/**
|
|
64
|
-
* The size of the secondary grid lines.
|
|
65
|
-
*/
|
|
66
|
-
get secondarySize(): number;
|
|
67
|
-
/**
|
|
68
|
-
* The size of the secondary grid lines.
|
|
69
|
-
*/
|
|
70
|
-
set secondarySize(value: number);
|
|
71
|
-
/**
|
|
72
|
-
* The distance at which the grid lines start to fade away.
|
|
73
|
-
*/
|
|
74
|
-
get distance(): number;
|
|
75
|
-
/**
|
|
76
|
-
* The distance at which the grid lines start to fade away.
|
|
77
|
-
*/
|
|
78
|
-
set distance(value: number);
|
|
79
|
-
}
|
|
80
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { Hideable, Event, World, Disposable, Configurable } from "../../Types";
|
|
3
|
-
import { Components } from "../../Components";
|
|
4
|
-
import { SimpleGridConfig, SimpleGridConfigManager } from "./simple-grid-config";
|
|
5
|
-
/**
|
|
6
|
-
* An infinite grid. Created by [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper) and translated to typescript by [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
|
|
7
|
-
*/
|
|
8
|
-
export declare class SimpleGrid implements Hideable, Disposable, Configurable<SimpleGridConfigManager, SimpleGridConfig> {
|
|
9
|
-
/** {@link Disposable.onDisposed} */
|
|
10
|
-
readonly onDisposed: Event<unknown>;
|
|
11
|
-
/** {@link Configurable.onSetup} */
|
|
12
|
-
readonly onSetup: Event<unknown>;
|
|
13
|
-
/** {@link Configurable.isSetup} */
|
|
14
|
-
isSetup: boolean;
|
|
15
|
-
/** The world instance to which this Raycaster belongs. */
|
|
16
|
-
world: World;
|
|
17
|
-
/** The components instance to which this grid belongs. */
|
|
18
|
-
components: Components;
|
|
19
|
-
/** {@link Configurable.config} */
|
|
20
|
-
config: SimpleGridConfigManager;
|
|
21
|
-
protected _defaultConfig: SimpleGridConfig;
|
|
22
|
-
/** {@link Hideable.visible} */
|
|
23
|
-
get visible(): boolean;
|
|
24
|
-
/** {@link Hideable.visible} */
|
|
25
|
-
set visible(visible: boolean);
|
|
26
|
-
/** The material of the grid. */
|
|
27
|
-
get material(): THREE.ShaderMaterial;
|
|
28
|
-
/**
|
|
29
|
-
* Whether the grid should fade away with distance. Recommended to be true for
|
|
30
|
-
* perspective cameras and false for orthographic cameras.
|
|
31
|
-
*/
|
|
32
|
-
get fade(): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Whether the grid should fade away with distance. Recommended to be true for
|
|
35
|
-
* perspective cameras and false for orthographic cameras.
|
|
36
|
-
*/
|
|
37
|
-
set fade(active: boolean);
|
|
38
|
-
/** The Three.js mesh that contains the infinite grid. */
|
|
39
|
-
readonly three: THREE.Mesh;
|
|
40
|
-
private _fade;
|
|
41
|
-
constructor(components: Components, world: World);
|
|
42
|
-
/** {@link Configurable.setup} */
|
|
43
|
-
setup(config?: Partial<SimpleGridConfig>): void;
|
|
44
|
-
/** {@link Disposable.dispose} */
|
|
45
|
-
dispose(): void;
|
|
46
|
-
private setupEvents;
|
|
47
|
-
private updateZoom;
|
|
48
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { MiniMap } from "./src";
|
|
2
|
-
import { Component, Updateable, World, Event, Disposable } from "../Types";
|
|
3
|
-
import { Components } from "../Components";
|
|
4
|
-
export * from "./src";
|
|
5
|
-
/**
|
|
6
|
-
* A component that manages multiple {@link MiniMap} instances, each associated with a unique world ID. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/MiniMap). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/MiniMaps).
|
|
7
|
-
*/
|
|
8
|
-
export declare class MiniMaps extends Component implements Updateable, Disposable {
|
|
9
|
-
/**
|
|
10
|
-
* A unique identifier for the component.
|
|
11
|
-
* This UUID is used to register the component within the Components system.
|
|
12
|
-
*/
|
|
13
|
-
static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
|
|
14
|
-
/** {@link Updateable.onAfterUpdate} */
|
|
15
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
16
|
-
/** {@link Updateable.onBeforeUpdate} */
|
|
17
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
18
|
-
/** {@link Disposable.onDisposed} */
|
|
19
|
-
readonly onDisposed: Event<unknown>;
|
|
20
|
-
/** {@link Configurable.onSetup} */
|
|
21
|
-
readonly onSetup: Event<unknown>;
|
|
22
|
-
/** {@link Component.enabled} */
|
|
23
|
-
enabled: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* A collection of {@link MiniMap} instances, each associated with a unique world ID.
|
|
26
|
-
*/
|
|
27
|
-
list: Map<string, MiniMap>;
|
|
28
|
-
constructor(components: Components);
|
|
29
|
-
/**
|
|
30
|
-
* Creates a new {@link MiniMap} instance associated with the given world.
|
|
31
|
-
* If a {@link MiniMap} instance already exists for the given world, an error will be thrown.
|
|
32
|
-
*
|
|
33
|
-
* @param world - The {@link World} for which to create a {@link MiniMap} instance.
|
|
34
|
-
* @returns The newly created {@link MiniMap} instance.
|
|
35
|
-
* @throws Will throw an error if a {@link MiniMap} instance already exists for the given world.
|
|
36
|
-
*/
|
|
37
|
-
create(world: World): MiniMap;
|
|
38
|
-
/**
|
|
39
|
-
* Deletes a {@link MiniMap} instance associated with the given world ID.
|
|
40
|
-
* If a {@link MiniMap} instance does not exist for the given ID, nothing happens.
|
|
41
|
-
*
|
|
42
|
-
* @param id - The unique identifier of the world for which to delete the {@link MiniMap} instance.
|
|
43
|
-
* @returns {void}
|
|
44
|
-
*/
|
|
45
|
-
delete(id: string): void;
|
|
46
|
-
/** {@link Disposable.dispose} */
|
|
47
|
-
dispose(): void;
|
|
48
|
-
/** {@link Updateable.update} */
|
|
49
|
-
update(): void;
|
|
50
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { BooleanSettingsControl, ColorSettingsControl, NumberSettingControl } from "../../Types";
|
|
3
|
-
import { Configurator } from "../../ConfigManager";
|
|
4
|
-
import { MiniMap } from "./index";
|
|
5
|
-
type MiniMapConfigType = {
|
|
6
|
-
visible: BooleanSettingsControl;
|
|
7
|
-
lockRotation: BooleanSettingsControl;
|
|
8
|
-
zoom: NumberSettingControl;
|
|
9
|
-
frontOffset: NumberSettingControl;
|
|
10
|
-
sizeX: NumberSettingControl;
|
|
11
|
-
sizeY: NumberSettingControl;
|
|
12
|
-
backgroundColor: ColorSettingsControl;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Configuration interface for the {@link MiniMap}.
|
|
16
|
-
*/
|
|
17
|
-
export interface MiniMapConfig {
|
|
18
|
-
/**
|
|
19
|
-
* Whether the minimap is visible or not.
|
|
20
|
-
*/
|
|
21
|
-
visible: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether to lock the rotation of the top camera in the minimap.
|
|
24
|
-
*/
|
|
25
|
-
lockRotation: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The zoom of the camera in the minimap.
|
|
28
|
-
*/
|
|
29
|
-
zoom: number;
|
|
30
|
-
/**
|
|
31
|
-
* The front offset of the minimap.
|
|
32
|
-
* It determines how much the minimap's view is offset from the camera's view.
|
|
33
|
-
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
34
|
-
*/
|
|
35
|
-
frontOffset: number;
|
|
36
|
-
/**
|
|
37
|
-
* The horizontal dimension of the minimap.
|
|
38
|
-
*/
|
|
39
|
-
sizeX: number;
|
|
40
|
-
/**
|
|
41
|
-
* The vertical dimension of the minimap.
|
|
42
|
-
*/
|
|
43
|
-
sizeY: number;
|
|
44
|
-
/**
|
|
45
|
-
* The color of the background of the minimap.
|
|
46
|
-
*/
|
|
47
|
-
backgroundColor: THREE.Color;
|
|
48
|
-
}
|
|
49
|
-
export declare class MiniMapConfigManager extends Configurator<MiniMap, MiniMapConfigType> {
|
|
50
|
-
protected _config: MiniMapConfigType;
|
|
51
|
-
/**
|
|
52
|
-
* Whether the minimap is visible or not.
|
|
53
|
-
*/
|
|
54
|
-
get visible(): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Whether the minimap is visible or not.
|
|
57
|
-
*/
|
|
58
|
-
set visible(value: boolean);
|
|
59
|
-
/**
|
|
60
|
-
* Whether to lock the rotation of the top camera in the minimap.
|
|
61
|
-
*/
|
|
62
|
-
get lockRotation(): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Whether to lock the rotation of the top camera in the minimap.
|
|
65
|
-
*/
|
|
66
|
-
set lockRotation(value: boolean);
|
|
67
|
-
/**
|
|
68
|
-
* The zoom of the camera in the minimap.
|
|
69
|
-
*/
|
|
70
|
-
get zoom(): number;
|
|
71
|
-
/**
|
|
72
|
-
* The zoom of the camera in the minimap.
|
|
73
|
-
*/
|
|
74
|
-
set zoom(value: number);
|
|
75
|
-
/**
|
|
76
|
-
* The front offset of the minimap.
|
|
77
|
-
* It determines how much the minimap's view is offset from the camera's view.
|
|
78
|
-
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
79
|
-
*/
|
|
80
|
-
get frontOffset(): number;
|
|
81
|
-
/**
|
|
82
|
-
* The front offset of the minimap.
|
|
83
|
-
* It determines how much the minimap's view is offset from the camera's view.
|
|
84
|
-
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
85
|
-
*/
|
|
86
|
-
set frontOffset(value: number);
|
|
87
|
-
/**
|
|
88
|
-
* The horizontal dimension of the minimap.
|
|
89
|
-
*/
|
|
90
|
-
get sizeX(): number;
|
|
91
|
-
/**
|
|
92
|
-
* The horizontal dimension of the minimap.
|
|
93
|
-
*/
|
|
94
|
-
set sizeX(value: number);
|
|
95
|
-
/**
|
|
96
|
-
* The vertical dimension of the minimap.
|
|
97
|
-
*/
|
|
98
|
-
get sizeY(): number;
|
|
99
|
-
/**
|
|
100
|
-
* The vertical dimension of the minimap.
|
|
101
|
-
*/
|
|
102
|
-
set sizeY(value: number);
|
|
103
|
-
/**
|
|
104
|
-
* The color of the background of the minimap.
|
|
105
|
-
*/
|
|
106
|
-
get backgroundColor(): THREE.Color;
|
|
107
|
-
/**
|
|
108
|
-
* The color of the background of the minimap.
|
|
109
|
-
*/
|
|
110
|
-
set backgroundColor(value: THREE.Color);
|
|
111
|
-
}
|
|
112
|
-
export {};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { Resizeable, Updateable, World, Event, Disposable, Configurable } from "../../Types";
|
|
3
|
-
import { MiniMapConfig, MiniMapConfigManager } from "./mini-map-config";
|
|
4
|
-
import { Components } from "../../Components";
|
|
5
|
-
/**
|
|
6
|
-
* A class representing a 2D minimap of a 3D world.
|
|
7
|
-
*/
|
|
8
|
-
export declare class MiniMap implements Resizeable, Updateable, Disposable, Configurable<MiniMapConfigManager, MiniMapConfig> {
|
|
9
|
-
/** {@link Disposable.onDisposed} */
|
|
10
|
-
readonly onDisposed: Event<unknown>;
|
|
11
|
-
/** {@link Updateable.onAfterUpdate} */
|
|
12
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
13
|
-
/** {@link Updateable.onBeforeUpdate} */
|
|
14
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
15
|
-
/** {@link Resizeable.onResize} */
|
|
16
|
-
readonly onResize: Event<THREE.Vector2>;
|
|
17
|
-
/** {@link Configurable.onSetup} */
|
|
18
|
-
readonly onSetup: Event<unknown>;
|
|
19
|
-
/**
|
|
20
|
-
* The front offset of the minimap.
|
|
21
|
-
* It determines how much the minimap's view is offset from the camera's view.
|
|
22
|
-
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
23
|
-
*/
|
|
24
|
-
frontOffset: number;
|
|
25
|
-
/**
|
|
26
|
-
* The override material for the minimap.
|
|
27
|
-
* It is used to render the depth information of the world onto the minimap.
|
|
28
|
-
*/
|
|
29
|
-
overrideMaterial: THREE.MeshDepthMaterial;
|
|
30
|
-
/**
|
|
31
|
-
* The background color of the minimap.
|
|
32
|
-
* It is used to set the background color of the minimap's renderer.
|
|
33
|
-
*/
|
|
34
|
-
backgroundColor: THREE.Color;
|
|
35
|
-
/**
|
|
36
|
-
* The WebGL renderer for the minimap.
|
|
37
|
-
* It is used to render the minimap onto the screen.
|
|
38
|
-
*/
|
|
39
|
-
renderer: THREE.WebGLRenderer;
|
|
40
|
-
/**
|
|
41
|
-
* A flag indicating whether the minimap is enabled.
|
|
42
|
-
* If disabled, the minimap will not update or render.
|
|
43
|
-
*/
|
|
44
|
-
enabled: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* The world in which the minimap is displayed.
|
|
47
|
-
* It provides access to the 3D scene, camera, and other relevant world elements.
|
|
48
|
-
*/
|
|
49
|
-
world: World;
|
|
50
|
-
/** {@link Configurable.config} */
|
|
51
|
-
config: MiniMapConfigManager;
|
|
52
|
-
/** {@link Configurable.isSetup} */
|
|
53
|
-
isSetup: boolean;
|
|
54
|
-
protected _defaultConfig: MiniMapConfig;
|
|
55
|
-
private _lockRotation;
|
|
56
|
-
private _size;
|
|
57
|
-
private _camera;
|
|
58
|
-
private _plane;
|
|
59
|
-
private _tempVector1;
|
|
60
|
-
private _tempVector2;
|
|
61
|
-
private _tempTarget;
|
|
62
|
-
private readonly down;
|
|
63
|
-
/**
|
|
64
|
-
* Gets or sets whether the minimap rotation is locked.
|
|
65
|
-
* When rotation is locked, the minimap will always face the same direction as the camera.
|
|
66
|
-
*/
|
|
67
|
-
get lockRotation(): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Sets whether the minimap rotation is locked.
|
|
70
|
-
* When rotation is locked, the minimap will always face the same direction as the camera.
|
|
71
|
-
* @param active - If `true`, rotation is locked. If `false`, rotation is not locked.
|
|
72
|
-
*/
|
|
73
|
-
set lockRotation(active: boolean);
|
|
74
|
-
/**
|
|
75
|
-
* Gets the current zoom level of the minimap.
|
|
76
|
-
* The zoom level determines how much of the world is visible on the minimap.
|
|
77
|
-
* @returns The current zoom level of the minimap.
|
|
78
|
-
*/
|
|
79
|
-
get zoom(): number;
|
|
80
|
-
/**
|
|
81
|
-
* Sets the zoom level of the minimap.
|
|
82
|
-
* The zoom level determines how much of the world is visible on the minimap.
|
|
83
|
-
* @param value - The new zoom level of the minimap.
|
|
84
|
-
*/
|
|
85
|
-
set zoom(value: number);
|
|
86
|
-
constructor(world: World, components: Components);
|
|
87
|
-
/** {@link Disposable.dispose} */
|
|
88
|
-
dispose(): void;
|
|
89
|
-
/** Returns the camera used by the MiniMap */
|
|
90
|
-
get(): THREE.OrthographicCamera;
|
|
91
|
-
/** {@link Updateable.update} */
|
|
92
|
-
update(): void;
|
|
93
|
-
/** {@link Resizeable.getSize} */
|
|
94
|
-
getSize(): THREE.Vector2;
|
|
95
|
-
/** {@link Resizeable.resize} */
|
|
96
|
-
resize(size?: THREE.Vector2): void;
|
|
97
|
-
/** {@link Configurable.setup} */
|
|
98
|
-
setup(config?: Partial<MiniMapConfig>): void;
|
|
99
|
-
private updatePlanes;
|
|
100
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { Components } from "../Components";
|
|
3
|
-
import { SimpleCamera } from "..";
|
|
4
|
-
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
5
|
-
export * from "./src";
|
|
6
|
-
/**
|
|
7
|
-
* A flexible camera that uses [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to control the camera in 2D and 3D. It supports multiple navigation modes, such as 2D floor plan navigation, first person and 3D orbit. This class extends the SimpleCamera class and adds additional functionality for managing different camera projections and navigation modes. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/OrthoPerspectiveCamera). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/OrthoPerspectiveCamera).
|
|
8
|
-
*/
|
|
9
|
-
export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
10
|
-
/**
|
|
11
|
-
* A ProjectionManager instance that manages the projection modes of the camera.
|
|
12
|
-
*/
|
|
13
|
-
readonly projection: ProjectionManager;
|
|
14
|
-
/**
|
|
15
|
-
* A THREE.OrthographicCamera instance that represents the orthographic camera.
|
|
16
|
-
* This camera is used when the projection mode is set to orthographic.
|
|
17
|
-
*/
|
|
18
|
-
readonly threeOrtho: THREE.OrthographicCamera;
|
|
19
|
-
/**
|
|
20
|
-
* A THREE.PerspectiveCamera instance that represents the perspective camera.
|
|
21
|
-
* This camera is used when the projection mode is set to perspective.
|
|
22
|
-
*/
|
|
23
|
-
readonly threePersp: THREE.PerspectiveCamera;
|
|
24
|
-
protected readonly _userInputButtons: any;
|
|
25
|
-
protected readonly _frustumSize = 50;
|
|
26
|
-
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
27
|
-
protected _mode: NavigationMode | null;
|
|
28
|
-
private previousSize;
|
|
29
|
-
/**
|
|
30
|
-
* Getter for the current navigation mode.
|
|
31
|
-
* Throws an error if the mode is not found or the camera is not initialized.
|
|
32
|
-
*
|
|
33
|
-
* @returns {NavigationMode} The current navigation mode.
|
|
34
|
-
*
|
|
35
|
-
* @throws {Error} Throws an error if the mode is not found or the camera is not initialized.
|
|
36
|
-
*/
|
|
37
|
-
get mode(): NavigationMode;
|
|
38
|
-
constructor(components: Components);
|
|
39
|
-
/** {@link Disposable.dispose} */
|
|
40
|
-
dispose(): void;
|
|
41
|
-
/**
|
|
42
|
-
* Sets a new {@link NavigationMode} and disables the previous one.
|
|
43
|
-
*
|
|
44
|
-
* @param mode - The {@link NavigationMode} to set.
|
|
45
|
-
*/
|
|
46
|
-
set(mode: NavModeID): void;
|
|
47
|
-
/**
|
|
48
|
-
* Make the camera view fit all the specified meshes.
|
|
49
|
-
*
|
|
50
|
-
* @param meshes the meshes to fit. If it is not defined, it will
|
|
51
|
-
* evaluate {@link Components.meshes}.
|
|
52
|
-
* @param offset the distance to the fit object
|
|
53
|
-
*/
|
|
54
|
-
fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Allows or prevents all user input.
|
|
57
|
-
*
|
|
58
|
-
* @param active - whether to enable or disable user inputs.
|
|
59
|
-
*/
|
|
60
|
-
setUserInput(active: boolean): void;
|
|
61
|
-
private disableUserInput;
|
|
62
|
-
private enableUserInput;
|
|
63
|
-
private newOrthoCamera;
|
|
64
|
-
private setOrthoPerspCameraAspect;
|
|
65
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NavigationMode } from "./types";
|
|
2
|
-
import { OrthoPerspectiveCamera } from "../index";
|
|
3
|
-
/**
|
|
4
|
-
* A {@link NavigationMode} that allows first person navigation, simulating FPS video games.
|
|
5
|
-
*/
|
|
6
|
-
export declare class FirstPersonMode implements NavigationMode {
|
|
7
|
-
private camera;
|
|
8
|
-
/** {@link NavigationMode.enabled} */
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
/** {@link NavigationMode.id} */
|
|
11
|
-
readonly id = "FirstPerson";
|
|
12
|
-
constructor(camera: OrthoPerspectiveCamera);
|
|
13
|
-
/** {@link NavigationMode.set} */
|
|
14
|
-
set(active: boolean): void;
|
|
15
|
-
private setupFirstPersonCamera;
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NavigationMode } from "./types";
|
|
2
|
-
import { OrthoPerspectiveCamera } from "../index";
|
|
3
|
-
/**
|
|
4
|
-
* A {@link NavigationMode} that allows 3D navigation and panning like in many 3D and CAD softwares.
|
|
5
|
-
*/
|
|
6
|
-
export declare class OrbitMode implements NavigationMode {
|
|
7
|
-
camera: OrthoPerspectiveCamera;
|
|
8
|
-
/** {@link NavigationMode.enabled} */
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
/** {@link NavigationMode.id} */
|
|
11
|
-
readonly id = "Orbit";
|
|
12
|
-
constructor(camera: OrthoPerspectiveCamera);
|
|
13
|
-
/** {@link NavigationMode.set} */
|
|
14
|
-
set(active: boolean): void;
|
|
15
|
-
private activateOrbitControls;
|
|
16
|
-
}
|