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

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 (75) hide show
  1. package/dist/index.js +32 -32
  2. package/dist/index.js.map +1 -1
  3. package/dist/packages/api/src/public/RevealManager.d.ts +1 -1
  4. package/dist/packages/api/src/public/migration/renderOptionsHelpers.d.ts +2 -2
  5. package/dist/packages/api/src/public/migration/types.d.ts +4 -4
  6. package/dist/packages/api/src/public/types.d.ts +3 -3
  7. package/dist/packages/api/src/utilities/Spinner.d.ts +1 -1
  8. package/dist/packages/api/src/utilities/ViewStateHelper.d.ts +3 -3
  9. package/dist/packages/api/src/utilities/reflection.d.ts +1 -1
  10. package/dist/packages/cad-geometry-loaders/src/CadLoadingHints.d.ts +1 -1
  11. package/dist/packages/cad-geometry-loaders/src/CadModelBudget.d.ts +1 -1
  12. package/dist/packages/cad-geometry-loaders/src/InternalRevealCadOptions.d.ts +1 -1
  13. package/dist/packages/cad-geometry-loaders/src/sector/SectorDownloadScheduler.d.ts +1 -1
  14. package/dist/packages/cad-geometry-loaders/src/sector/culling/ByScreenSizeSectorCuller.d.ts +1 -1
  15. package/dist/packages/cad-geometry-loaders/src/sector/culling/types.d.ts +5 -5
  16. package/dist/packages/cad-geometry-loaders/src/utilities/PromiseUtils.d.ts +1 -1
  17. package/dist/packages/cad-model/src/picking/PickingHandler.d.ts +1 -1
  18. package/dist/packages/cad-model/src/types.d.ts +3 -3
  19. package/dist/packages/cad-parsers/src/cad/types.d.ts +3 -3
  20. package/dist/packages/cad-parsers/src/metadata/parsers/types.d.ts +8 -8
  21. package/dist/packages/cad-parsers/src/metadata/types.d.ts +5 -5
  22. package/dist/packages/cad-parsers/src/utilities/computeBoundingBoxFromAttributes.d.ts +1 -1
  23. package/dist/packages/cad-styling/src/NodeAppearance.d.ts +2 -2
  24. package/dist/packages/cad-styling/src/NodeAppearanceProvider.d.ts +1 -1
  25. package/dist/packages/cad-styling/src/NodeCollectionDeserializer.d.ts +1 -1
  26. package/dist/packages/cad-styling/src/PropertyFilterNodeCollection.d.ts +1 -1
  27. package/dist/packages/cad-styling/src/SerializedNodeCollection.d.ts +1 -1
  28. package/dist/packages/cad-styling/src/prioritized/types.d.ts +1 -1
  29. package/dist/packages/camera-manager/src/types.d.ts +5 -5
  30. package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/StylableObject.d.ts +2 -2
  31. package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/types.d.ts +3 -3
  32. package/dist/packages/data-providers/src/types.d.ts +2 -2
  33. package/dist/packages/metrics/src/types.d.ts +2 -2
  34. package/dist/packages/model-base/src/SupportedModelTypes.d.ts +1 -1
  35. package/dist/packages/model-base/src/types.d.ts +1 -1
  36. package/dist/packages/nodes-api/src/types.d.ts +2 -2
  37. package/dist/packages/pointcloud-styling/src/PointCloudAppearance.d.ts +2 -2
  38. package/dist/packages/pointclouds/src/PointCloudBudget.d.ts +1 -1
  39. package/dist/packages/pointclouds/src/PointCloudIntersection.d.ts +1 -1
  40. package/dist/packages/pointclouds/src/potree-three-loader/loading/ClassificationInfo.d.ts +3 -3
  41. package/dist/packages/pointclouds/src/potree-three-loader/loading/EptJson.d.ts +3 -3
  42. package/dist/packages/pointclouds/src/potree-three-loader/tree/PointAttributes.d.ts +1 -1
  43. package/dist/packages/pointclouds/src/potree-three-loader/utils/lru.d.ts +1 -1
  44. package/dist/packages/pointclouds/src/potree-three-loader/workers/types.d.ts +3 -3
  45. package/dist/packages/pointclouds/wasm/index.d.ts +3 -3
  46. package/dist/packages/rendering/src/pipeline-executors/BasicPipelineExecutor.d.ts +1 -1
  47. package/dist/packages/rendering/src/pointcloud-rendering/PointCloudObjectIdMaps.d.ts +1 -1
  48. package/dist/packages/rendering/src/pointcloud-rendering/types.d.ts +2 -2
  49. package/dist/packages/rendering/src/render-passes/types.d.ts +8 -8
  50. package/dist/packages/rendering/src/render-pipeline-providers/types.d.ts +4 -4
  51. package/dist/packages/rendering/src/rendering/types.d.ts +5 -5
  52. package/dist/packages/rendering/src/transform/NodeTransformProvider.d.ts +1 -1
  53. package/dist/packages/sector-loader/src/SectorRepository.d.ts +1 -1
  54. package/dist/packages/sector-parser/src/DracoDecoderHelper.d.ts +2 -2
  55. package/dist/packages/sector-parser/src/types.d.ts +12 -12
  56. package/dist/packages/tools/src/AxisView/types.d.ts +5 -5
  57. package/dist/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +5 -5
  58. package/dist/packages/tools/src/Measurement/MeasurementManager.d.ts +1 -1
  59. package/dist/packages/tools/src/Measurement/types.d.ts +5 -5
  60. package/dist/packages/tools/src/Timeline/types.d.ts +1 -1
  61. package/dist/packages/tools/src/types.d.ts +1 -1
  62. package/dist/packages/utilities/src/CameraConfiguration.d.ts +1 -1
  63. package/dist/packages/utilities/src/WebGLRendererStateHelper.d.ts +1 -1
  64. package/dist/packages/utilities/src/device.d.ts +1 -1
  65. package/dist/packages/utilities/src/events/InputHandler.d.ts +1 -1
  66. package/dist/packages/utilities/src/events/types.d.ts +5 -5
  67. package/dist/packages/utilities/src/indexset/IndexSet.d.ts +1 -1
  68. package/dist/packages/utilities/src/linalg.d.ts +3 -3
  69. package/dist/packages/utilities/src/shapes/SerializableBox.d.ts +1 -1
  70. package/dist/packages/utilities/src/shapes/SerializableCompositeShape.d.ts +1 -1
  71. package/dist/packages/utilities/src/shapes/SerializableCylinder.d.ts +1 -1
  72. package/dist/packages/utilities/src/types.d.ts +2 -2
  73. package/dist/packages/utilities/src/workers/workerize-transferable/on-main.d.ts +1 -1
  74. package/dist/packages/utilities/src/workers/workerize-transferable/on-worker.d.ts +1 -1
  75. package/package.json +4 -4
@@ -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;
@@ -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;
@@ -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;
@@ -5,7 +5,7 @@ import * as THREE from 'three';
5
5
  /**
6
6
  * Configuration of {@link AxisViewTool}.
7
7
  */
8
- export declare type AxisBoxConfig = {
8
+ export type AxisBoxConfig = {
9
9
  /**
10
10
  * Size in pixels of the axis tool.
11
11
  */
@@ -41,7 +41,7 @@ export declare type AxisBoxConfig = {
41
41
  /**
42
42
  * Absolute position in pixels.
43
43
  */
44
- export declare type AbsolutePosition = {
44
+ export type AbsolutePosition = {
45
45
  xAbsolute: number;
46
46
  yAbsolute: number;
47
47
  };
@@ -49,14 +49,14 @@ export declare type AbsolutePosition = {
49
49
  * Relative position from a corner of the viewer
50
50
  * and a given padding.
51
51
  */
52
- export declare type RelativePosition = {
52
+ export type RelativePosition = {
53
53
  corner: Corner;
54
54
  padding: THREE.Vector2;
55
55
  };
56
56
  /**
57
57
  * Configuration of each face of the orientation box.
58
58
  */
59
- export declare type AxisBoxFaceConfig = {
59
+ export type AxisBoxFaceConfig = {
60
60
  /**
61
61
  * Label of the respective face, e.g. 'X' or 'Right'.
62
62
  */
@@ -70,7 +70,7 @@ export declare type AxisBoxFaceConfig = {
70
70
  /**
71
71
  * Configuration of the compass.
72
72
  */
73
- export declare type AxisBoxCompassConfig = {
73
+ export type AxisBoxCompassConfig = {
74
74
  /**
75
75
  * Label of the orientation indicator. Defaults
76
76
  * to 'N' for north.
@@ -8,19 +8,19 @@ import { Cognite3DViewer } from '../../../api';
8
8
  * Callback that is triggered whenever the 2D position of an overlay is updated
9
9
  * in {@link HtmlOverlayTool}.
10
10
  */
11
- export declare type HtmlOverlayPositionUpdatedDelegate = (element: HTMLElement, position2D: THREE.Vector2, position3D: THREE.Vector3, distanceToCamera: number, userData: any) => void;
11
+ export type HtmlOverlayPositionUpdatedDelegate = (element: HTMLElement, position2D: THREE.Vector2, position3D: THREE.Vector3, distanceToCamera: number, userData: any) => void;
12
12
  /**
13
13
  * Callback that is triggered when a set of overlays are clustered together in
14
14
  * {@link HtmlOverlayTool}.
15
15
  */
16
- export declare type HtmlOverlayCreateClusterDelegate = (overlayElements: {
16
+ export type HtmlOverlayCreateClusterDelegate = (overlayElements: {
17
17
  htmlElement: HTMLElement;
18
18
  userData: any;
19
19
  }[]) => HTMLElement;
20
20
  /**
21
21
  * Options for an overlay added using {@link HtmlOverlayTool.add}.
22
22
  */
23
- export declare type HtmlOverlayOptions = {
23
+ export type HtmlOverlayOptions = {
24
24
  /**
25
25
  * Callback that is triggered whenever the position of the overlay is updated. Optional.
26
26
  */
@@ -34,7 +34,7 @@ export declare type HtmlOverlayOptions = {
34
34
  /**
35
35
  * Controls how close overlay elements are clustered together.
36
36
  */
37
- export declare type HtmlOverlayToolClusteringOptions = {
37
+ export type HtmlOverlayToolClusteringOptions = {
38
38
  /**
39
39
  * Currently only 'overlapInScreenSpace' is supported. In this mode,
40
40
  * overlays are clustered together into a single element as defined by
@@ -54,7 +54,7 @@ export declare type HtmlOverlayToolClusteringOptions = {
54
54
  */
55
55
  createClusterElementCallback: HtmlOverlayCreateClusterDelegate;
56
56
  };
57
- export declare type HtmlOverlayToolOptions = {
57
+ export type HtmlOverlayToolOptions = {
58
58
  clusteringOptions?: HtmlOverlayToolClusteringOptions;
59
59
  };
60
60
  /**
@@ -4,7 +4,7 @@
4
4
  import * as THREE from 'three';
5
5
  import { HtmlOverlayTool } from '../HtmlOverlay/HtmlOverlayTool';
6
6
  import { MeasurementOptions } from './types';
7
- export declare type Measurement = {
7
+ export type Measurement = {
8
8
  readonly measurementId: number;
9
9
  readonly startPoint: THREE.Vector3;
10
10
  readonly endPoint: THREE.Vector3;
@@ -4,11 +4,11 @@
4
4
  /**
5
5
  * Custom callback for users to change measurement label content.
6
6
  */
7
- export declare type DistanceToLabelDelegate = (distanceInMeters: number) => string;
7
+ export type DistanceToLabelDelegate = (distanceInMeters: number) => string;
8
8
  /**
9
9
  * Delegate for measurement added events.
10
10
  */
11
- export declare type MeasurementAddedDelegate = (event: {
11
+ export type MeasurementAddedDelegate = (event: {
12
12
  measurementId: number;
13
13
  startPoint: THREE.Vector3;
14
14
  endPoint: THREE.Vector3;
@@ -17,15 +17,15 @@ export declare type MeasurementAddedDelegate = (event: {
17
17
  /**
18
18
  * Delegate for measurement started events.
19
19
  */
20
- export declare type MeasurementStartedDelegate = () => void;
20
+ export type MeasurementStartedDelegate = () => void;
21
21
  /**
22
22
  * Delegate for measurement ended events.
23
23
  */
24
- export declare type MeasurementEndedDelegate = () => void;
24
+ export type MeasurementEndedDelegate = () => void;
25
25
  /**
26
26
  * Measurement tool option with user custom callback, line width & color.
27
27
  */
28
- export declare type MeasurementOptions = {
28
+ export type MeasurementOptions = {
29
29
  distanceToLabelCallback?: DistanceToLabelDelegate | undefined;
30
30
  /**
31
31
  * Line width in cm. Note that the minium drawn line will be ~2 pixels.
@@ -5,7 +5,7 @@ import { Keyframe } from './Keyframe';
5
5
  /**
6
6
  * Delegate for Timeline Date update
7
7
  */
8
- export declare type TimelineDateUpdateDelegate = (event: {
8
+ export type TimelineDateUpdateDelegate = (event: {
9
9
  date: Date;
10
10
  activeKeyframe: Keyframe | undefined;
11
11
  startDate: Date;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
- export declare type DisposedDelegate = () => void;
4
+ export type DisposedDelegate = () => void;
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Represents a camera configuration, consisting of a camera position and target.
6
6
  */
7
- export declare type CameraConfiguration = {
7
+ export type CameraConfiguration = {
8
8
  readonly position: THREE.Vector3;
9
9
  readonly target: THREE.Vector3;
10
10
  };
@@ -2,7 +2,7 @@
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
4
  import * as THREE from 'three';
5
- declare type WebGLState = {
5
+ type WebGLState = {
6
6
  buffers?: {
7
7
  depth?: {
8
8
  mask?: boolean;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- export declare type DeviceDescriptor = {
4
+ export type DeviceDescriptor = {
5
5
  deviceType: 'desktop' | 'mobile' | 'tablet';
6
6
  };
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { EventTrigger } from './EventTrigger';
2
2
  import { PointerEventDelegate } from './types';
3
- export declare type EventCollection = {
3
+ export type EventCollection = {
4
4
  [eventName: string]: EventTrigger<(...args: any[]) => void>;
5
5
  };
6
6
  export declare class InputHandler {
@@ -5,12 +5,12 @@
5
5
  * Delegate for pointer events.
6
6
  * @module @cognite/reveal
7
7
  */
8
- export declare type PointerEventDelegate = (event: PointerEventData) => void;
8
+ export type PointerEventDelegate = (event: PointerEventData) => void;
9
9
  /**
10
10
  * Data typr for PointerEventDelegate.
11
11
  * @module @cognite/reveal
12
12
  */
13
- export declare type PointerEventData = {
13
+ export type PointerEventData = {
14
14
  offsetX: number;
15
15
  offsetY: number;
16
16
  button?: number;
@@ -19,11 +19,11 @@ export declare type PointerEventData = {
19
19
  * Delegate for disposal events.
20
20
  * @module @cognite/reveal
21
21
  */
22
- export declare type DisposedDelegate = () => void;
22
+ export type DisposedDelegate = () => void;
23
23
  /**
24
24
  * Delegate for event triggered when scene is about to be rendered.
25
25
  */
26
- export declare type BeforeSceneRenderedDelegate = (event: {
26
+ export type BeforeSceneRenderedDelegate = (event: {
27
27
  frameNumber: number;
28
28
  renderer: THREE.WebGLRenderer;
29
29
  camera: THREE.PerspectiveCamera;
@@ -32,7 +32,7 @@ export declare type BeforeSceneRenderedDelegate = (event: {
32
32
  * Delegate for event triggered when scene has been rendered.
33
33
  * @module @cognite/reveal
34
34
  */
35
- export declare type SceneRenderedDelegate = (event: {
35
+ export type SceneRenderedDelegate = (event: {
36
36
  frameNumber: number;
37
37
  renderTime: number;
38
38
  renderer: THREE.WebGLRenderer;
@@ -1,7 +1,7 @@
1
1
  import { IntermediateIndexNode } from './IntermediateIndexNode';
2
2
  import { LeafIndexNode } from './LeafIndexNode';
3
3
  import { NumericRange } from '../NumericRange';
4
- export declare type IndexNode = IntermediateIndexNode | LeafIndexNode;
4
+ export type IndexNode = IntermediateIndexNode | LeafIndexNode;
5
5
  export declare class IndexSet {
6
6
  rootNode?: IndexNode;
7
7
  constructor(values?: Iterable<number>);
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- export declare type Vec3 = [number, number, number];
5
- export declare type AABB = {
4
+ export type Vec3 = [number, number, number];
5
+ export type AABB = {
6
6
  min: Vec3;
7
7
  max: Vec3;
8
8
  };
9
- export declare type Mat4 = {
9
+ export type Mat4 = {
10
10
  data: number[];
11
11
  };
@@ -3,6 +3,6 @@
3
3
  */
4
4
  import { ISerializableShape } from './ISerializableShape';
5
5
  import { Mat4 } from '../linalg';
6
- export declare type SerializableBox = ISerializableShape & {
6
+ export type SerializableBox = ISerializableShape & {
7
7
  readonly invMatrix: Mat4;
8
8
  };
@@ -2,6 +2,6 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { ISerializableShape } from './ISerializableShape';
5
- export declare type SerializableCompositeShape = ISerializableShape & {
5
+ export type SerializableCompositeShape = ISerializableShape & {
6
6
  readonly innerShapes: ISerializableShape[];
7
7
  };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { ISerializableShape } from './ISerializableShape';
5
5
  import { Vec3 } from '../linalg';
6
- export declare type SerializableCylinder = ISerializableShape & {
6
+ export type SerializableCylinder = ISerializableShape & {
7
7
  centerA: Vec3;
8
8
  centerB: Vec3;
9
9
  radius: number;
@@ -7,5 +7,5 @@
7
7
  * Note that this doesn't include BigInt64Array and BigUint64Array as
8
8
  * the type of these is not number which causes some type interference problems.
9
9
  */
10
- export declare type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
11
- export declare type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Uint8ClampedArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
10
+ export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
11
+ export type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Uint8ClampedArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
@@ -1,5 +1,5 @@
1
1
  /** Options for worker method params */
2
- export declare type WorkerMethodParamsOptions = {
2
+ export type WorkerMethodParamsOptions = {
3
3
  /** pick transferables from method params */
4
4
  pickTransferablesFromParams?: (params: any) => any[];
5
5
  };