@webviz/subsurface-viewer 0.0.1-alpha.1 → 0.0.2-alpha.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/package.json +5 -2
- package/package.json +6 -3
- package/src/DashSubsurfaceViewer.tsx +0 -270
- package/src/SubsurfaceViewer.stories.tsx +0 -449
- package/src/SubsurfaceViewer.test.tsx +0 -98
- package/src/SubsurfaceViewer.tsx +0 -356
- package/src/__snapshots__/SubsurfaceViewer.test.tsx.snap +0 -178
- package/src/assets/glTF/north_arrow/scene.bin +0 -0
- package/src/assets/glTF/north_arrow/scene.gltf +0 -315
- package/src/assets/glTF/north_arrow/textures/Arrow5_baseColor.png +0 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_metallicRoughness.png +0 -0
- package/src/assets/glTF/north_arrow/textures/Arrow5_normal.png +0 -0
- package/src/components/ColorLegend.test.tsx +0 -32
- package/src/components/ColorLegend.tsx +0 -80
- package/src/components/ColorLegends.test.tsx +0 -97
- package/src/components/ColorLegends.tsx +0 -46
- package/src/components/DistanceScale.stories.tsx +0 -28
- package/src/components/DistanceScale.test.tsx +0 -36
- package/src/components/DistanceScale.tsx +0 -84
- package/src/components/InfoCard.test.tsx +0 -110
- package/src/components/InfoCard.tsx +0 -263
- package/src/components/Map.test.tsx +0 -142
- package/src/components/Map.tsx +0 -1435
- package/src/components/StatusIndicator.test.tsx +0 -14
- package/src/components/StatusIndicator.tsx +0 -38
- package/src/components/ViewAnnotation.tsx +0 -16
- package/src/components/ViewFooter.test.tsx +0 -12
- package/src/components/ViewFooter.tsx +0 -30
- package/src/components/__snapshots__/ColorLegends.test.tsx.snap +0 -15
- package/src/components/__snapshots__/DistanceScale.test.tsx.snap +0 -33
- package/src/components/__snapshots__/InfoCard.test.tsx.snap +0 -561
- package/src/components/__snapshots__/Map.test.tsx.snap +0 -119
- package/src/components/__snapshots__/StatusIndicator.test.tsx.snap +0 -3
- package/src/components/__snapshots__/ViewFooter.test.tsx.snap +0 -7
- package/src/components/settings/DrawModeSelector.test.tsx +0 -45
- package/src/components/settings/DrawModeSelector.tsx +0 -58
- package/src/components/settings/DrawModeSelector_performance.test.tsx +0 -35
- package/src/components/settings/LayerProperty.test.tsx +0 -35
- package/src/components/settings/LayerProperty.tsx +0 -153
- package/src/components/settings/LayerProperty_performance.test.tsx +0 -39
- package/src/components/settings/LayerSettingsButton.test.tsx +0 -133
- package/src/components/settings/LayerSettingsButton.tsx +0 -95
- package/src/components/settings/LayersButton.test.tsx +0 -102
- package/src/components/settings/LayersButton.tsx +0 -97
- package/src/components/settings/NumericInput.test.tsx +0 -25
- package/src/components/settings/NumericInput.tsx +0 -67
- package/src/components/settings/Settings.tsx +0 -71
- package/src/components/settings/SliderInput.test.tsx +0 -28
- package/src/components/settings/SliderInput.tsx +0 -71
- package/src/components/settings/ToggleButton.test.tsx +0 -25
- package/src/components/settings/ToggleButton.tsx +0 -53
- package/src/components/settings/__snapshots__/DrawModeSelector.test.tsx.snap +0 -124
- package/src/components/settings/__snapshots__/LayerProperty.test.tsx.snap +0 -124
- package/src/components/settings/__snapshots__/LayerSettingsButton.test.tsx.snap +0 -36
- package/src/components/settings/__snapshots__/LayersButton.test.tsx.snap +0 -83
- package/src/components/settings/__snapshots__/NumericInput.test.tsx.snap +0 -123
- package/src/components/settings/__snapshots__/SliderInput.test.tsx.snap +0 -244
- package/src/components/settings/__snapshots__/ToggleButton.test.tsx.snap +0 -182
- package/src/custom.d.ts +0 -9
- package/src/index.ts +0 -5
- package/src/inputSchema/ColorTables.json +0 -51
- package/src/inputSchema/FaultPolygons.json +0 -80
- package/src/inputSchema/Grid.json +0 -39
- package/src/inputSchema/PieChart.json +0 -72
- package/src/inputSchema/WellLog.json +0 -126
- package/src/inputSchema/WellLogTemplate.json +0 -136
- package/src/inputSchema/WellLogs.json +0 -5
- package/src/inputSchema/Wells.json +0 -106
- package/src/inputSchema/schemaValidationUtil.tsx +0 -55
- package/src/inputSchema/validator.tsx +0 -72
- package/src/inputSchema/wellCompletions.json +0 -108
- package/src/layers/BoxSelectionLayer/boxSelectionLayer.stories.tsx +0 -172
- package/src/layers/BoxSelectionLayer/boxSelectionLayer.tsx +0 -136
- package/src/layers/axes/axes-fragment.glsl.ts +0 -15
- package/src/layers/axes/axesLayer.stories.tsx +0 -87
- package/src/layers/axes/axesLayer.ts +0 -692
- package/src/layers/axes/boxLayer.ts +0 -71
- package/src/layers/axes/grid-vertex.glsl.ts +0 -14
- package/src/layers/axes2d/axes2DLayer.stories.tsx +0 -150
- package/src/layers/axes2d/axes2DLayer.ts +0 -841
- package/src/layers/axes2d/font-atlas.png +0 -0
- package/src/layers/axes2d/label-fragment.glsl.js +0 -37
- package/src/layers/axes2d/label-vertex.glsl.js +0 -20
- package/src/layers/axes2d/line-fragment.glsl.js +0 -14
- package/src/layers/axes2d/line-vertex.glsl.js +0 -13
- package/src/layers/colormap/colormap.fs.glsl.ts +0 -42
- package/src/layers/colormap/colormapLayer.ts +0 -247
- package/src/layers/drawing/drawingLayer.tsx +0 -256
- package/src/layers/fault_polygons/faultPolygonsLayer.ts +0 -54
- package/src/layers/grid3d/fragment.fs.glsl.ts +0 -109
- package/src/layers/grid3d/fragment_lines.glsl.ts +0 -21
- package/src/layers/grid3d/grid3dLayer.stories.tsx +0 -172
- package/src/layers/grid3d/grid3dLayer.ts +0 -248
- package/src/layers/grid3d/privateLayer.ts +0 -292
- package/src/layers/grid3d/vertex.glsl.ts +0 -43
- package/src/layers/grid3d/vertex_lines.glsl.ts +0 -15
- package/src/layers/grid3d/webworker.ts +0 -173
- package/src/layers/hillshading2d/hillshading2d.fs.glsl.ts +0 -62
- package/src/layers/hillshading2d/hillshading2dLayer.ts +0 -172
- package/src/layers/index.ts +0 -35
- package/src/layers/intersection/intersectionView.stories.tsx +0 -294
- package/src/layers/intersection/unfoldedGeoJsonLayer.ts +0 -92
- package/src/layers/map/fragment.fs.glsl.ts +0 -127
- package/src/layers/map/fragment_lines.glsl.ts +0 -21
- package/src/layers/map/mapLayer.stories.tsx +0 -1369
- package/src/layers/map/mapLayer.ts +0 -470
- package/src/layers/map/privateMapLayer.ts +0 -317
- package/src/layers/map/vertex.glsl.ts +0 -45
- package/src/layers/map/vertex_lines.glsl.ts +0 -15
- package/src/layers/map/webworker.ts +0 -479
- package/src/layers/northarrow/northArrow.stories.tsx +0 -108
- package/src/layers/northarrow/northArrow3DLayer.ts +0 -204
- package/src/layers/northarrow/northarrow-fragment.glsl.js +0 -14
- package/src/layers/northarrow/northarrow-vertex.glsl.js +0 -13
- package/src/layers/piechart/fragment.glsl.js +0 -42
- package/src/layers/piechart/pieChartLayer.ts +0 -246
- package/src/layers/piechart/vertex.glsl.js +0 -42
- package/src/layers/points/pointsLayer.stories.tsx +0 -141
- package/src/layers/points/pointsLayer.ts +0 -143
- package/src/layers/polylines/polylinesLayer.stories.tsx +0 -144
- package/src/layers/polylines/polylinesLayer.ts +0 -263
- package/src/layers/selectable_geojson/selectableGeoJsonLayer.ts +0 -25
- package/src/layers/shader_modules/decoder.fs.glsl.ts +0 -41
- package/src/layers/shader_modules/decoder.ts +0 -46
- package/src/layers/shader_modules/index.ts +0 -1
- package/src/layers/terrain/map3DLayer.stories.tsx +0 -340
- package/src/layers/terrain/map3DLayer.ts +0 -556
- package/src/layers/terrain/terrainMapLayer.ts +0 -334
- package/src/layers/terrain/terrainmap.fs.glsl.ts +0 -134
- package/src/layers/triangle/fragment.fs.glsl.ts +0 -126
- package/src/layers/triangle/fragment_lines.glsl.ts +0 -21
- package/src/layers/triangle/privateTriangleLayer.ts +0 -203
- package/src/layers/triangle/test_data/surfacePoints.ts +0 -4344
- package/src/layers/triangle/test_data/surfaceTriangles.ts +0 -7392
- package/src/layers/triangle/triangleLayer.stories.tsx +0 -191
- package/src/layers/triangle/triangleLayer.ts +0 -273
- package/src/layers/triangle/vertex.glsl.ts +0 -35
- package/src/layers/triangle/vertex_lines.glsl.ts +0 -15
- package/src/layers/triangle/webworker.ts +0 -165
- package/src/layers/utils/glsl.d.ts +0 -4
- package/src/layers/utils/layerTools.ts +0 -182
- package/src/layers/utils/propertyMapTools.ts +0 -43
- package/src/layers/wells/utils/spline.ts +0 -318
- package/src/layers/wells/wellsLayer.stories.tsx +0 -625
- package/src/layers/wells/wellsLayer.ts +0 -1377
- package/src/redux/actions.ts +0 -8
- package/src/redux/reducer.ts +0 -43
- package/src/redux/store.ts +0 -15
- package/src/redux/types.ts +0 -114
- package/src/storybook/SubsurfaceViewer.stories.jsx +0 -644
- package/src/storybook/components/InfoCard.stories.jsx +0 -39
- package/src/storybook/components/colorLegends/ContinuousLegend.stories.jsx +0 -32
- package/src/storybook/components/colorLegends/DiscreteLegend.stories.jsx +0 -33
- package/src/storybook/components/colorLegends/IndividualScaleForMap.stories.jsx +0 -99
- package/src/storybook/components/colorLegends/SingleScaleForMap.stories.jsx +0 -120
- package/src/storybook/components/settings/LayerSettingsButton.stories.jsx +0 -34
- package/src/storybook/components/settings/NumericInput.stories.jsx +0 -17
- package/src/storybook/components/settings/ToggleButton.stories.jsx +0 -16
- package/src/storybook/schemaValidation/sampleData.js +0 -177
- package/src/storybook/schemaValidation/schemaValidation.stories.jsx +0 -91
- package/src/test/TestWrapper.tsx +0 -13
- package/src/utils/configuration.ts +0 -61
- package/src/utils/fit-bounds.js +0 -85
- package/src/utils/measurement.ts +0 -61
- package/src/utils/northArrow.ts +0 -4
- package/src/utils/specExtractor.ts +0 -36
- package/src/viewports/index.js +0 -1
- package/src/viewports/intersectionViewport.ts +0 -137
- package/src/views/index.js +0 -1
- package/src/views/intersectionView.ts +0 -38
- package/tsconfig.json +0 -7
|
@@ -1,1369 +0,0 @@
|
|
|
1
|
-
import React, { SyntheticEvent } from "react";
|
|
2
|
-
import { styled } from "@mui/material/styles";
|
|
3
|
-
import { ViewsType, useHoverInfo } from "../../components/Map";
|
|
4
|
-
import SubsurfaceViewer from "../../SubsurfaceViewer";
|
|
5
|
-
import InfoCard from "../../components/InfoCard";
|
|
6
|
-
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
7
|
-
import { Slider } from "@mui/material";
|
|
8
|
-
import {
|
|
9
|
-
ContinuousLegend,
|
|
10
|
-
ColorLegend,
|
|
11
|
-
createColorMapFunction,
|
|
12
|
-
} from "@emerson-eps/color-tables";
|
|
13
|
-
import { View } from "../../../..";
|
|
14
|
-
import MapLayer from "./mapLayer";
|
|
15
|
-
import Axes2DLayer from "../axes2d/axes2DLayer";
|
|
16
|
-
import { ViewFooter } from "../../components/ViewFooter";
|
|
17
|
-
|
|
18
|
-
const PREFIX = "MapLayer3dPng";
|
|
19
|
-
|
|
20
|
-
const classes = {
|
|
21
|
-
main: `${PREFIX}-main`,
|
|
22
|
-
legend: `${PREFIX}-legend`,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const Root = styled("div")({
|
|
26
|
-
[`& .${classes.main}`]: {
|
|
27
|
-
height: 500,
|
|
28
|
-
border: "1px solid black",
|
|
29
|
-
position: "relative",
|
|
30
|
-
},
|
|
31
|
-
[`& .${classes.legend}`]: {
|
|
32
|
-
width: 100,
|
|
33
|
-
position: "absolute",
|
|
34
|
-
top: "0",
|
|
35
|
-
right: "0",
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export default {
|
|
40
|
-
component: SubsurfaceViewer,
|
|
41
|
-
title: "SubsurfaceViewer / Map Layer",
|
|
42
|
-
} as ComponentMeta<typeof SubsurfaceViewer>;
|
|
43
|
-
|
|
44
|
-
type NumberQuad = [number, number, number, number];
|
|
45
|
-
|
|
46
|
-
const valueRange = [-3071, 41048];
|
|
47
|
-
|
|
48
|
-
const defaultMapLayerProps = {
|
|
49
|
-
id: "default_map",
|
|
50
|
-
meshData: "hugin_depth_25_m.float32",
|
|
51
|
-
frame: {
|
|
52
|
-
origin: [432150, 6475800] as [number, number],
|
|
53
|
-
count: [291, 229] as [number, number],
|
|
54
|
-
increment: [25, 25] as [number, number],
|
|
55
|
-
rotDeg: 0,
|
|
56
|
-
},
|
|
57
|
-
propertiesData: "kh_netmap_25_m.float32",
|
|
58
|
-
ZIncreasingDownwards: true,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const defaultMapLayer = new MapLayer({ ...defaultMapLayerProps });
|
|
62
|
-
|
|
63
|
-
const wellsLayer = {
|
|
64
|
-
"@@type": "WellsLayer",
|
|
65
|
-
id: "wells-layer",
|
|
66
|
-
data: "https://raw.githubusercontent.com/equinor/webviz-subsurface-components/master/react/src/demo/example-data/volve_wells.json",
|
|
67
|
-
logData:
|
|
68
|
-
"https://raw.githubusercontent.com/equinor/webviz-subsurface-components/master/react/src/demo/example-data/volve_logs.json",
|
|
69
|
-
logrunName: "BLOCKING",
|
|
70
|
-
logName: "ZONELOG",
|
|
71
|
-
logColor: "Stratigraphy",
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// Example using "Map" layer. Uses float32 mesh and properties binary arrays. Not PNG.
|
|
75
|
-
const meshMapLayerBig = {
|
|
76
|
-
"@@type": "MapLayer",
|
|
77
|
-
id: "mesh-layer",
|
|
78
|
-
meshUrl: "hugin_depth_5_m.float32",
|
|
79
|
-
frame: {
|
|
80
|
-
origin: [432150, 6475800],
|
|
81
|
-
count: [1451, 1141],
|
|
82
|
-
increment: [5, 5],
|
|
83
|
-
rotDeg: 0,
|
|
84
|
-
},
|
|
85
|
-
propertiesUrl: "kh_netmap_5_m.float32",
|
|
86
|
-
contours: [0, 100],
|
|
87
|
-
isContoursDepth: true,
|
|
88
|
-
gridLines: false,
|
|
89
|
-
material: true,
|
|
90
|
-
colorMapName: "Physics",
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// Small test map. 4 by 5 cells. One inactive node => 4 inactive cells.
|
|
94
|
-
// property values and depth values both from 0 to 29.
|
|
95
|
-
// Useful for debugging.
|
|
96
|
-
const smallLayer = {
|
|
97
|
-
"@@type": "MapLayer",
|
|
98
|
-
id: "mesh-layer",
|
|
99
|
-
meshUrl: "small_depths.float32",
|
|
100
|
-
frame: {
|
|
101
|
-
origin: [459840.7, 5929826.1],
|
|
102
|
-
count: [5, 6],
|
|
103
|
-
increment: [175, 150],
|
|
104
|
-
rotDeg: 0,
|
|
105
|
-
},
|
|
106
|
-
propertiesUrl: "small_properties.float32",
|
|
107
|
-
gridLines: true,
|
|
108
|
-
material: false,
|
|
109
|
-
// black to white colors.
|
|
110
|
-
colorMapFunction: (value: number) => [
|
|
111
|
-
value * 255,
|
|
112
|
-
value * 255,
|
|
113
|
-
value * 255,
|
|
114
|
-
],
|
|
115
|
-
colorMapRange: [0, 29],
|
|
116
|
-
colorMapClampColor: [255, 0, 0],
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
// This layer has as many property values as depth values hence each cell will be interpolated in color.
|
|
120
|
-
const nodeCenteredPropertiesLayer = {
|
|
121
|
-
"@@type": "MapLayer",
|
|
122
|
-
id: "node-centered-layer",
|
|
123
|
-
|
|
124
|
-
meshUrl:
|
|
125
|
-
"data:text/plain;base64,zczMP5qZ2T9mZuY/MzPzP5qZmT9mZqY/MzOzPwAAwD/NzEw/ZmZmPwAAgD/NzIw/zczMPgAAAD+amRk/MzMzPwAAAIDNzMw9zcxMPpqZmT4=",
|
|
126
|
-
frame: {
|
|
127
|
-
origin: [0, 0],
|
|
128
|
-
count: [4, 5],
|
|
129
|
-
increment: [1, 1],
|
|
130
|
-
rotDeg: 0,
|
|
131
|
-
},
|
|
132
|
-
propertiesUrl:
|
|
133
|
-
"data:text/plain;base64,ZmYmQM3MLEAzMzNAmpk5QM3MDEAzMxNAmpkZQAAAIEBmZuY/MzPzPwAAAEBmZgZAMzOzPwAAwD/NzMw/mpnZPwAAgD/NzIw/mpmZP2Zmpj8=",
|
|
134
|
-
gridLines: true,
|
|
135
|
-
material: true,
|
|
136
|
-
// black to white colors.
|
|
137
|
-
colorMapFunction: (value: number) => [
|
|
138
|
-
value * 255,
|
|
139
|
-
value * 255,
|
|
140
|
-
value * 255,
|
|
141
|
-
],
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
const nodeCenteredPropertiesLayerWithArrayInput = {
|
|
145
|
-
"@@type": "MapLayer",
|
|
146
|
-
id: "node-centered-layer",
|
|
147
|
-
frame: {
|
|
148
|
-
origin: [0, 0],
|
|
149
|
-
count: [4, 5],
|
|
150
|
-
increment: [1, 1],
|
|
151
|
-
rotDeg: 0,
|
|
152
|
-
},
|
|
153
|
-
meshData: Array.from(Array(20)).map(() => Math.random()), // Array of 20 random numbers
|
|
154
|
-
propertiesData: Array.from(Array(20)).map(() => Math.random()),
|
|
155
|
-
gridLines: true,
|
|
156
|
-
material: true,
|
|
157
|
-
// black to white colors.
|
|
158
|
-
colorMapFunction: (value: number) => [
|
|
159
|
-
value * 255,
|
|
160
|
-
value * 255,
|
|
161
|
-
value * 255,
|
|
162
|
-
],
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
// This layer has as (nx-1)*(ny-1) property values and depth values are nx*ny hence each cell will be fixed in color.
|
|
166
|
-
const cellCenteredPropertiesLayer = {
|
|
167
|
-
"@@type": "MapLayer",
|
|
168
|
-
id: "cell-centered-layer",
|
|
169
|
-
|
|
170
|
-
/*eslint-disable */
|
|
171
|
-
// One depth pr node
|
|
172
|
-
meshData: [
|
|
173
|
-
1.6, 1.7, 1.8, 1.9,
|
|
174
|
-
1.2, 1.3, 1.4, 1.5,
|
|
175
|
-
0.8, 0.9, 1.0, 1.1,
|
|
176
|
-
0.4, 0.5, 0.6, 0.7,
|
|
177
|
-
0.0, 0.1, 0.2, 0.3 ],
|
|
178
|
-
|
|
179
|
-
// One property pr cell.
|
|
180
|
-
propertiesData: [0.9, 1.0, 1.1,
|
|
181
|
-
0.6, 0.7, 0.8,
|
|
182
|
-
0.3, 0.4, 0.5,
|
|
183
|
-
0.0, 0.1, 0.2],
|
|
184
|
-
/*eslint-enable */
|
|
185
|
-
|
|
186
|
-
frame: {
|
|
187
|
-
origin: [0, 0],
|
|
188
|
-
count: [4, 5],
|
|
189
|
-
increment: [1, 1],
|
|
190
|
-
rotDeg: 0,
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
gridLines: true,
|
|
194
|
-
material: true,
|
|
195
|
-
// black to white colors.
|
|
196
|
-
colorMapFunction: (value: number) => [
|
|
197
|
-
value * 255,
|
|
198
|
-
value * 255,
|
|
199
|
-
value * 255,
|
|
200
|
-
],
|
|
201
|
-
smoothShading: true,
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
// Example using "Map" layer. Uses PNG float for mesh and properties.
|
|
205
|
-
const meshMapLayerPng = {
|
|
206
|
-
"@@type": "MapLayer",
|
|
207
|
-
id: "mesh-layer",
|
|
208
|
-
meshUrl: "hugin_depth_25_m.png",
|
|
209
|
-
frame: {
|
|
210
|
-
origin: [432150, 6475800],
|
|
211
|
-
count: [291, 229],
|
|
212
|
-
increment: [25, 25],
|
|
213
|
-
rotDeg: 0,
|
|
214
|
-
},
|
|
215
|
-
propertiesUrl: "kh_netmap_25_m.png",
|
|
216
|
-
contours: [0, 100],
|
|
217
|
-
isContoursDepth: true,
|
|
218
|
-
gridLines: false,
|
|
219
|
-
material: true,
|
|
220
|
-
smoothShading: true,
|
|
221
|
-
colorMapName: "Physics",
|
|
222
|
-
ZIncreasingDownwards: true,
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
// Example using "Map" layer. Uses float32 float for mesh and properties.
|
|
226
|
-
const meshMapLayerFloat32 = {
|
|
227
|
-
"@@type": "MapLayer",
|
|
228
|
-
id: "mesh-layer",
|
|
229
|
-
meshUrl: "hugin_depth_25_m.float32",
|
|
230
|
-
frame: {
|
|
231
|
-
origin: [432150, 6475800],
|
|
232
|
-
count: [291, 229],
|
|
233
|
-
increment: [25, 25],
|
|
234
|
-
rotDeg: 0,
|
|
235
|
-
},
|
|
236
|
-
propertiesUrl: "kh_netmap_25_m.float32",
|
|
237
|
-
contours: [0, 100],
|
|
238
|
-
isContoursDepth: true,
|
|
239
|
-
gridLines: false,
|
|
240
|
-
material: false,
|
|
241
|
-
colorMapName: "Physics",
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
// Example rotated layer
|
|
245
|
-
const meshMapLayerRotated = {
|
|
246
|
-
"@@type": "MapLayer",
|
|
247
|
-
id: "mesh-layer",
|
|
248
|
-
meshUrl: "hugin_depth_25_m.float32",
|
|
249
|
-
frame: {
|
|
250
|
-
origin: [432150, 6475800],
|
|
251
|
-
count: [291, 229],
|
|
252
|
-
increment: [25, 25],
|
|
253
|
-
rotDeg: 30,
|
|
254
|
-
//rotPoint: [436000, 6478000],
|
|
255
|
-
},
|
|
256
|
-
propertiesUrl: "kh_netmap_25_m.float32",
|
|
257
|
-
contours: [0, 100],
|
|
258
|
-
isContoursDepth: true,
|
|
259
|
-
material: false,
|
|
260
|
-
colorMapName: "Physics",
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
const axes_hugin = {
|
|
264
|
-
"@@type": "AxesLayer",
|
|
265
|
-
id: "axes-layer2",
|
|
266
|
-
bounds: [432150, 6475800, 2000, 439400, 6481500, 3500],
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
const north_arrow_layer = {
|
|
270
|
-
"@@type": "NorthArrow3DLayer",
|
|
271
|
-
id: "north-arrow-layer",
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
const defaultArgs = {
|
|
275
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
const defaultParameters = {
|
|
279
|
-
docs: {
|
|
280
|
-
inlineStories: false,
|
|
281
|
-
iframeHeight: 500,
|
|
282
|
-
},
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
function gradientColorMap(x: number) {
|
|
286
|
-
return [255 - x * 255, 255 - x * 100, 255 * x];
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function nearestColorMap(x: number) {
|
|
290
|
-
if (x > 0.5) return [100, 255, 255];
|
|
291
|
-
else if (x > 0.1) return [255, 100, 255];
|
|
292
|
-
return [255, 255, 100];
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function breakpointColorMap(x: number, breakpoint: number) {
|
|
296
|
-
if (x > breakpoint) return [0, 50, 200];
|
|
297
|
-
return [255, 255, 0];
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
function createColorMap(breakpoint: number) {
|
|
301
|
-
return (value: number) => breakpointColorMap(value, breakpoint);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
export const MapLayer3dPng: ComponentStory<typeof SubsurfaceViewer> = (
|
|
305
|
-
args
|
|
306
|
-
) => {
|
|
307
|
-
return <SubsurfaceViewer {...args} />;
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
MapLayer3dPng.args = {
|
|
311
|
-
id: "map",
|
|
312
|
-
layers: [axes_hugin, meshMapLayerPng, north_arrow_layer],
|
|
313
|
-
|
|
314
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
315
|
-
views: {
|
|
316
|
-
layout: [1, 1],
|
|
317
|
-
viewports: [
|
|
318
|
-
{
|
|
319
|
-
id: "view_1",
|
|
320
|
-
show3D: true,
|
|
321
|
-
},
|
|
322
|
-
],
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
MapLayer3dPng.parameters = {
|
|
327
|
-
docs: {
|
|
328
|
-
...defaultParameters.docs,
|
|
329
|
-
description: {
|
|
330
|
-
story: "Example using png as mesh and properties data.",
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
export const MapLayer3dPngNoBounds: ComponentStory<typeof SubsurfaceViewer> = (
|
|
336
|
-
args
|
|
337
|
-
) => {
|
|
338
|
-
return <SubsurfaceViewer {...args} />;
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
MapLayer3dPngNoBounds.args = {
|
|
342
|
-
id: "map",
|
|
343
|
-
layers: [axes_hugin, meshMapLayerPng, north_arrow_layer],
|
|
344
|
-
views: {
|
|
345
|
-
layout: [1, 1],
|
|
346
|
-
viewports: [
|
|
347
|
-
{
|
|
348
|
-
id: "view_1",
|
|
349
|
-
show3D: true,
|
|
350
|
-
},
|
|
351
|
-
],
|
|
352
|
-
},
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
MapLayer3dPngNoBounds.parameters = {
|
|
356
|
-
docs: {
|
|
357
|
-
...defaultParameters.docs,
|
|
358
|
-
description: {
|
|
359
|
-
story: "If no bounds are specified will results in automatically calcultated camera. Will look at center of bounding box of the data",
|
|
360
|
-
},
|
|
361
|
-
},
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
export const ConstantColor: ComponentStory<typeof SubsurfaceViewer> = (
|
|
365
|
-
args
|
|
366
|
-
) => {
|
|
367
|
-
return <SubsurfaceViewer {...args} />;
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
ConstantColor.args = {
|
|
371
|
-
id: "map",
|
|
372
|
-
layers: [
|
|
373
|
-
axes_hugin,
|
|
374
|
-
{
|
|
375
|
-
...meshMapLayerPng,
|
|
376
|
-
colorMapFunction: [0, 255, 0], // Use constant color instead of function
|
|
377
|
-
},
|
|
378
|
-
north_arrow_layer,
|
|
379
|
-
],
|
|
380
|
-
|
|
381
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
382
|
-
views: {
|
|
383
|
-
layout: [1, 1],
|
|
384
|
-
viewports: [
|
|
385
|
-
{
|
|
386
|
-
id: "view_1",
|
|
387
|
-
show3D: true,
|
|
388
|
-
},
|
|
389
|
-
],
|
|
390
|
-
},
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
ConstantColor.parameters = {
|
|
394
|
-
docs: {
|
|
395
|
-
...defaultParameters.docs,
|
|
396
|
-
description: {
|
|
397
|
-
story: 'Example using the property "colorMapFunction" to color the surface in one color only',
|
|
398
|
-
},
|
|
399
|
-
},
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
export const ScaleZ: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
403
|
-
const [layers, setLayers] = React.useState([
|
|
404
|
-
axes_hugin,
|
|
405
|
-
meshMapLayerPng,
|
|
406
|
-
north_arrow_layer,
|
|
407
|
-
]);
|
|
408
|
-
|
|
409
|
-
const handleChange = () => {
|
|
410
|
-
setLayers([axes_hugin, meshMapLayerPng, wellsLayer, north_arrow_layer]);
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
const props = {
|
|
414
|
-
...args,
|
|
415
|
-
layers,
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
return (
|
|
419
|
-
<Root>
|
|
420
|
-
<div className={classes.main}>
|
|
421
|
-
<SubsurfaceViewer {...props} />
|
|
422
|
-
</div>
|
|
423
|
-
<button onClick={handleChange}> Add layer </button>
|
|
424
|
-
</Root>
|
|
425
|
-
);
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
ScaleZ.args = {
|
|
429
|
-
id: "ScaleZ",
|
|
430
|
-
layers: [axes_hugin, meshMapLayerPng, wellsLayer, north_arrow_layer],
|
|
431
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
432
|
-
|
|
433
|
-
views: {
|
|
434
|
-
layout: [1, 2],
|
|
435
|
-
viewports: [
|
|
436
|
-
{
|
|
437
|
-
id: "view_1",
|
|
438
|
-
layerIds: ["axes-layer2", "mesh-layer", "north-arrow-layer"],
|
|
439
|
-
show3D: true,
|
|
440
|
-
isSync: true,
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
id: "view_2",
|
|
444
|
-
layerIds: ["axes-layer2", "wells-layer", "north-arrow-layer"],
|
|
445
|
-
show3D: true,
|
|
446
|
-
isSync: true,
|
|
447
|
-
},
|
|
448
|
-
],
|
|
449
|
-
},
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
ScaleZ.parameters = {
|
|
453
|
-
docs: {
|
|
454
|
-
...defaultParameters.docs,
|
|
455
|
-
description: {
|
|
456
|
-
story: "Example scaling in z direction using arrow up/down buttons.",
|
|
457
|
-
},
|
|
458
|
-
},
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
export const ResetCameraProperty: ComponentStory<typeof SubsurfaceViewer> = (
|
|
462
|
-
args
|
|
463
|
-
) => {
|
|
464
|
-
const [home, setHome] = React.useState<number>(0);
|
|
465
|
-
const [camera, setCamera] = React.useState({
|
|
466
|
-
rotationOrbit: 0,
|
|
467
|
-
rotationX: 45,
|
|
468
|
-
target: [435775, 6477650, -1750],
|
|
469
|
-
zoom: -3.8,
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
const handleChange1 = () => {
|
|
473
|
-
setHome(home + 1);
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
const handleChange2 = () => {
|
|
477
|
-
setCamera({ ...camera, rotationOrbit: camera.rotationOrbit + 5 });
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
const props = {
|
|
481
|
-
...args,
|
|
482
|
-
cameraPosition: camera,
|
|
483
|
-
triggerHome: home,
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
return (
|
|
487
|
-
<Root>
|
|
488
|
-
<div className={classes.main}>
|
|
489
|
-
<SubsurfaceViewer {...props} />
|
|
490
|
-
</div>
|
|
491
|
-
<button onClick={handleChange1}> Reset Camera to bounds</button>
|
|
492
|
-
<button onClick={handleChange2}> Change Camera </button>
|
|
493
|
-
</Root>
|
|
494
|
-
);
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
ResetCameraProperty.args = {
|
|
498
|
-
id: "ResetCameraProperty",
|
|
499
|
-
layers: [axes_hugin, meshMapLayerPng, north_arrow_layer],
|
|
500
|
-
|
|
501
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
502
|
-
cameraPosition: {
|
|
503
|
-
rotationOrbit: 0,
|
|
504
|
-
rotationX: 80,
|
|
505
|
-
target: [435775, 6478650, -1750],
|
|
506
|
-
zoom: -3.5109619192773796,
|
|
507
|
-
},
|
|
508
|
-
views: {
|
|
509
|
-
layout: [1, 1],
|
|
510
|
-
viewports: [
|
|
511
|
-
{
|
|
512
|
-
id: "view_1",
|
|
513
|
-
show3D: true,
|
|
514
|
-
},
|
|
515
|
-
],
|
|
516
|
-
},
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
ResetCameraProperty.parameters = {
|
|
520
|
-
docs: {
|
|
521
|
-
...defaultParameters.docs,
|
|
522
|
-
description: {
|
|
523
|
-
story: `Example using optional 'triggerHome' property.
|
|
524
|
-
When this property is changed camera will reset to home position.
|
|
525
|
-
Using the button the property will change its value.`,
|
|
526
|
-
},
|
|
527
|
-
},
|
|
528
|
-
};
|
|
529
|
-
|
|
530
|
-
export const AddLayer: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
531
|
-
const [layers, setLayers] = React.useState([
|
|
532
|
-
axes_hugin,
|
|
533
|
-
meshMapLayerPng,
|
|
534
|
-
north_arrow_layer,
|
|
535
|
-
]);
|
|
536
|
-
|
|
537
|
-
const handleChange = () => {
|
|
538
|
-
setLayers([axes_hugin, meshMapLayerPng, wellsLayer, north_arrow_layer]);
|
|
539
|
-
};
|
|
540
|
-
|
|
541
|
-
const props = {
|
|
542
|
-
...args,
|
|
543
|
-
layers,
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
return (
|
|
547
|
-
<Root>
|
|
548
|
-
<div className={classes.main}>
|
|
549
|
-
<SubsurfaceViewer {...props} />
|
|
550
|
-
</div>
|
|
551
|
-
<button onClick={handleChange}> Add layer </button>
|
|
552
|
-
</Root>
|
|
553
|
-
);
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
AddLayer.args = {
|
|
557
|
-
id: "map",
|
|
558
|
-
|
|
559
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
560
|
-
views: {
|
|
561
|
-
layout: [1, 1],
|
|
562
|
-
viewports: [
|
|
563
|
-
{
|
|
564
|
-
id: "view_1",
|
|
565
|
-
show3D: true,
|
|
566
|
-
},
|
|
567
|
-
],
|
|
568
|
-
},
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
AddLayer.parameters = {
|
|
572
|
-
docs: {
|
|
573
|
-
...defaultParameters.docs,
|
|
574
|
-
description: {
|
|
575
|
-
story: `Example using button to add a layer.`,
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
export const MapLayer2d: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
581
|
-
return <SubsurfaceViewer {...args} />;
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
const axesLayer2D = new Axes2DLayer({
|
|
585
|
-
id: "axesLayer2D",
|
|
586
|
-
backgroundColor: [0, 255, 255],
|
|
587
|
-
});
|
|
588
|
-
|
|
589
|
-
const mapLayer = new MapLayer({
|
|
590
|
-
id: "MapLayer",
|
|
591
|
-
meshUrl: "hugin_depth_25_m.float32",
|
|
592
|
-
frame: {
|
|
593
|
-
origin: [432150, 6475800],
|
|
594
|
-
count: [291, 229],
|
|
595
|
-
increment: [25, 25],
|
|
596
|
-
rotDeg: 0,
|
|
597
|
-
},
|
|
598
|
-
propertiesUrl: "kh_netmap_25_m.float32",
|
|
599
|
-
contours: [0, 100],
|
|
600
|
-
isContoursDepth: true,
|
|
601
|
-
gridLines: false,
|
|
602
|
-
material: true,
|
|
603
|
-
colorMapName: "Physics",
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
MapLayer2d.args = {
|
|
607
|
-
id: "map",
|
|
608
|
-
layers: [mapLayer, axesLayer2D],
|
|
609
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
610
|
-
views: {
|
|
611
|
-
layout: [1, 1],
|
|
612
|
-
viewports: [
|
|
613
|
-
{
|
|
614
|
-
id: "view_1",
|
|
615
|
-
show3D: false,
|
|
616
|
-
},
|
|
617
|
-
],
|
|
618
|
-
},
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
MapLayer2d.parameters = {
|
|
622
|
-
docs: {
|
|
623
|
-
...defaultParameters.docs,
|
|
624
|
-
description: {
|
|
625
|
-
story: "Example using png as mesh and properties data.",
|
|
626
|
-
},
|
|
627
|
-
},
|
|
628
|
-
};
|
|
629
|
-
|
|
630
|
-
export const MapLayer2dDarkMode: ComponentStory<typeof SubsurfaceViewer> = (
|
|
631
|
-
args
|
|
632
|
-
) => {
|
|
633
|
-
return <SubsurfaceViewer {...args} />;
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
const white = [255, 255, 255, 255];
|
|
637
|
-
|
|
638
|
-
MapLayer2dDarkMode.args = {
|
|
639
|
-
id: "map",
|
|
640
|
-
layers: [
|
|
641
|
-
{ ...axes_hugin, labelColor: white, axisColor: white },
|
|
642
|
-
{ ...meshMapLayerFloat32, material: false, gridLines: false },
|
|
643
|
-
{ ...north_arrow_layer, color: white },
|
|
644
|
-
],
|
|
645
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
646
|
-
scale: {
|
|
647
|
-
visible: true,
|
|
648
|
-
cssStyle: { color: "white" },
|
|
649
|
-
},
|
|
650
|
-
views: {
|
|
651
|
-
layout: [1, 1],
|
|
652
|
-
viewports: [
|
|
653
|
-
{
|
|
654
|
-
id: "view_1",
|
|
655
|
-
show3D: false,
|
|
656
|
-
},
|
|
657
|
-
],
|
|
658
|
-
},
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
MapLayer2dDarkMode.parameters = {
|
|
662
|
-
docs: {
|
|
663
|
-
...defaultParameters.docs,
|
|
664
|
-
description: {
|
|
665
|
-
story: "Example using png as mesh and properties data.",
|
|
666
|
-
},
|
|
667
|
-
},
|
|
668
|
-
backgrounds: { default: "dark" },
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
export const Rotated: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
672
|
-
return <SubsurfaceViewer {...args} />;
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
Rotated.args = {
|
|
676
|
-
id: "map",
|
|
677
|
-
layers: [axes_hugin, meshMapLayerRotated, north_arrow_layer],
|
|
678
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
679
|
-
views: {
|
|
680
|
-
layout: [1, 1],
|
|
681
|
-
viewports: [
|
|
682
|
-
{
|
|
683
|
-
id: "view_1",
|
|
684
|
-
show3D: false,
|
|
685
|
-
},
|
|
686
|
-
],
|
|
687
|
-
},
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
Rotated.parameters = {
|
|
691
|
-
docs: {
|
|
692
|
-
...defaultParameters.docs,
|
|
693
|
-
description: {
|
|
694
|
-
story: "Example using png as mesh and properties data.",
|
|
695
|
-
},
|
|
696
|
-
},
|
|
697
|
-
};
|
|
698
|
-
|
|
699
|
-
export const BigMap: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
700
|
-
return <SubsurfaceViewer {...args} />;
|
|
701
|
-
};
|
|
702
|
-
|
|
703
|
-
BigMap.args = {
|
|
704
|
-
id: "map",
|
|
705
|
-
layers: [axes_hugin, meshMapLayerBig, north_arrow_layer],
|
|
706
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
export const BigMap3d: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
710
|
-
return <SubsurfaceViewer {...args} />;
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
BigMap3d.args = {
|
|
714
|
-
id: "map",
|
|
715
|
-
layers: [axes_hugin, meshMapLayerBig, north_arrow_layer],
|
|
716
|
-
bounds: [432150, 6475800, 439400, 6481500] as NumberQuad,
|
|
717
|
-
views: {
|
|
718
|
-
layout: [1, 1],
|
|
719
|
-
viewports: [
|
|
720
|
-
{
|
|
721
|
-
id: "view_1",
|
|
722
|
-
show3D: true,
|
|
723
|
-
},
|
|
724
|
-
],
|
|
725
|
-
},
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
BigMap3d.parameters = {
|
|
729
|
-
docs: {
|
|
730
|
-
...defaultParameters.docs,
|
|
731
|
-
description: {
|
|
732
|
-
story: "Example using large map with approx. 1400x1400 cells.",
|
|
733
|
-
},
|
|
734
|
-
},
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
const axes_small = {
|
|
738
|
-
"@@type": "AxesLayer",
|
|
739
|
-
id: "axes_small",
|
|
740
|
-
bounds: [459790, 5929776, 0, 460590, 5930626, 30],
|
|
741
|
-
};
|
|
742
|
-
export const SmallMap: ComponentStory<typeof SubsurfaceViewer> = (args) => {
|
|
743
|
-
return <SubsurfaceViewer {...args} />;
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
SmallMap.args = {
|
|
747
|
-
id: "map",
|
|
748
|
-
layers: [axes_small, smallLayer, north_arrow_layer],
|
|
749
|
-
bounds: [459840.7, 5929826.1, 460540.7, 5930576.1] as NumberQuad,
|
|
750
|
-
views: {
|
|
751
|
-
layout: [1, 1],
|
|
752
|
-
viewports: [
|
|
753
|
-
{
|
|
754
|
-
id: "view_1",
|
|
755
|
-
show3D: true,
|
|
756
|
-
},
|
|
757
|
-
],
|
|
758
|
-
},
|
|
759
|
-
};
|
|
760
|
-
|
|
761
|
-
SmallMap.parameters = {
|
|
762
|
-
docs: {
|
|
763
|
-
...defaultParameters.docs,
|
|
764
|
-
description: {
|
|
765
|
-
story: "4x5 cells.",
|
|
766
|
-
},
|
|
767
|
-
},
|
|
768
|
-
};
|
|
769
|
-
|
|
770
|
-
const axes_lite = {
|
|
771
|
-
"@@type": "AxesLayer",
|
|
772
|
-
id: "axes_small",
|
|
773
|
-
bounds: [-1, -1, 0, 4, 5, 3],
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
//-- CellCenteredPropMap --
|
|
777
|
-
export const CellCenteredPropMap: ComponentStory<typeof SubsurfaceViewer> = (
|
|
778
|
-
args
|
|
779
|
-
) => {
|
|
780
|
-
return <SubsurfaceViewer {...args} />;
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
CellCenteredPropMap.args = {
|
|
784
|
-
id: "map",
|
|
785
|
-
layers: [axes_lite, cellCenteredPropertiesLayer, north_arrow_layer],
|
|
786
|
-
bounds: [-1, -1, 4, 5] as NumberQuad,
|
|
787
|
-
views: {
|
|
788
|
-
layout: [1, 1],
|
|
789
|
-
viewports: [
|
|
790
|
-
{
|
|
791
|
-
id: "view_1",
|
|
792
|
-
show3D: true,
|
|
793
|
-
},
|
|
794
|
-
],
|
|
795
|
-
},
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
CellCenteredPropMap.parameters = {
|
|
799
|
-
docs: {
|
|
800
|
-
...defaultParameters.docs,
|
|
801
|
-
description: {
|
|
802
|
-
story: "A small map with properties given at cell centers. Each cell will be constant colored",
|
|
803
|
-
},
|
|
804
|
-
},
|
|
805
|
-
};
|
|
806
|
-
|
|
807
|
-
//-- NodeCenteredPropMap --
|
|
808
|
-
export const NodeCenteredPropMap: ComponentStory<typeof SubsurfaceViewer> = (
|
|
809
|
-
args
|
|
810
|
-
) => {
|
|
811
|
-
return <SubsurfaceViewer {...args} />;
|
|
812
|
-
};
|
|
813
|
-
|
|
814
|
-
NodeCenteredPropMap.args = {
|
|
815
|
-
id: "map",
|
|
816
|
-
layers: [axes_lite, nodeCenteredPropertiesLayer, north_arrow_layer],
|
|
817
|
-
bounds: [-1, -1, 4, 5] as NumberQuad,
|
|
818
|
-
views: {
|
|
819
|
-
layout: [1, 1],
|
|
820
|
-
viewports: [
|
|
821
|
-
{
|
|
822
|
-
id: "view_1",
|
|
823
|
-
show3D: true,
|
|
824
|
-
},
|
|
825
|
-
],
|
|
826
|
-
},
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
NodeCenteredPropMap.parameters = {
|
|
830
|
-
docs: {
|
|
831
|
-
...defaultParameters.docs,
|
|
832
|
-
description: {
|
|
833
|
-
story: "A small map with properties given at nodes. Each cell will be interpolated in color.",
|
|
834
|
-
},
|
|
835
|
-
},
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
//-- NodeCenteredPropMap with native javascript arrays as input --
|
|
839
|
-
export const NodeCenteredPropMapWithArrayInput: ComponentStory<
|
|
840
|
-
typeof SubsurfaceViewer
|
|
841
|
-
> = (args) => {
|
|
842
|
-
return <SubsurfaceViewer {...args} />;
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
NodeCenteredPropMapWithArrayInput.args = {
|
|
846
|
-
id: "map",
|
|
847
|
-
layers: [
|
|
848
|
-
axes_lite,
|
|
849
|
-
nodeCenteredPropertiesLayerWithArrayInput,
|
|
850
|
-
north_arrow_layer,
|
|
851
|
-
],
|
|
852
|
-
bounds: [-1, -1, 4, 5] as NumberQuad,
|
|
853
|
-
views: {
|
|
854
|
-
layout: [1, 1],
|
|
855
|
-
viewports: [
|
|
856
|
-
{
|
|
857
|
-
id: "view_1",
|
|
858
|
-
show3D: true,
|
|
859
|
-
},
|
|
860
|
-
],
|
|
861
|
-
},
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
NodeCenteredPropMapWithArrayInput.parameters = {
|
|
865
|
-
docs: {
|
|
866
|
-
...defaultParameters.docs,
|
|
867
|
-
description: {
|
|
868
|
-
story: "Both mesh and property data given as native javascript arrays (as opposed to URL).",
|
|
869
|
-
},
|
|
870
|
-
},
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
export const GradientFunctionColorMap: ComponentStory<
|
|
874
|
-
typeof SubsurfaceViewer
|
|
875
|
-
> = () => {
|
|
876
|
-
const args = {
|
|
877
|
-
...defaultArgs,
|
|
878
|
-
id: "gradient-color-map",
|
|
879
|
-
layers: [
|
|
880
|
-
{ ...meshMapLayerFloat32, colorMapFunction: gradientColorMap },
|
|
881
|
-
],
|
|
882
|
-
};
|
|
883
|
-
return <SubsurfaceViewer {...args} />;
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
GradientFunctionColorMap.parameters = {
|
|
887
|
-
docs: {
|
|
888
|
-
...defaultParameters.docs,
|
|
889
|
-
description: {
|
|
890
|
-
story: "Example using gradient color mapping function.",
|
|
891
|
-
},
|
|
892
|
-
},
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
export const StepFunctionColorMap: ComponentStory<
|
|
896
|
-
typeof SubsurfaceViewer
|
|
897
|
-
> = () => {
|
|
898
|
-
const args = {
|
|
899
|
-
...defaultArgs,
|
|
900
|
-
id: "nearest-color-map",
|
|
901
|
-
layers: [
|
|
902
|
-
{
|
|
903
|
-
...meshMapLayerFloat32,
|
|
904
|
-
material: true,
|
|
905
|
-
colorMapFunction: nearestColorMap,
|
|
906
|
-
},
|
|
907
|
-
],
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
return <SubsurfaceViewer {...args} />;
|
|
911
|
-
};
|
|
912
|
-
|
|
913
|
-
StepFunctionColorMap.parameters = {
|
|
914
|
-
docs: {
|
|
915
|
-
...defaultParameters.docs,
|
|
916
|
-
description: {
|
|
917
|
-
story: "Example using step color mapping function.",
|
|
918
|
-
},
|
|
919
|
-
},
|
|
920
|
-
};
|
|
921
|
-
|
|
922
|
-
export const DefaultColorScale: ComponentStory<
|
|
923
|
-
typeof SubsurfaceViewer
|
|
924
|
-
> = () => {
|
|
925
|
-
const args = {
|
|
926
|
-
...defaultArgs,
|
|
927
|
-
id: "default-color-scale",
|
|
928
|
-
layers: [{ ...meshMapLayerFloat32 }],
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
return <SubsurfaceViewer {...args} />;
|
|
932
|
-
};
|
|
933
|
-
|
|
934
|
-
DefaultColorScale.parameters = {
|
|
935
|
-
docs: {
|
|
936
|
-
...defaultParameters.docs,
|
|
937
|
-
description: {
|
|
938
|
-
story: "Default color scale.",
|
|
939
|
-
},
|
|
940
|
-
},
|
|
941
|
-
};
|
|
942
|
-
|
|
943
|
-
export const Readout: ComponentStory<typeof SubsurfaceViewer> = () => {
|
|
944
|
-
const [hoverInfo, hoverCallback] = useHoverInfo();
|
|
945
|
-
|
|
946
|
-
const args = React.useMemo(() => {
|
|
947
|
-
return {
|
|
948
|
-
...defaultArgs,
|
|
949
|
-
id: "readout",
|
|
950
|
-
layers: [{ ...meshMapLayerFloat32 }],
|
|
951
|
-
coords: {
|
|
952
|
-
visible: false,
|
|
953
|
-
},
|
|
954
|
-
onMouseEvent: hoverCallback,
|
|
955
|
-
};
|
|
956
|
-
}, [hoverCallback]);
|
|
957
|
-
|
|
958
|
-
return (
|
|
959
|
-
<>
|
|
960
|
-
<SubsurfaceViewer {...args} />
|
|
961
|
-
{hoverInfo && <InfoCard pickInfos={hoverInfo} />}
|
|
962
|
-
</>
|
|
963
|
-
);
|
|
964
|
-
};
|
|
965
|
-
|
|
966
|
-
Readout.parameters = {
|
|
967
|
-
docs: {
|
|
968
|
-
...defaultParameters.docs,
|
|
969
|
-
description: {
|
|
970
|
-
story: "Readout example.",
|
|
971
|
-
},
|
|
972
|
-
},
|
|
973
|
-
};
|
|
974
|
-
|
|
975
|
-
export const BigMapWithHole: ComponentStory<typeof SubsurfaceViewer> = () => {
|
|
976
|
-
const [hoverInfo, hoverCallback] = useHoverInfo();
|
|
977
|
-
|
|
978
|
-
const args = React.useMemo(() => {
|
|
979
|
-
return {
|
|
980
|
-
...defaultArgs,
|
|
981
|
-
id: "readout",
|
|
982
|
-
layers: [
|
|
983
|
-
{
|
|
984
|
-
...meshMapLayerBig,
|
|
985
|
-
meshUrl: "hugin_depth_5_m_w_hole.float32",
|
|
986
|
-
gridLines: false,
|
|
987
|
-
material: false,
|
|
988
|
-
},
|
|
989
|
-
],
|
|
990
|
-
coords: {
|
|
991
|
-
visible: false,
|
|
992
|
-
},
|
|
993
|
-
onMouseEvent: hoverCallback,
|
|
994
|
-
};
|
|
995
|
-
}, [hoverCallback]);
|
|
996
|
-
|
|
997
|
-
return (
|
|
998
|
-
<>
|
|
999
|
-
<SubsurfaceViewer {...args} />
|
|
1000
|
-
{hoverInfo && <InfoCard pickInfos={hoverInfo} />}
|
|
1001
|
-
</>
|
|
1002
|
-
);
|
|
1003
|
-
};
|
|
1004
|
-
|
|
1005
|
-
BigMapWithHole.parameters = {
|
|
1006
|
-
docs: {
|
|
1007
|
-
...defaultParameters.docs,
|
|
1008
|
-
description: {
|
|
1009
|
-
story: "Example of map with a hole.",
|
|
1010
|
-
},
|
|
1011
|
-
},
|
|
1012
|
-
};
|
|
1013
|
-
|
|
1014
|
-
export const BreakpointColorMap: ComponentStory<typeof SubsurfaceViewer> = (
|
|
1015
|
-
args
|
|
1016
|
-
) => {
|
|
1017
|
-
const [breakpoint, setBreakpoint] = React.useState<number>(0.5);
|
|
1018
|
-
|
|
1019
|
-
const colorMap = React.useCallback(
|
|
1020
|
-
(value: number) => {
|
|
1021
|
-
return createColorMap(breakpoint)(value);
|
|
1022
|
-
},
|
|
1023
|
-
[breakpoint]
|
|
1024
|
-
);
|
|
1025
|
-
|
|
1026
|
-
const layer = {
|
|
1027
|
-
...args?.layers?.[0],
|
|
1028
|
-
colorMapFunction: colorMap,
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
|
-
const props = {
|
|
1032
|
-
...args,
|
|
1033
|
-
layers: [layer],
|
|
1034
|
-
};
|
|
1035
|
-
|
|
1036
|
-
const handleChange = React.useCallback(
|
|
1037
|
-
(_event: Event | SyntheticEvent, value: number | number[]) => {
|
|
1038
|
-
setBreakpoint((value as number) / 100);
|
|
1039
|
-
},
|
|
1040
|
-
[]
|
|
1041
|
-
);
|
|
1042
|
-
|
|
1043
|
-
return (
|
|
1044
|
-
<Root>
|
|
1045
|
-
<div className={classes.main}>
|
|
1046
|
-
<SubsurfaceViewer {...props} />
|
|
1047
|
-
<div className={classes.legend}>
|
|
1048
|
-
<ContinuousLegend
|
|
1049
|
-
min={valueRange[0]}
|
|
1050
|
-
max={valueRange[1]}
|
|
1051
|
-
colorMapFunction={colorMap}
|
|
1052
|
-
/>
|
|
1053
|
-
</div>
|
|
1054
|
-
</div>
|
|
1055
|
-
<Slider
|
|
1056
|
-
min={0}
|
|
1057
|
-
max={100}
|
|
1058
|
-
defaultValue={50}
|
|
1059
|
-
step={1}
|
|
1060
|
-
onChangeCommitted={handleChange}
|
|
1061
|
-
/>
|
|
1062
|
-
</Root>
|
|
1063
|
-
);
|
|
1064
|
-
};
|
|
1065
|
-
|
|
1066
|
-
BreakpointColorMap.args = {
|
|
1067
|
-
...defaultArgs,
|
|
1068
|
-
id: "breakpoint-color-map",
|
|
1069
|
-
layers: [
|
|
1070
|
-
{
|
|
1071
|
-
...meshMapLayerFloat32,
|
|
1072
|
-
gridLines: false,
|
|
1073
|
-
material: true,
|
|
1074
|
-
},
|
|
1075
|
-
],
|
|
1076
|
-
};
|
|
1077
|
-
|
|
1078
|
-
BreakpointColorMap.parameters = {
|
|
1079
|
-
docs: {
|
|
1080
|
-
...defaultParameters.docs,
|
|
1081
|
-
description: {
|
|
1082
|
-
story: "Example using a color scale with a breakpoint.",
|
|
1083
|
-
},
|
|
1084
|
-
},
|
|
1085
|
-
};
|
|
1086
|
-
|
|
1087
|
-
export const ColorMapRange: ComponentStory<typeof SubsurfaceViewer> = (
|
|
1088
|
-
args
|
|
1089
|
-
) => {
|
|
1090
|
-
const [colorMapUpper, setColorMapUpper] = React.useState<number>(41048);
|
|
1091
|
-
|
|
1092
|
-
const layer = {
|
|
1093
|
-
...args?.layers?.[0],
|
|
1094
|
-
colorMapRange: [-3071, colorMapUpper],
|
|
1095
|
-
};
|
|
1096
|
-
|
|
1097
|
-
const props = {
|
|
1098
|
-
...args,
|
|
1099
|
-
layers: [layer],
|
|
1100
|
-
};
|
|
1101
|
-
|
|
1102
|
-
const handleChange = React.useCallback(
|
|
1103
|
-
(_event: unknown, value: number | number[]) => {
|
|
1104
|
-
setColorMapUpper(value as number);
|
|
1105
|
-
},
|
|
1106
|
-
[]
|
|
1107
|
-
);
|
|
1108
|
-
|
|
1109
|
-
return (
|
|
1110
|
-
<Root>
|
|
1111
|
-
<div className={classes.main}>
|
|
1112
|
-
<SubsurfaceViewer {...props} />
|
|
1113
|
-
</div>
|
|
1114
|
-
<Slider
|
|
1115
|
-
min={10000}
|
|
1116
|
-
max={41048}
|
|
1117
|
-
defaultValue={41048}
|
|
1118
|
-
step={1000}
|
|
1119
|
-
onChange={handleChange}
|
|
1120
|
-
/>
|
|
1121
|
-
</Root>
|
|
1122
|
-
);
|
|
1123
|
-
};
|
|
1124
|
-
|
|
1125
|
-
ColorMapRange.args = {
|
|
1126
|
-
...defaultArgs,
|
|
1127
|
-
id: "breakpoint-color-map",
|
|
1128
|
-
layers: [
|
|
1129
|
-
{
|
|
1130
|
-
...meshMapLayerFloat32,
|
|
1131
|
-
colorMapName: "Seismic",
|
|
1132
|
-
colorMapClampColor: false,
|
|
1133
|
-
gridLines: false,
|
|
1134
|
-
material: true,
|
|
1135
|
-
},
|
|
1136
|
-
],
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
|
-
ColorMapRange.parameters = {
|
|
1140
|
-
docs: {
|
|
1141
|
-
...defaultParameters.docs,
|
|
1142
|
-
description: {
|
|
1143
|
-
story: 'Example changing the "ColorMapRange" property using a slider.',
|
|
1144
|
-
},
|
|
1145
|
-
},
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
// Map layer with color colorselector
|
|
1149
|
-
|
|
1150
|
-
const MapLayerColorSelectorTemplate: ComponentStory<typeof SubsurfaceViewer> = (
|
|
1151
|
-
args
|
|
1152
|
-
) => {
|
|
1153
|
-
const [colorName, setColorName] = React.useState("Rainbow");
|
|
1154
|
-
const [colorRange, setRange] = React.useState();
|
|
1155
|
-
const [isAuto, setAuto] = React.useState();
|
|
1156
|
-
const [breakPoints, setBreakPoint] = React.useState();
|
|
1157
|
-
const [isLog, setIsLog] = React.useState(false);
|
|
1158
|
-
const [isNearest, setIsNearest] = React.useState(false);
|
|
1159
|
-
|
|
1160
|
-
// user defined breakpoint(domain)
|
|
1161
|
-
const userDefinedBreakPoint = React.useCallback(
|
|
1162
|
-
(data: { colorArray: React.SetStateAction<undefined> }) => {
|
|
1163
|
-
if (data) setBreakPoint(data.colorArray);
|
|
1164
|
-
},
|
|
1165
|
-
[]
|
|
1166
|
-
);
|
|
1167
|
-
|
|
1168
|
-
// Get color name from color selector
|
|
1169
|
-
const colorNameFromSelector = React.useCallback(
|
|
1170
|
-
(data: React.SetStateAction<string>) => {
|
|
1171
|
-
setColorName(data);
|
|
1172
|
-
},
|
|
1173
|
-
[]
|
|
1174
|
-
);
|
|
1175
|
-
|
|
1176
|
-
// user defined range
|
|
1177
|
-
const userDefinedRange = React.useCallback(
|
|
1178
|
-
(data: {
|
|
1179
|
-
range: React.SetStateAction<undefined>;
|
|
1180
|
-
isAuto: React.SetStateAction<undefined>;
|
|
1181
|
-
}) => {
|
|
1182
|
-
if (data.range) setRange(data.range);
|
|
1183
|
-
setAuto(data.isAuto);
|
|
1184
|
-
},
|
|
1185
|
-
[]
|
|
1186
|
-
);
|
|
1187
|
-
|
|
1188
|
-
// Get interpolation method from color selector to layer
|
|
1189
|
-
const getInterpolateMethod = React.useCallback(
|
|
1190
|
-
(data: {
|
|
1191
|
-
isLog: boolean | ((prevState: boolean) => boolean);
|
|
1192
|
-
isNearest: boolean | ((prevState: boolean) => boolean);
|
|
1193
|
-
}) => {
|
|
1194
|
-
setIsLog(data.isLog);
|
|
1195
|
-
setIsNearest(data.isNearest);
|
|
1196
|
-
},
|
|
1197
|
-
[]
|
|
1198
|
-
);
|
|
1199
|
-
|
|
1200
|
-
// color map function
|
|
1201
|
-
const colorMapFunc = React.useCallback(() => {
|
|
1202
|
-
return createColorMapFunction(colorName, isLog, isNearest, breakPoints);
|
|
1203
|
-
}, [colorName, isLog, isNearest, breakPoints]);
|
|
1204
|
-
|
|
1205
|
-
const min = 100;
|
|
1206
|
-
const max = 1000;
|
|
1207
|
-
|
|
1208
|
-
const updatedLayerData = [
|
|
1209
|
-
{
|
|
1210
|
-
...meshMapLayerFloat32,
|
|
1211
|
-
colorMapName: colorName,
|
|
1212
|
-
colorMapRange:
|
|
1213
|
-
colorRange && isAuto == false ? colorRange : [min, max],
|
|
1214
|
-
colorMapFunction: colorMapFunc(),
|
|
1215
|
-
},
|
|
1216
|
-
];
|
|
1217
|
-
return (
|
|
1218
|
-
<SubsurfaceViewer {...args} layers={updatedLayerData}>
|
|
1219
|
-
{
|
|
1220
|
-
<View id="view_1">
|
|
1221
|
-
<div style={{ marginTop: 50 }}>
|
|
1222
|
-
<ColorLegend
|
|
1223
|
-
min={min}
|
|
1224
|
-
max={max}
|
|
1225
|
-
colorNameFromSelector={colorNameFromSelector}
|
|
1226
|
-
getColorRange={userDefinedRange}
|
|
1227
|
-
getInterpolateMethod={getInterpolateMethod}
|
|
1228
|
-
getBreakpointValue={userDefinedBreakPoint}
|
|
1229
|
-
horizontal={true}
|
|
1230
|
-
numberOfTicks={2}
|
|
1231
|
-
/>
|
|
1232
|
-
</div>
|
|
1233
|
-
</View>
|
|
1234
|
-
}
|
|
1235
|
-
</SubsurfaceViewer>
|
|
1236
|
-
);
|
|
1237
|
-
};
|
|
1238
|
-
|
|
1239
|
-
export const ColorSelector = MapLayerColorSelectorTemplate.bind({});
|
|
1240
|
-
|
|
1241
|
-
ColorSelector.args = {
|
|
1242
|
-
...defaultArgs,
|
|
1243
|
-
id: "map_layer_color_selector",
|
|
1244
|
-
legend: {
|
|
1245
|
-
visible: true,
|
|
1246
|
-
},
|
|
1247
|
-
layers: [{ ...meshMapLayerFloat32 }],
|
|
1248
|
-
views: {
|
|
1249
|
-
layout: [1, 1],
|
|
1250
|
-
showLabel: true,
|
|
1251
|
-
viewports: [
|
|
1252
|
-
{
|
|
1253
|
-
id: "view_1",
|
|
1254
|
-
zoom: -4,
|
|
1255
|
-
},
|
|
1256
|
-
],
|
|
1257
|
-
},
|
|
1258
|
-
};
|
|
1259
|
-
|
|
1260
|
-
const ContourLinesStory = (props: {
|
|
1261
|
-
syncViewports: boolean;
|
|
1262
|
-
show3d: boolean;
|
|
1263
|
-
contourOffset: number;
|
|
1264
|
-
zContourInterval: number;
|
|
1265
|
-
propertyContourInterval: number;
|
|
1266
|
-
marginPixels: number;
|
|
1267
|
-
}) => {
|
|
1268
|
-
const views: ViewsType = {
|
|
1269
|
-
layout: [2, 2],
|
|
1270
|
-
viewports: [
|
|
1271
|
-
{
|
|
1272
|
-
id: "view_1",
|
|
1273
|
-
show3D: props.show3d,
|
|
1274
|
-
layerIds: ["default_map"],
|
|
1275
|
-
isSync: props.syncViewports,
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
id: "view_2",
|
|
1279
|
-
show3D: props.show3d,
|
|
1280
|
-
layerIds: ["contours"],
|
|
1281
|
-
isSync: props.syncViewports,
|
|
1282
|
-
},
|
|
1283
|
-
{
|
|
1284
|
-
id: "view_3",
|
|
1285
|
-
show3D: props.show3d,
|
|
1286
|
-
layerIds: ["property_contours"],
|
|
1287
|
-
isSync: props.syncViewports,
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
id: "view_4",
|
|
1291
|
-
show3D: props.show3d,
|
|
1292
|
-
layerIds: ["flat"],
|
|
1293
|
-
isSync: props.syncViewports,
|
|
1294
|
-
},
|
|
1295
|
-
],
|
|
1296
|
-
};
|
|
1297
|
-
|
|
1298
|
-
const contourMapLayer = new MapLayer({
|
|
1299
|
-
...defaultMapLayerProps,
|
|
1300
|
-
id: "contours",
|
|
1301
|
-
contours: [props.contourOffset, props.zContourInterval],
|
|
1302
|
-
});
|
|
1303
|
-
|
|
1304
|
-
const propertyContourMapLayer = new MapLayer({
|
|
1305
|
-
...defaultMapLayerProps,
|
|
1306
|
-
id: "property_contours",
|
|
1307
|
-
contours: [props.contourOffset, props.propertyContourInterval],
|
|
1308
|
-
isContoursDepth: false,
|
|
1309
|
-
});
|
|
1310
|
-
|
|
1311
|
-
const flatMapLayerProps = {
|
|
1312
|
-
...defaultMapLayerProps,
|
|
1313
|
-
id: "flat",
|
|
1314
|
-
meshData: undefined,
|
|
1315
|
-
contours: [props.contourOffset, props.propertyContourInterval] as [
|
|
1316
|
-
number,
|
|
1317
|
-
number
|
|
1318
|
-
],
|
|
1319
|
-
};
|
|
1320
|
-
|
|
1321
|
-
const flatPropertyContourMapLayer = new MapLayer({
|
|
1322
|
-
...flatMapLayerProps,
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
return (
|
|
1326
|
-
<SubsurfaceViewer
|
|
1327
|
-
id={"test"}
|
|
1328
|
-
layers={[
|
|
1329
|
-
defaultMapLayer,
|
|
1330
|
-
contourMapLayer,
|
|
1331
|
-
propertyContourMapLayer,
|
|
1332
|
-
flatPropertyContourMapLayer,
|
|
1333
|
-
]}
|
|
1334
|
-
views={views}
|
|
1335
|
-
>
|
|
1336
|
-
<View id="view_1">
|
|
1337
|
-
<ViewFooter>Default - no contour lines</ViewFooter>
|
|
1338
|
-
</View>
|
|
1339
|
-
<View id="view_2">
|
|
1340
|
-
<ViewFooter>
|
|
1341
|
-
Contour lines enabled - default is Z value
|
|
1342
|
-
</ViewFooter>
|
|
1343
|
-
</View>
|
|
1344
|
-
<View id="view_3">
|
|
1345
|
-
<ViewFooter>Contour lines on property value</ViewFooter>
|
|
1346
|
-
</View>
|
|
1347
|
-
<View id="view_4">
|
|
1348
|
-
<ViewFooter>
|
|
1349
|
-
Contour lines on flat map - default is property value
|
|
1350
|
-
</ViewFooter>
|
|
1351
|
-
</View>
|
|
1352
|
-
</SubsurfaceViewer>
|
|
1353
|
-
);
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
export const ContourLines: ComponentStory<typeof ContourLinesStory> = (
|
|
1357
|
-
args
|
|
1358
|
-
) => {
|
|
1359
|
-
return <ContourLinesStory {...args} />;
|
|
1360
|
-
};
|
|
1361
|
-
|
|
1362
|
-
ContourLines.args = {
|
|
1363
|
-
syncViewports: true,
|
|
1364
|
-
show3d: true,
|
|
1365
|
-
contourOffset: 0,
|
|
1366
|
-
zContourInterval: 100,
|
|
1367
|
-
propertyContourInterval: 5000,
|
|
1368
|
-
marginPixels: 0,
|
|
1369
|
-
};
|