@cognite/reveal 4.0.0-dev.20221122 → 4.0.0-dev.20221124

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 (89) hide show
  1. package/dist/index.js +59 -63
  2. package/dist/index.js.map +1 -1
  3. package/dist/packages/api/index.d.ts +1 -0
  4. package/dist/packages/api/src/public/RevealManager.d.ts +1 -1
  5. package/dist/packages/api/src/public/constants.d.ts +11 -0
  6. package/dist/packages/api/src/public/migration/renderOptionsHelpers.d.ts +2 -2
  7. package/dist/packages/api/src/public/migration/types.d.ts +5 -5
  8. package/dist/packages/api/src/public/types.d.ts +3 -3
  9. package/dist/packages/api/src/utilities/Spinner.d.ts +1 -1
  10. package/dist/packages/api/src/utilities/ViewStateHelper.d.ts +3 -3
  11. package/dist/packages/api/src/utilities/reflection.d.ts +1 -1
  12. package/dist/packages/cad-geometry-loaders/src/CadLoadingHints.d.ts +1 -1
  13. package/dist/packages/cad-geometry-loaders/src/CadModelBudget.d.ts +1 -1
  14. package/dist/packages/cad-geometry-loaders/src/InternalRevealCadOptions.d.ts +1 -1
  15. package/dist/packages/cad-geometry-loaders/src/sector/SectorDownloadScheduler.d.ts +1 -1
  16. package/dist/packages/cad-geometry-loaders/src/sector/culling/ByScreenSizeSectorCuller.d.ts +1 -1
  17. package/dist/packages/cad-geometry-loaders/src/sector/culling/types.d.ts +5 -5
  18. package/dist/packages/cad-geometry-loaders/src/utilities/PromiseUtils.d.ts +1 -1
  19. package/dist/packages/cad-model/src/picking/PickingHandler.d.ts +1 -1
  20. package/dist/packages/cad-model/src/types.d.ts +3 -3
  21. package/dist/packages/cad-model/src/wrappers/CadNode.d.ts +9 -6
  22. package/dist/packages/cad-model/src/wrappers/CogniteCadModel.d.ts +8 -40
  23. package/dist/packages/cad-parsers/src/cad/types.d.ts +3 -3
  24. package/dist/packages/cad-parsers/src/metadata/parsers/types.d.ts +8 -8
  25. package/dist/packages/cad-parsers/src/metadata/types.d.ts +5 -5
  26. package/dist/packages/cad-parsers/src/utilities/computeBoundingBoxFromAttributes.d.ts +1 -1
  27. package/dist/packages/cad-styling/src/CdfModelNodeCollectionDataProvider.d.ts +6 -4
  28. package/dist/packages/cad-styling/src/CdfNodeCollectionBase.d.ts +1 -1
  29. package/dist/packages/cad-styling/src/NodeAppearance.d.ts +2 -2
  30. package/dist/packages/cad-styling/src/NodeAppearanceProvider.d.ts +1 -1
  31. package/dist/packages/cad-styling/src/NodeCollectionDeserializer.d.ts +1 -1
  32. package/dist/packages/cad-styling/src/PropertyFilterNodeCollection.d.ts +1 -1
  33. package/dist/packages/cad-styling/src/SerializedNodeCollection.d.ts +1 -1
  34. package/dist/packages/cad-styling/src/prioritized/types.d.ts +1 -1
  35. package/dist/packages/camera-manager/src/types.d.ts +5 -5
  36. package/dist/packages/data-providers/index.d.ts +1 -0
  37. package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/StylableObject.d.ts +2 -2
  38. package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/types.d.ts +3 -3
  39. package/dist/packages/data-providers/src/types.d.ts +2 -2
  40. package/dist/packages/data-providers/src/utilities/applyDefaultModelTransformation.d.ts +1 -0
  41. package/dist/packages/metrics/src/types.d.ts +2 -2
  42. package/dist/packages/model-base/src/SupportedModelTypes.d.ts +1 -1
  43. package/dist/packages/model-base/src/types.d.ts +1 -1
  44. package/dist/packages/nodes-api/src/types.d.ts +2 -2
  45. package/dist/packages/pointcloud-styling/src/PointCloudAppearance.d.ts +2 -2
  46. package/dist/packages/pointclouds/src/CognitePointCloudModel.d.ts +10 -2
  47. package/dist/packages/pointclouds/src/PointCloudBudget.d.ts +1 -1
  48. package/dist/packages/pointclouds/src/PointCloudIntersection.d.ts +1 -1
  49. package/dist/packages/pointclouds/src/PointCloudNode.d.ts +7 -4
  50. package/dist/packages/pointclouds/src/potree-three-loader/loading/ClassificationInfo.d.ts +3 -3
  51. package/dist/packages/pointclouds/src/potree-three-loader/loading/EptJson.d.ts +3 -3
  52. package/dist/packages/pointclouds/src/potree-three-loader/tree/PointAttributes.d.ts +1 -1
  53. package/dist/packages/pointclouds/src/potree-three-loader/utils/lru.d.ts +1 -1
  54. package/dist/packages/pointclouds/src/potree-three-loader/workers/types.d.ts +3 -3
  55. package/dist/packages/pointclouds/wasm/index.d.ts +3 -3
  56. package/dist/packages/rendering/src/CadMaterialManager.d.ts +1 -0
  57. package/dist/packages/rendering/src/pipeline-executors/BasicPipelineExecutor.d.ts +1 -1
  58. package/dist/packages/rendering/src/pointcloud-rendering/PointCloudObjectIdMaps.d.ts +1 -1
  59. package/dist/packages/rendering/src/pointcloud-rendering/types.d.ts +2 -2
  60. package/dist/packages/rendering/src/render-passes/types.d.ts +8 -8
  61. package/dist/packages/rendering/src/render-pipeline-providers/types.d.ts +4 -4
  62. package/dist/packages/rendering/src/rendering/NodeAppearanceTextureBuilder.d.ts +2 -0
  63. package/dist/packages/rendering/src/rendering/types.d.ts +5 -5
  64. package/dist/packages/rendering/src/transform/NodeTransformProvider.d.ts +1 -1
  65. package/dist/packages/sector-loader/src/SectorRepository.d.ts +1 -1
  66. package/dist/packages/sector-parser/src/DracoDecoderHelper.d.ts +2 -2
  67. package/dist/packages/sector-parser/src/types.d.ts +12 -12
  68. package/dist/packages/tools/index.d.ts +0 -1
  69. package/dist/packages/tools/src/AxisView/types.d.ts +5 -5
  70. package/dist/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +5 -5
  71. package/dist/packages/tools/src/Measurement/MeasurementManager.d.ts +1 -1
  72. package/dist/packages/tools/src/Measurement/types.d.ts +5 -5
  73. package/dist/packages/tools/src/Timeline/types.d.ts +1 -1
  74. package/dist/packages/tools/src/types.d.ts +1 -1
  75. package/dist/packages/utilities/src/CameraConfiguration.d.ts +1 -1
  76. package/dist/packages/utilities/src/WebGLRendererStateHelper.d.ts +1 -1
  77. package/dist/packages/utilities/src/device.d.ts +1 -1
  78. package/dist/packages/utilities/src/events/InputHandler.d.ts +1 -1
  79. package/dist/packages/utilities/src/events/types.d.ts +5 -5
  80. package/dist/packages/utilities/src/indexset/IndexSet.d.ts +1 -1
  81. package/dist/packages/utilities/src/linalg.d.ts +3 -3
  82. package/dist/packages/utilities/src/shapes/SerializableBox.d.ts +1 -1
  83. package/dist/packages/utilities/src/shapes/SerializableCompositeShape.d.ts +1 -1
  84. package/dist/packages/utilities/src/shapes/SerializableCylinder.d.ts +1 -1
  85. package/dist/packages/utilities/src/types.d.ts +2 -2
  86. package/dist/packages/utilities/src/workers/workerize-transferable/on-main.d.ts +1 -1
  87. package/dist/packages/utilities/src/workers/workerize-transferable/on-worker.d.ts +1 -1
  88. package/package.json +7 -7
  89. package/dist/packages/tools/src/ExplodedViewTool.d.ts +0 -12
@@ -17,5 +17,6 @@ export { PointCloudStylableObjectProvider } from './src/PointCloudStylableObject
17
17
  export { StylableObject, SerializableStylableObject } from './src/pointcloud-stylable-object-providers/StylableObject';
18
18
  export { CdfPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/CdfPointCloudStylableObjectProvider';
19
19
  export { DummyPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/DummyPointCloudStylableObjectProvider';
20
+ export { cadFromCdfToThreeMatrix } from './src/utilities/applyDefaultModelTransformation';
20
21
  export { Image360Provider } from './src/Image360Provider';
21
22
  export { BinaryFileProvider, JsonFileProvider, File3dFormat, BlobOutputMetadata, Image360Descriptor, Image360FileProvider, Image360Face } from './src/types';
@@ -2,11 +2,11 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { ISerializableShape, IShape } from '../../../utilities';
5
- export declare type StylableObject = {
5
+ export type StylableObject = {
6
6
  objectId: number;
7
7
  shape: IShape;
8
8
  };
9
- export declare type SerializableStylableObject = {
9
+ export type SerializableStylableObject = {
10
10
  objectId: number;
11
11
  shape: ISerializableShape;
12
12
  };
@@ -4,16 +4,16 @@
4
4
  import { StylableObject } from './StylableObject';
5
5
  import { IShape } from '../../../utilities';
6
6
  import { Box3 } from 'three';
7
- export declare type CdfPointCloudObjectAnnotation = {
7
+ export type CdfPointCloudObjectAnnotation = {
8
8
  annotationId: number;
9
9
  assetId?: number;
10
10
  region: IShape[];
11
11
  };
12
- export declare type PointCloudObjectMetadata = {
12
+ export type PointCloudObjectMetadata = {
13
13
  annotationId: number;
14
14
  assetId?: number;
15
15
  boundingBox: Box3;
16
16
  };
17
- export declare type PointCloudObject = PointCloudObjectMetadata & {
17
+ export type PointCloudObject = PointCloudObjectMetadata & {
18
18
  stylableObject: StylableObject;
19
19
  };
@@ -14,7 +14,7 @@ export interface Image360DescriptorProvider<T> {
14
14
  export interface Image360FileProvider {
15
15
  get360ImageFiles(image360Descriptor: Image360Descriptor): Promise<Image360Face[]>;
16
16
  }
17
- export declare type Image360Descriptor = {
17
+ export type Image360Descriptor = {
18
18
  id: string;
19
19
  label: string;
20
20
  collectionId: string;
@@ -24,7 +24,7 @@ export declare type Image360Descriptor = {
24
24
  rotation: THREE.Matrix4;
25
25
  };
26
26
  };
27
- export declare type Image360Face = {
27
+ export type Image360Face = {
28
28
  face: 'front' | 'back' | 'left' | 'right' | 'top' | 'bottom';
29
29
  mimeType: 'image/jpeg' | 'image/png';
30
30
  data: ArrayBuffer;
@@ -3,4 +3,5 @@
3
3
  */
4
4
  import * as THREE from 'three';
5
5
  import { File3dFormat } from '../types';
6
+ export declare const cadFromCdfToThreeMatrix: THREE.Matrix4;
6
7
  export declare function applyDefaultModelTransformation(matrix: THREE.Matrix4, format: File3dFormat | string): void;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
- export declare type TrackedEvents = 'init' | 'construct3dViewer' | 'loadModel' | 'error' | 'cameraNavigated' | 'toolCreated' | 'cadModelStyleAssigned' | 'cadNodeTransformOverridden' | 'measurementAdded';
5
- export declare type EventProps = {
4
+ export type TrackedEvents = 'init' | 'construct3dViewer' | 'loadModel' | 'error' | 'cameraNavigated' | 'toolCreated' | 'cadModelStyleAssigned' | 'cadNodeTransformOverridden' | 'measurementAdded';
5
+ export type EventProps = {
6
6
  [key: string]: any;
7
7
  };
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
- export declare type SupportedModelTypes = 'pointcloud' | 'cad';
4
+ export type SupportedModelTypes = 'pointcloud' | 'cad';
@@ -15,7 +15,7 @@ export interface IntersectInput {
15
15
  /**
16
16
  * State holding information about data being loaded.
17
17
  */
18
- export declare type LoadingState = {
18
+ export type LoadingState = {
19
19
  /**
20
20
  * Indicates if we are currently loading more data.
21
21
  */
@@ -2,9 +2,9 @@
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
4
  import { CogniteInternalId } from '@cognite/sdk';
5
- export declare type ByTreeIndicesResponse = {
5
+ export type ByTreeIndicesResponse = {
6
6
  items: CogniteInternalId[];
7
7
  };
8
- export declare type ByNodeIdsResponse = {
8
+ export type ByNodeIdsResponse = {
9
9
  items: number[];
10
10
  };
@@ -2,10 +2,10 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { Color } from 'three';
5
- export declare type PointCloudAppearance = {
5
+ export type PointCloudAppearance = {
6
6
  color?: Color;
7
7
  visible?: boolean;
8
8
  };
9
- export declare type CompletePointCloudAppearance = Required<PointCloudAppearance>;
9
+ export type CompletePointCloudAppearance = Required<PointCloudAppearance>;
10
10
  export declare const DefaultPointCloudAppearance: CompletePointCloudAppearance;
11
11
  export declare function applyDefaultsToPointCloudAppearance(appearance: PointCloudAppearance): CompletePointCloudAppearance;
@@ -48,14 +48,22 @@ export declare class CognitePointCloudModel {
48
48
  getCameraConfiguration(): CameraConfiguration | undefined;
49
49
  /**
50
50
  * Sets transformation matrix of the model. This overrides the current transformation.
51
- * @param transformationMatrix
51
+ * @param transformationMatrix The new transformation matrix
52
52
  */
53
53
  setModelTransformation(transformationMatrix: THREE.Matrix4): void;
54
54
  /**
55
- * Gets transformation matrix of the model.
55
+ * Gets transformation matrix that has previously been
56
+ * set with {@link CognitePointCloudmodel.setModelTransformation}.
56
57
  * @param out Preallocated `THREE.Matrix4` (optional).
57
58
  */
58
59
  getModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
60
+ /**
61
+ * Gets transformation from CDF space to ThreeJS space,
62
+ * which includes any additional "default" transformations assigned to this model.
63
+ * Does not include any custom transformations set by {@link CognitePointcloudmodel.setModelTransformation}
64
+ * @param out Preallocated `THREE.Matrix4` (optional)
65
+ */
66
+ getCdfToDefaultModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
59
67
  /**
60
68
  * Sets a visible filter on points of a given class.
61
69
  * @param pointClass ASPRS classification class code. Either one of the well known
@@ -5,7 +5,7 @@
5
5
  * Represents a budget of how many point from point clouds can be
6
6
  * loaded at the same time.
7
7
  */
8
- export declare type PointCloudBudget = {
8
+ export type PointCloudBudget = {
9
9
  /**
10
10
  * Total number of points that can be loaded for all point clouds models
11
11
  * accumulated.
@@ -2,7 +2,7 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { CognitePointCloudModel } from './CognitePointCloudModel';
5
- export declare type PointCloudIntersection = {
5
+ export type PointCloudIntersection = {
6
6
  /**
7
7
  * The intersection type.
8
8
  */
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
- import * as THREE from 'three';
5
4
  import { CameraConfiguration } from '../../utilities';
6
5
  import { ClassificationInfo, PointCloudOctree, PickPoint } from './potree-three-loader';
7
6
  import { WellKnownAsprsPointClassCodes } from './types';
8
7
  import { PointColorType, PointShape, PointSizeType } from '../../rendering';
9
8
  import { PointCloudObjectMetadata, PointCloudObject } from '../../data-providers';
10
9
  import { CompletePointCloudAppearance, StyledPointCloudObjectCollection } from '../../pointcloud-styling';
11
- export declare class PointCloudNode extends THREE.Group {
10
+ import { Matrix4, Group } from 'three';
11
+ export declare class PointCloudNode extends Group {
12
12
  private readonly _cameraConfiguration?;
13
13
  private readonly _octree;
14
14
  private readonly _annotations;
@@ -16,7 +16,9 @@ export declare class PointCloudNode extends THREE.Group {
16
16
  private _needsRedraw;
17
17
  private static readonly pickingWindowSize;
18
18
  private readonly _modelIdentifier;
19
- constructor(modelIdentifier: symbol, octree: PointCloudOctree, annotations: PointCloudObject[], classificationInfo: ClassificationInfo, cameraConfiguration?: CameraConfiguration);
19
+ private readonly _sourceTransform;
20
+ private readonly _customTransform;
21
+ constructor(modelIdentifier: symbol, sourceTransform: Matrix4, octree: PointCloudOctree, annotations: PointCloudObject[], classificationInfo: ClassificationInfo, cameraConfiguration?: CameraConfiguration);
20
22
  get modelIdentifier(): symbol;
21
23
  get octree(): PointCloudOctree;
22
24
  get needsRedraw(): boolean;
@@ -73,7 +75,8 @@ export declare class PointCloudNode extends THREE.Group {
73
75
  }>;
74
76
  getBoundingBox(outBbox?: THREE.Box3): THREE.Box3;
75
77
  setModelTransformation(matrix: THREE.Matrix4): void;
76
- getModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
78
+ getModelTransformation(out?: Matrix4): THREE.Matrix4;
79
+ getCdfToDefaultModelTransformation(out?: Matrix4): Matrix4;
77
80
  get stylableObjectAnnotationMetadata(): Iterable<PointCloudObjectMetadata>;
78
81
  get stylableObjects(): PointCloudObject[];
79
82
  get defaultAppearance(): CompletePointCloudAppearance;
@@ -1,15 +1,15 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- export declare type PointClass = {
4
+ export type PointClass = {
5
5
  name: string;
6
6
  code: number;
7
7
  rgb?: string;
8
8
  };
9
- export declare type ClassificationSet = {
9
+ export type ClassificationSet = {
10
10
  name: string;
11
11
  classificationSet: PointClass[];
12
12
  };
13
- export declare type ClassificationInfo = {
13
+ export type ClassificationInfo = {
14
14
  classificationSets: ClassificationSet[];
15
15
  };
@@ -1,20 +1,20 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- export declare type EptSchemaEntry = {
4
+ export type EptSchemaEntry = {
5
5
  name: string;
6
6
  type: 'signed' | 'unsigned' | 'float';
7
7
  size: number;
8
8
  scale: number;
9
9
  offset: number;
10
10
  };
11
- export declare type SpatialReferenceSystem = {
11
+ export type SpatialReferenceSystem = {
12
12
  authority: string;
13
13
  horizontal: string;
14
14
  vertical?: string;
15
15
  wkt: string;
16
16
  };
17
- export declare type EptJson = {
17
+ export type EptJson = {
18
18
  schema: EptSchemaEntry[];
19
19
  bounds: number[];
20
20
  boundsConforming: number[];
@@ -40,7 +40,7 @@ export declare const POINT_ATTRIBUTES: {
40
40
  NORMAL_OCT16: IPointAttribute;
41
41
  NORMAL: IPointAttribute;
42
42
  };
43
- export declare type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
43
+ export type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
44
44
  export declare class PointAttributes implements IPointAttributes {
45
45
  attributes: IPointAttribute[];
46
46
  byteSize: number;
@@ -1,5 +1,5 @@
1
1
  import { IPointCloudTreeNodeBase } from '../tree/IPointCloudTreeNodeBase';
2
- export declare type Node = IPointCloudTreeNodeBase;
2
+ export type Node = IPointCloudTreeNodeBase;
3
3
  export declare class LRUItem {
4
4
  node: Node;
5
5
  next: LRUItem | null;
@@ -2,7 +2,7 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { Vec3 } from '../../../../utilities';
5
- export declare type ParsedEptData = {
5
+ export type ParsedEptData = {
6
6
  numPoints: number;
7
7
  tightBoundingBox: {
8
8
  min: number[];
@@ -19,12 +19,12 @@ export declare type ParsedEptData = {
19
19
  indices: ArrayBuffer;
20
20
  objectId: ArrayBuffer;
21
21
  };
22
- export declare type AttributeSchema = {
22
+ export type AttributeSchema = {
23
23
  name: string;
24
24
  size: number;
25
25
  type: 'signed' | 'unsigned' | 'float';
26
26
  };
27
- export declare type EptInputData = {
27
+ export type EptInputData = {
28
28
  buffer: ArrayBuffer;
29
29
  schema: AttributeSchema[];
30
30
  scale: Vec3;
@@ -2,15 +2,15 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { AABB, Vec3 } from '../../utilities';
5
- export declare type WasmSerializedCylinder = {
5
+ export type WasmSerializedCylinder = {
6
6
  center_a: Vec3;
7
7
  center_b: Vec3;
8
8
  radius: number;
9
9
  };
10
- export declare type WasmSerializedOrientedBox = {
10
+ export type WasmSerializedOrientedBox = {
11
11
  inv_instance_matrix: number[];
12
12
  };
13
- export declare type WasmSerializedPointCloudObject = {
13
+ export type WasmSerializedPointCloudObject = {
14
14
  object_id: number;
15
15
  cylinder?: WasmSerializedCylinder | undefined;
16
16
  oriented_box?: WasmSerializedOrientedBox | undefined;
@@ -27,6 +27,7 @@ export declare class CadMaterialManager {
27
27
  getModelBackTreeIndices(modelIdentifier: string): IndexSet;
28
28
  getModelInFrontTreeIndices(modelIdentifier: string): IndexSet;
29
29
  getModelGhostedTreeIndices(modelIdentifier: string): IndexSet;
30
+ getModelVisibleTreeIndices(modelIdentifier: string): IndexSet;
30
31
  setRenderMode(mode: RenderMode): void;
31
32
  getRenderMode(): RenderMode;
32
33
  dispose(): void;
@@ -4,7 +4,7 @@
4
4
  import * as THREE from 'three';
5
5
  import { RenderPipelineExecutor } from '../RenderPipelineExecutor';
6
6
  import { RenderPipelineProvider } from '../RenderPipelineProvider';
7
- export declare type BasicPipelineExecutorOptions = {
7
+ export type BasicPipelineExecutorOptions = {
8
8
  autoResizeRenderer: boolean;
9
9
  resolutionThreshold?: number;
10
10
  };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- export declare type PointCloudObjectIdMaps = {
4
+ export type PointCloudObjectIdMaps = {
5
5
  annotationToObjectIds: Map<number, number>;
6
6
  objectToAnnotationIds: Map<number, number>;
7
7
  };
@@ -2,7 +2,7 @@
2
2
  * Adapted from pnext/three-loader (https://github.com/pnext/three-loader)
3
3
  */
4
4
  import { Color, IUniform as IThreeUniform, Vector4 } from 'three';
5
- export declare type IGradient = [number, Color][];
5
+ export type IGradient = [number, Color][];
6
6
  export interface PointClassification {
7
7
  [value: string]: Vector4;
8
8
  DEFAULT: Vector4;
@@ -11,7 +11,7 @@ export interface IUniform<T> extends IThreeUniform {
11
11
  type: string;
12
12
  value: T;
13
13
  }
14
- export declare type OctreeMaterialParams = {
14
+ export type OctreeMaterialParams = {
15
15
  scale: THREE.Vector3;
16
16
  spacing: number;
17
17
  boundingBox: THREE.Box3;
@@ -4,7 +4,7 @@
4
4
  import { PointShape } from '../pointcloud-rendering';
5
5
  import * as THREE from 'three';
6
6
  import { EdlOptions } from '../rendering/types';
7
- export declare type BlendOptions = {
7
+ export type BlendOptions = {
8
8
  blendDestination: THREE.BlendingDstFactor;
9
9
  blendSource: THREE.BlendingDstFactor | THREE.BlendingSrcFactor;
10
10
  blendDestinationAlpha?: THREE.BlendingDstFactor;
@@ -15,7 +15,7 @@ export declare enum BlitEffect {
15
15
  GaussianBlur = 1,
16
16
  Fxaa = 2
17
17
  }
18
- export declare type BlitOptions = {
18
+ export type BlitOptions = {
19
19
  texture: THREE.Texture;
20
20
  effect?: BlitEffect;
21
21
  depthTexture?: THREE.DepthTexture;
@@ -25,7 +25,7 @@ export declare type BlitOptions = {
25
25
  edges?: boolean;
26
26
  outline?: boolean;
27
27
  };
28
- export declare type DepthBlendBlitOptions = {
28
+ export type DepthBlendBlitOptions = {
29
29
  texture: THREE.Texture;
30
30
  depthTexture: THREE.DepthTexture;
31
31
  blendTexture: THREE.Texture;
@@ -34,7 +34,7 @@ export declare type DepthBlendBlitOptions = {
34
34
  overrideAlpha?: number;
35
35
  outline?: boolean;
36
36
  };
37
- export declare type PointCloudPostProcessingOptions = {
37
+ export type PointCloudPostProcessingOptions = {
38
38
  logDepthTexture: THREE.Texture;
39
39
  texture: THREE.Texture;
40
40
  depthTexture: THREE.DepthTexture;
@@ -42,10 +42,10 @@ export declare type PointCloudPostProcessingOptions = {
42
42
  edlOptions: EdlOptions;
43
43
  };
44
44
  export declare const transparentBlendOptions: BlendOptions;
45
- export declare type ThreeUniforms = {
45
+ export type ThreeUniforms = {
46
46
  [uniform: string]: THREE.IUniform<any>;
47
47
  };
48
- export declare type PointCloudMaterialParameters = {
48
+ export type PointCloudMaterialParameters = {
49
49
  weighted?: boolean;
50
50
  shape?: PointShape;
51
51
  useEDL?: boolean;
@@ -56,13 +56,13 @@ export declare type PointCloudMaterialParameters = {
56
56
  blendDst?: THREE.BlendingDstFactor;
57
57
  colorWrite?: boolean;
58
58
  };
59
- export declare type PointCloudPassParameters = {
59
+ export type PointCloudPassParameters = {
60
60
  material?: PointCloudMaterialParameters;
61
61
  renderer?: {
62
62
  autoClearDepth?: boolean;
63
63
  };
64
64
  };
65
- export declare type PostProcessingObjectsVisibilityParameters = {
65
+ export type PostProcessingObjectsVisibilityParameters = {
66
66
  cad: {
67
67
  back: boolean;
68
68
  ghost: boolean;
@@ -3,22 +3,22 @@
3
3
  */
4
4
  import * as THREE from 'three';
5
5
  import { EdlOptions } from '../rendering/types';
6
- export declare type RenderTargetData = {
6
+ export type RenderTargetData = {
7
7
  currentRenderSize: THREE.Vector2;
8
8
  ssaoRenderTarget: THREE.WebGLRenderTarget;
9
9
  postProcessingRenderTarget: THREE.WebGLRenderTarget;
10
10
  };
11
- export declare type CadGeometryRenderTargets = {
11
+ export type CadGeometryRenderTargets = {
12
12
  currentRenderSize: THREE.Vector2;
13
13
  back: THREE.WebGLRenderTarget;
14
14
  ghost: THREE.WebGLRenderTarget;
15
15
  inFront: THREE.WebGLRenderTarget;
16
16
  };
17
- export declare type PointCloudRenderTargets = {
17
+ export type PointCloudRenderTargets = {
18
18
  pointCloudLogDepth: THREE.WebGLRenderTarget;
19
19
  pointCloud: THREE.WebGLRenderTarget;
20
20
  };
21
- export declare type PostProcessingPipelineOptions = CadGeometryRenderTargets & PointCloudRenderTargets & {
21
+ export type PostProcessingPipelineOptions = CadGeometryRenderTargets & PointCloudRenderTargets & {
22
22
  ssaoTexture: THREE.Texture;
23
23
  edges: boolean;
24
24
  pointBlending?: boolean;
@@ -15,6 +15,7 @@ export declare class NodeAppearanceTextureBuilder {
15
15
  private readonly _regularNodesTreeIndices;
16
16
  private readonly _ghostedNodesTreeIndices;
17
17
  private readonly _infrontNodesTreeIndices;
18
+ private readonly _visibleNodesTreeIndices;
18
19
  constructor(treeIndexCount: number, styleProvider: NodeAppearanceProvider);
19
20
  getDefaultAppearance(): NodeAppearance;
20
21
  /**
@@ -27,6 +28,7 @@ export declare class NodeAppearanceTextureBuilder {
27
28
  get regularNodeTreeIndices(): IndexSet;
28
29
  get ghostedNodeTreeIndices(): IndexSet;
29
30
  get infrontNodeTreeIndices(): IndexSet;
31
+ get visibleNodeTreeIndices(): IndexSet;
30
32
  get needsUpdate(): boolean;
31
33
  /**
32
34
  * A texture holding at least one element per node with color override
@@ -17,7 +17,7 @@ export declare enum AntiAliasingMode {
17
17
  /**
18
18
  * Configuration parameters for Eye Dome Lighting (EDL) point cloud post-processing effect.
19
19
  */
20
- export declare type EdlOptions = {
20
+ export type EdlOptions = {
21
21
  /**
22
22
  * Determines how pronounced the effect is. Lower values result in more transparent edges.
23
23
  */
@@ -30,7 +30,7 @@ export declare type EdlOptions = {
30
30
  /**
31
31
  * Options and hints for how the Reveal viewer applies rendering effects.
32
32
  */
33
- export declare type RenderOptions = {
33
+ export type RenderOptions = {
34
34
  /**
35
35
  * Anti-aliasing mode used to avoid aliasing effects in the rendered view.
36
36
  */
@@ -70,13 +70,13 @@ export declare const defaultRenderOptions: Required<RenderOptions>;
70
70
  /**
71
71
  * Edge detection parameters supported by Reveal.
72
72
  */
73
- export declare type EdgeDetectionParameters = {
73
+ export type EdgeDetectionParameters = {
74
74
  enabled: boolean;
75
75
  };
76
76
  /**
77
77
  * Screen-space ambient occlusion parameters supported by Reveal.
78
78
  */
79
- export declare type SsaoParameters = {
79
+ export type SsaoParameters = {
80
80
  /**
81
81
  * Quality (Number of samples) tond estimate occlusion factor.
82
82
  */
@@ -93,7 +93,7 @@ export declare type SsaoParameters = {
93
93
  /**
94
94
  * Point cloud rendering parameters supported by Reveal.
95
95
  */
96
- export declare type PointCloudParameters = {
96
+ export type PointCloudParameters = {
97
97
  /**
98
98
  * Effect of blending close points together. Creates smoother texture on object surfaces.
99
99
  */
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as THREE from 'three';
5
5
  import { NumericRange } from '../../../utilities';
6
- export declare type NodeTransformChangeEventDelegate = (change: 'set' | 'reset', treeIndices: NumericRange, transform: THREE.Matrix4) => void;
6
+ export type NodeTransformChangeEventDelegate = (change: 'set' | 'reset', treeIndices: NumericRange, transform: THREE.Matrix4) => void;
7
7
  export declare class NodeTransformProvider {
8
8
  private readonly _events;
9
9
  on(event: 'changed', listener: NodeTransformChangeEventDelegate): void;
@@ -2,7 +2,7 @@
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
4
  import { ConsumedSector, WantedSector } from '../../cad-parsers';
5
- export declare type SectorId = number;
5
+ export type SectorId = number;
6
6
  export interface SectorRepository {
7
7
  loadSector(sector: WantedSector): Promise<ConsumedSector>;
8
8
  setCacheSize(sectorCount: number): void;
@@ -3,13 +3,13 @@
3
3
  */
4
4
  import type { Mesh } from 'draco3dgltf';
5
5
  import { GltfJson } from './types';
6
- export declare type VertexBufferDescriptor = {
6
+ export type VertexBufferDescriptor = {
7
7
  [key: string]: {
8
8
  byteStride: number;
9
9
  byteOffset: number;
10
10
  };
11
11
  };
12
- export declare type MeshGeometryBufferDescriptor = {
12
+ export type MeshGeometryBufferDescriptor = {
13
13
  indexBufferView: Uint16Array | Uint32Array;
14
14
  vertexBufferView: Uint8Array;
15
15
  vertexBufferDescriptor: VertexBufferDescriptor;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
- export declare type GltfJson = {
4
+ export type GltfJson = {
5
5
  accessors: Accessor[];
6
6
  asset: Asset;
7
7
  bufferViews: BufferView[];
@@ -12,31 +12,31 @@ export declare type GltfJson = {
12
12
  scene: number;
13
13
  scenes: Scene[];
14
14
  };
15
- export declare type Scene = {
15
+ export type Scene = {
16
16
  nodes: number[];
17
17
  };
18
- export declare type Accessor = {
18
+ export type Accessor = {
19
19
  bufferView: number;
20
20
  byteOffset: number | undefined;
21
21
  componentType: number;
22
22
  count: number;
23
23
  type: string;
24
24
  };
25
- export declare type Asset = {
25
+ export type Asset = {
26
26
  copyright: string;
27
27
  generator: string;
28
28
  version: string;
29
29
  };
30
- export declare type Buffer = {
30
+ export type Buffer = {
31
31
  byteLength: number;
32
32
  };
33
- export declare type BufferView = {
33
+ export type BufferView = {
34
34
  buffer: number;
35
35
  byteLength: number;
36
36
  byteOffset: number | undefined;
37
37
  byteStride: number;
38
38
  };
39
- export declare type Node = {
39
+ export type Node = {
40
40
  name: string;
41
41
  mesh: number | undefined;
42
42
  extensions: {
@@ -47,13 +47,13 @@ export declare type Node = {
47
47
  } | undefined;
48
48
  };
49
49
  };
50
- export declare type Mesh = {
50
+ export type Mesh = {
51
51
  primitives: Primitive[];
52
52
  extras: {
53
53
  [key: string]: any;
54
54
  } | undefined;
55
55
  };
56
- export declare type Primitive = {
56
+ export type Primitive = {
57
57
  attributes: {
58
58
  [key: string]: number;
59
59
  };
@@ -82,12 +82,12 @@ export declare enum RevealGeometryCollectionType {
82
82
  TriangleMesh = 11,
83
83
  InstanceMesh = 12
84
84
  }
85
- export declare type GlbHeaderData = {
85
+ export type GlbHeaderData = {
86
86
  json: GltfJson;
87
87
  binContentLength: number;
88
88
  byteOffsetToBinContent: number;
89
89
  };
90
- export declare type GeometryProcessingPayload = {
90
+ export type GeometryProcessingPayload = {
91
91
  geometryType: RevealGeometryCollectionType;
92
92
  bufferGeometry: THREE.InstancedBufferGeometry | THREE.BufferGeometry;
93
93
  instancingExtension: {
@@ -99,7 +99,7 @@ export declare type GeometryProcessingPayload = {
99
99
  glbHeaderData: GlbHeaderData;
100
100
  data: ArrayBuffer;
101
101
  };
102
- export declare type ParsedGeometry = {
102
+ export type ParsedGeometry = {
103
103
  type: RevealGeometryCollectionType;
104
104
  geometryBuffer: THREE.BufferGeometry;
105
105
  instanceId?: string;
@@ -2,7 +2,6 @@
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
4
  export { HtmlOverlayTool, HtmlOverlayOptions, HtmlOverlayPositionUpdatedDelegate, HtmlOverlayCreateClusterDelegate } from './src/HtmlOverlay/HtmlOverlayTool';
5
- export { ExplodedViewTool } from './src/ExplodedViewTool';
6
5
  export { DebugCameraTool } from './src/DebugCameraTool';
7
6
  export { AxisViewTool } from './src/AxisView/AxisViewTool';
8
7
  export { AxisBoxConfig, AxisBoxCompassConfig, AxisBoxFaceConfig, Corner, AbsolutePosition, RelativePosition } from './src/AxisView/types';