@cognite/reveal 4.0.0-dev.20221114 → 4.0.0-dev.20221116
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/api-entry-points/core.d.ts +1 -1
- package/dist/index.js +102 -98
- package/dist/index.js.map +1 -1
- package/dist/packages/api/src/utilities/ViewStateHelper.d.ts +3 -3
- package/dist/packages/cad-styling/index.d.ts +2 -1
- package/dist/packages/cad-styling/src/NodeAppearance.d.ts +34 -4
- package/dist/packages/cad-styling/src/nodeAppearanceSerialization.d.ts +6 -0
- package/dist/packages/pointcloud-styling/src/PointCloudAppearance.d.ts +2 -1
- package/package.json +6 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cognite3DViewer } from '../public/migration/Cognite3DViewer';
|
|
2
|
-
import { NodeAppearance } from '../../../cad-styling';
|
|
3
2
|
import { CogniteClient } from '@cognite/sdk';
|
|
3
|
+
import { SerializableNodeAppearance } from '../../../cad-styling/src/NodeAppearance';
|
|
4
4
|
export declare type ViewerState = {
|
|
5
5
|
camera?: {
|
|
6
6
|
position: {
|
|
@@ -24,14 +24,14 @@ export declare type ClippingPlanesState = {
|
|
|
24
24
|
constant: number;
|
|
25
25
|
};
|
|
26
26
|
export declare type ModelState = {
|
|
27
|
-
defaultNodeAppearance:
|
|
27
|
+
defaultNodeAppearance: SerializableNodeAppearance;
|
|
28
28
|
modelId: number;
|
|
29
29
|
revisionId: number;
|
|
30
30
|
styledSets: {
|
|
31
31
|
token: string;
|
|
32
32
|
state: any;
|
|
33
33
|
options?: any;
|
|
34
|
-
appearance:
|
|
34
|
+
appearance: SerializableNodeAppearance;
|
|
35
35
|
}[];
|
|
36
36
|
};
|
|
37
37
|
export declare class ViewStateHelper {
|
|
@@ -12,7 +12,8 @@ export { SinglePropertyFilterNodeCollection } from './src/SinglePropertyFilterNo
|
|
|
12
12
|
export { AssetNodeCollection } from './src/AssetNodeCollection';
|
|
13
13
|
export { InvertedNodeCollection } from './src/InvertedNodeCollection';
|
|
14
14
|
export { registerNodeCollectionType, NodeCollectionSerializationContext, NodeCollectionDeserializer } from './src/NodeCollectionDeserializer';
|
|
15
|
-
export { NodeAppearance, DefaultNodeAppearance, NodeOutlineColor } from './src/NodeAppearance';
|
|
15
|
+
export { NodeAppearance, SerializableNodeAppearance, DefaultNodeAppearance, NodeOutlineColor } from './src/NodeAppearance';
|
|
16
|
+
export { toSerializableNodeAppearance, fromSerializableNodeAppearance } from './src/nodeAppearanceSerialization';
|
|
16
17
|
export { NodeAppearanceProvider } from './src/NodeAppearanceProvider';
|
|
17
18
|
export { CdfModelNodeCollectionDataProvider } from './src/CdfModelNodeCollectionDataProvider';
|
|
18
19
|
export { AreaCollection } from './src/prioritized/AreaCollection';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
import { Color } from 'three';
|
|
4
5
|
export declare enum NodeOutlineColor {
|
|
5
6
|
NoOutline = 0,
|
|
6
7
|
White = 1,
|
|
@@ -17,10 +18,10 @@ export declare enum NodeOutlineColor {
|
|
|
17
18
|
*/
|
|
18
19
|
export declare type NodeAppearance = {
|
|
19
20
|
/**
|
|
20
|
-
* Overrides the default color of the node in RGB.
|
|
21
|
-
*
|
|
21
|
+
* Overrides the default color of the node in RGB. Black,
|
|
22
|
+
* or `new Color(0, 0, 0)` means no override.
|
|
22
23
|
*/
|
|
23
|
-
readonly color?:
|
|
24
|
+
readonly color?: Color;
|
|
24
25
|
/**
|
|
25
26
|
* Overrides the visibility of the node.
|
|
26
27
|
*/
|
|
@@ -65,6 +66,35 @@ export declare type NodeAppearance = {
|
|
|
65
66
|
*/
|
|
66
67
|
readonly prioritizedForLoadingHint?: number;
|
|
67
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Type that represents a {@link NodeAppearance} in a serializable format
|
|
71
|
+
*/
|
|
72
|
+
export declare type SerializableNodeAppearance = {
|
|
73
|
+
/**
|
|
74
|
+
* Color as an RGB number tuple, with values in the range [0, 255]
|
|
75
|
+
*/
|
|
76
|
+
readonly color?: [number, number, number];
|
|
77
|
+
/**
|
|
78
|
+
* Visibility, @see {@link NodeAppearance}
|
|
79
|
+
*/
|
|
80
|
+
readonly visible?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to render in front, @see {@link NodeAppearance}
|
|
83
|
+
*/
|
|
84
|
+
readonly renderInFront?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to render ghosted, @see {@link NodeAppearance}
|
|
87
|
+
*/
|
|
88
|
+
readonly renderGhosted?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Outline color, @see {@link NodeAppearance}
|
|
91
|
+
*/
|
|
92
|
+
readonly outlineColor?: NodeOutlineColor;
|
|
93
|
+
/**
|
|
94
|
+
* Prioritized loading hint, @see {@link NodeAppearance}
|
|
95
|
+
*/
|
|
96
|
+
readonly prioritizedForLoadingHint?: number;
|
|
97
|
+
};
|
|
68
98
|
/**
|
|
69
99
|
* A set of default node appearances used in Reveal.
|
|
70
100
|
*/
|
|
@@ -75,7 +105,7 @@ export declare const DefaultNodeAppearance: {
|
|
|
75
105
|
InFront: NodeAppearance;
|
|
76
106
|
Ghosted: NodeAppearance;
|
|
77
107
|
Highlighted: {
|
|
78
|
-
color?:
|
|
108
|
+
color?: Color | undefined;
|
|
79
109
|
visible?: boolean | undefined;
|
|
80
110
|
renderInFront?: boolean | undefined;
|
|
81
111
|
renderGhosted?: boolean | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeAppearance, SerializableNodeAppearance } from './NodeAppearance';
|
|
5
|
+
export declare function fromSerializableNodeAppearance(appearance: SerializableNodeAppearance): NodeAppearance;
|
|
6
|
+
export declare function toSerializableNodeAppearance(appearance: NodeAppearance): SerializableNodeAppearance;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
import { Color } from 'three';
|
|
4
5
|
export declare type PointCloudAppearance = {
|
|
5
|
-
color?:
|
|
6
|
+
color?: Color;
|
|
6
7
|
visible?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare type CompletePointCloudAppearance = Required<PointCloudAppearance>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.20221116",
|
|
4
4
|
"description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.",
|
|
5
5
|
"homepage": "https://github.com/cognitedata/reveal/tree/master/viewer",
|
|
6
6
|
"repository": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"glslify": "7.1.1",
|
|
75
75
|
"glslify-import": "3.1.0",
|
|
76
76
|
"lodash": "4.17.21",
|
|
77
|
-
"loglevel": "1.8.
|
|
77
|
+
"loglevel": "1.8.1",
|
|
78
78
|
"mixpanel-browser": "2.45.0",
|
|
79
79
|
"path-browserify": "1.0.1",
|
|
80
80
|
"proj4": "2.8.0",
|
|
@@ -93,22 +93,18 @@
|
|
|
93
93
|
"@types/jest": "29.2.2",
|
|
94
94
|
"@types/jest-environment-puppeteer": "5.0.3",
|
|
95
95
|
"@types/jest-image-snapshot": "5.1.0",
|
|
96
|
-
"@types/jsdom": "20.0.
|
|
96
|
+
"@types/jsdom": "20.0.1",
|
|
97
97
|
"@types/lodash": "4.14.188",
|
|
98
98
|
"@types/mixpanel-browser": "2.38.0",
|
|
99
99
|
"@types/node": "18.11.3",
|
|
100
|
-
"@types/offscreencanvas": "2019.7.0",
|
|
101
100
|
"@types/proj4": "2.5.2",
|
|
102
101
|
"@types/random-seed": "0.3.3",
|
|
103
102
|
"@types/skmeans": "0.11.3",
|
|
104
103
|
"@types/stats": "0.16.30",
|
|
105
104
|
"@types/tween.js": "18.5.1",
|
|
106
|
-
"@typescript-eslint/eslint-plugin": "5.42.
|
|
107
|
-
"@typescript-eslint/parser": "5.42.
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "5.42.1",
|
|
106
|
+
"@typescript-eslint/parser": "5.42.1",
|
|
108
107
|
"concurrently": "7.5.0",
|
|
109
|
-
"copy-pkg-json-webpack-plugin": "0.0.40",
|
|
110
|
-
"copy-webpack-plugin": "11.0.0",
|
|
111
|
-
"core-js": "3.26.0",
|
|
112
108
|
"cross-env": "7.0.3",
|
|
113
109
|
"cross-var": "1.1.0",
|
|
114
110
|
"dat.gui": "0.7.9",
|
|
@@ -124,7 +120,6 @@
|
|
|
124
120
|
"glob": "8.0.3",
|
|
125
121
|
"glslify-loader": "2.0.0",
|
|
126
122
|
"html-webpack-plugin": "5.5.0",
|
|
127
|
-
"husky": "8.0.1",
|
|
128
123
|
"jest": "29.2.2",
|
|
129
124
|
"jest-canvas-mock": "2.4.0",
|
|
130
125
|
"jest-environment-jsdom": "29.2.2",
|
|
@@ -132,7 +127,6 @@
|
|
|
132
127
|
"jest-image-snapshot": "5.2.0",
|
|
133
128
|
"jest-puppeteer": "6.1.1",
|
|
134
129
|
"jsdom": "20.0.2",
|
|
135
|
-
"lint-staged": "13.0.3",
|
|
136
130
|
"moq.ts": "9.0.2",
|
|
137
131
|
"nock": "13.2.9",
|
|
138
132
|
"prettier": "2.7.1",
|
|
@@ -142,20 +136,16 @@
|
|
|
142
136
|
"raw-loader": "4.0.2",
|
|
143
137
|
"remove-files-webpack-plugin": "1.5.0",
|
|
144
138
|
"resize-observer-polyfill": "1.5.1",
|
|
145
|
-
"rimraf": "3.0.2",
|
|
146
|
-
"run-script-os": "1.1.6",
|
|
147
139
|
"shx": "0.3.4",
|
|
148
140
|
"stats.js": "0.17.0",
|
|
149
141
|
"ts-jest": "29.0.3",
|
|
150
142
|
"ts-loader": "9.4.1",
|
|
151
|
-
"tsc-alias": "1.7.
|
|
143
|
+
"tsc-alias": "1.7.1",
|
|
152
144
|
"typescript": "4.8.4",
|
|
153
145
|
"wasm-pack": "0.10.3",
|
|
154
146
|
"webpack": "5.74.0",
|
|
155
|
-
"webpack-bundle-analyzer": "4.6.1",
|
|
156
147
|
"webpack-cli": "4.10.0",
|
|
157
148
|
"webpack-dev-server": "4.11.1",
|
|
158
|
-
"webpack-log": "3.0.2",
|
|
159
149
|
"webpack-node-externals": "3.0.0",
|
|
160
150
|
"whatwg-fetch": "3.6.2",
|
|
161
151
|
"workerize-loader": "2.0.2"
|
|
@@ -169,11 +159,6 @@
|
|
|
169
159
|
"glslify-import"
|
|
170
160
|
]
|
|
171
161
|
},
|
|
172
|
-
"husky": {
|
|
173
|
-
"hooks": {
|
|
174
|
-
"pre-push": "yarn run lint"
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
162
|
"files": [
|
|
178
163
|
"./dist/*"
|
|
179
164
|
]
|