@webviz/subsurface-viewer 0.27.9 → 0.27.10

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.
@@ -1,2 +1,2 @@
1
- declare const fsShader = "#version 300 es\n#define SHADER_NAME grid3d-fragment-shader\n\nprecision highp float;\n\nin vec3 cameraPosition;\nin vec4 position_commonspace;\nin float property;\n\nflat in vec3 normal;\nflat in int vertexIndex;\n\nuniform sampler2D colormap;\n\nuniform float colorMapRangeMin;\nuniform float colorMapRangeMax;\n\nuniform bool isColoringDiscrete;\nuniform float colorMapSize;\n\nuniform vec3 colorMapClampColor;\nuniform bool isClampColor;\nuniform bool isColorMapClampColorTransparent;\n\n// Calculate color from propertyValue using continuous colormap.\nvec4 getContinuousPropertyColor (float propertyValue) {\n\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);\n if (x < 0.0 - 1e-4 || x > 1.0 + 1e-4) {\n // Out of range. Use clampcolor.\n if (isClampColor) {\n color = vec4(colorMapClampColor.rgb, 1.0);\n\n }\n else if (isColorMapClampColorTransparent) {\n discard;\n }\n else {\n // Use min/max color to clamp.\n x = clamp (x, 0.0, 1.0); \n color = texture2D(colormap, vec2(x, 0.5));\n }\n }\n else {\n color = texture2D(colormap, vec2(x, 0.5));\n }\n return color;\n}\n\n// Calculate color from propertyValue using discrete colormap.\nvec4 getDiscretePropertyColor (float propertyValue) {\n\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n float tolerance = (1.0 / colorMapSize) * 0.5;\n \n if (propertyValue < colorMapRangeMin - tolerance || propertyValue > colorMapRangeMax + tolerance) {\n // Out of range. Use clampcolor.\n if (isClampColor) {\n color = vec4(colorMapClampColor.rgb, 1.0);\n\n }\n else if (isColorMapClampColorTransparent) {\n discard;\n }\n else {\n // Use min/max color to clamp.\n float p = clamp (propertyValue, colorMapRangeMin, colorMapRangeMax);\n float x = p / colorMapSize;\n color = texture2D(colormap, vec2(x, 0.5));\n }\n }\n else {\n float x = propertyValue / colorMapSize;\n color = texture2D(colormap, vec2(x + tolerance, 0.5));\n }\n return color;\n}\n\nvec4 getPropertyColor (float propertyValue) {\n if(isColoringDiscrete) {\n return getDiscretePropertyColor (propertyValue);\n }\n return getContinuousPropertyColor (propertyValue);\n}\n\nvoid main(void) {\n\n if (picking_uActive && !picking_uAttribute) {\n gl_FragColor = encodeVertexIndexToRGB(vertexIndex); \n return;\n }\n \n vec4 color = getPropertyColor(property);\n \n // Use two sided phong lighting. This has no effect if \"material\" property is not set.\n vec3 lightColor = getPhongLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n gl_FragColor = vec4(lightColor, 1.0);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
1
+ declare const fsShader = "#version 300 es\n#define SHADER_NAME grid3d-fragment-shader\n\nprecision highp float;\n\nin vec3 cameraPosition;\nin vec4 position_commonspace;\nflat in float property;\nin float property_interpolated;\n\nflat in vec3 normal;\nflat in int vertexIndex;\n\nuniform sampler2D colormap;\n\nuniform float valueRangeMin;\nuniform float valueRangeMax;\nuniform float colorMapRangeMin;\nuniform float colorMapRangeMax;\n\nuniform bool isColoringDiscrete;\nuniform float colorMapSize;\nuniform lowp int coloringMode;\n\nuniform vec3 colorMapClampColor;\nuniform bool isClampColor;\nuniform bool isColorMapClampColorTransparent;\n\nvec4 getContinuousPropertyColor (float propertyValue) {\n\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n\n float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);\n if (x < 0.0 || x > 1.0) {\n // Out of range. Use clampcolor.\n if (isClampColor) {\n color = vec4(colorMapClampColor.rgb, 1.0);\n\n }\n else if (isColorMapClampColorTransparent) {\n discard;\n }\n else {\n // Use min/max color to clamp.\n x = clamp (x, 0.0, 1.0); \n color = texture2D(colormap, vec2(x, 0.5));\n }\n }\n else {\n color = texture2D(colormap, vec2(x, 0.5));\n }\n return color;\n}\n\n// Calculate color from propertyValue using discrete colormap.\nvec4 getDiscretePropertyColor (float propertyValue) {\n\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n float tolerance = (1.0 / colorMapSize) * 0.5;\n\n if (propertyValue < colorMapRangeMin - tolerance || propertyValue > colorMapRangeMax + tolerance) {\n // Out of range. Use clampcolor.\n if (isClampColor) {\n color = vec4(colorMapClampColor.rgb, 1.0);\n\n }\n else if (isColorMapClampColorTransparent) {\n discard;\n }\n else {\n // Use min/max color to clamp.\n float p = clamp (propertyValue, colorMapRangeMin, colorMapRangeMax);\n float x = p / colorMapSize;\n color = texture2D(colormap, vec2(x, 0.5));\n }\n }\n else {\n float x = propertyValue / colorMapSize;\n color = texture2D(colormap, vec2(x + tolerance, 0.5));\n }\n return color;\n}\n\nvec4 getPropertyColor (float propertyValue) {\n if(isColoringDiscrete) {\n return getDiscretePropertyColor (propertyValue);\n }\n return getContinuousPropertyColor (propertyValue);\n}\n\nvoid main(void) {\n\n if (picking_uActive && !picking_uAttribute) {\n gl_FragColor = encodeVertexIndexToRGB(vertexIndex); \n return;\n }\n \n // Property values other than X,Y or Z are passed as \"flat\" i.e. constant over faces.\n float propertyValue = coloringMode == 0 ? property : property_interpolated;\n propertyValue = clamp(propertyValue, valueRangeMin, valueRangeMax);\n\n vec4 color = getPropertyColor(propertyValue);\n \n // Use two sided phong lighting. This has no effect if \"material\" property is not set.\n vec3 lightColor = getPhongLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n gl_FragColor = vec4(lightColor, 1.0);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
2
2
  export default fsShader;
@@ -5,29 +5,33 @@ precision highp float;
5
5
 
6
6
  in vec3 cameraPosition;
7
7
  in vec4 position_commonspace;
8
- in float property;
8
+ flat in float property;
9
+ in float property_interpolated;
9
10
 
10
11
  flat in vec3 normal;
11
12
  flat in int vertexIndex;
12
13
 
13
14
  uniform sampler2D colormap;
14
15
 
16
+ uniform float valueRangeMin;
17
+ uniform float valueRangeMax;
15
18
  uniform float colorMapRangeMin;
16
19
  uniform float colorMapRangeMax;
17
20
 
18
21
  uniform bool isColoringDiscrete;
19
22
  uniform float colorMapSize;
23
+ uniform lowp int coloringMode;
20
24
 
21
25
  uniform vec3 colorMapClampColor;
22
26
  uniform bool isClampColor;
23
27
  uniform bool isColorMapClampColorTransparent;
24
28
 
25
- // Calculate color from propertyValue using continuous colormap.
26
29
  vec4 getContinuousPropertyColor (float propertyValue) {
27
30
 
28
31
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
32
+
29
33
  float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);
30
- if (x < 0.0 - 1e-4 || x > 1.0 + 1e-4) {
34
+ if (x < 0.0 || x > 1.0) {
31
35
  // Out of range. Use clampcolor.
32
36
  if (isClampColor) {
33
37
  color = vec4(colorMapClampColor.rgb, 1.0);
@@ -53,7 +57,7 @@ vec4 getDiscretePropertyColor (float propertyValue) {
53
57
 
54
58
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
55
59
  float tolerance = (1.0 / colorMapSize) * 0.5;
56
-
60
+
57
61
  if (propertyValue < colorMapRangeMin - tolerance || propertyValue > colorMapRangeMax + tolerance) {
58
62
  // Out of range. Use clampcolor.
59
63
  if (isClampColor) {
@@ -90,8 +94,12 @@ void main(void) {
90
94
  gl_FragColor = encodeVertexIndexToRGB(vertexIndex);
91
95
  return;
92
96
  }
93
-
94
- vec4 color = getPropertyColor(property);
97
+
98
+ // Property values other than X,Y or Z are passed as "flat" i.e. constant over faces.
99
+ float propertyValue = coloringMode == 0 ? property : property_interpolated;
100
+ propertyValue = clamp(propertyValue, valueRangeMin, valueRangeMax);
101
+
102
+ vec4 color = getPropertyColor(propertyValue);
95
103
 
96
104
  // Use two sided phong lighting. This has no effect if "material" property is not set.
97
105
  vec3 lightColor = getPhongLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);
@@ -1 +1 @@
1
- {"version":3,"file":"fragment.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/fragment.fs.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"fragment.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/fragment.fs.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -232,6 +232,8 @@ export default class PrivateLayer extends Layer {
232
232
  });
233
233
  return {
234
234
  colormap,
235
+ valueRangeMin,
236
+ valueRangeMax,
235
237
  colorMapRangeMin,
236
238
  colorMapRangeMax,
237
239
  colorMapClampColor,
@@ -1 +1 @@
1
- {"version":3,"file":"privateGrid3dLayer.js","sourceRoot":"","sources":["../../../src/layers/grid3d/privateGrid3dLayer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,iBAAiB,EACjB,KAAK,EACL,OAAO,EACP,OAAO,GACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAQlD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;A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AC"}
@@ -1,2 +1,2 @@
1
- declare const vsShader = "#version 300 es\n#define SHADER_NAME grid3d-vertex-shader\nprecision highp float;\n\nattribute vec3 positions;\nattribute float properties;\nattribute vec3 normals;\n\nuniform int coloringMode;\n\n// Outputs to fragment shader\nout vec3 cameraPosition;\nout vec4 position_commonspace;\nout float property;\n\nflat out vec3 normal;\nflat out int vertexIndex;\n\nuniform bool ZIncreasingDownwards;\n\nconst vec3 pickingColor = vec3(1.0, 1.0, 0.0);\n\nvoid main(void) { \n \n vertexIndex = gl_VertexID;\n cameraPosition = project_uCameraPosition; \n geometry.pickingColor = pickingColor;\n\n normal = normals;\n vec3 position = positions;\n\n float zSign = ZIncreasingDownwards ? -1.0 : 1.0;\n\n position.z *= zSign;\n normal.z *= zSign;\n\n switch(coloringMode) {\n case 0: property = properties; break;\n case 1: property = position.x; break;\n case 2: property = position.y; break;\n case 3: property = position.z; break;\n default: property = properties; break;\n }\n\n position_commonspace = vec4(project_position(position), 0.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n";
1
+ declare const vsShader = "#version 300 es\n#define SHADER_NAME grid3d-vertex-shader\nprecision highp float;\n\nattribute vec3 positions;\nattribute float properties;\nattribute vec3 normals;\n\nuniform lowp int coloringMode;\n\n// Outputs to fragment shader\nout vec3 cameraPosition;\nout vec4 position_commonspace;\nflat out float property;\nout float property_interpolated;\n\nflat out vec3 normal;\nflat out int vertexIndex;\n\nuniform bool ZIncreasingDownwards;\n\nconst vec3 pickingColor = vec3(1.0, 1.0, 0.0);\n\nvoid main(void) { \n \n vertexIndex = gl_VertexID;\n cameraPosition = project_uCameraPosition; \n geometry.pickingColor = pickingColor;\n\n normal = normals;\n vec3 position = positions;\n\n float zSign = ZIncreasingDownwards ? -1.0 : 1.0;\n\n position.z *= zSign;\n normal.z *= zSign;\n\n switch(coloringMode) {\n case 0: property = properties; break;\n case 1: property_interpolated = position.x; break;\n case 2: property_interpolated = position.y; break;\n case 3: property_interpolated = position.z; break;\n default: property = properties; break;\n }\n\n position_commonspace = vec4(project_position(position), 0.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n";
2
2
  export default vsShader;
@@ -7,12 +7,13 @@ attribute vec3 positions;
7
7
  attribute float properties;
8
8
  attribute vec3 normals;
9
9
 
10
- uniform int coloringMode;
10
+ uniform lowp int coloringMode;
11
11
 
12
12
  // Outputs to fragment shader
13
13
  out vec3 cameraPosition;
14
14
  out vec4 position_commonspace;
15
- out float property;
15
+ flat out float property;
16
+ out float property_interpolated;
16
17
 
17
18
  flat out vec3 normal;
18
19
  flat out int vertexIndex;
@@ -37,9 +38,9 @@ void main(void) {
37
38
 
38
39
  switch(coloringMode) {
39
40
  case 0: property = properties; break;
40
- case 1: property = position.x; break;
41
- case 2: property = position.y; break;
42
- case 3: property = position.z; break;
41
+ case 1: property_interpolated = position.x; break;
42
+ case 2: property_interpolated = position.y; break;
43
+ case 3: property_interpolated = position.z; break;
43
44
  default: property = properties; break;
44
45
  }
45
46
 
@@ -1 +1 @@
1
- {"version":3,"file":"vertex.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/vertex.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"vertex.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/vertex.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,2 +1,2 @@
1
- declare const fsShader = "#version 300 es\n#define SHADER_NAME terrainmap-shader\n\nprecision highp float;\n\n\nuniform bool isContoursDepth;\nuniform float contourReferencePoint;\nuniform float contourInterval;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nflat in int vertexIndex;\n\nin vec3 worldPos;\nin float property;\n\nuniform sampler2D colormap;\n\nuniform float valueRangeMin;\nuniform float valueRangeMax;\nuniform float colorMapRangeMin;\nuniform float colorMapRangeMax;\n\nuniform vec3 colorMapClampColor;\nuniform bool isClampColor;\nuniform bool isColorMapClampColorTransparent;\nuniform bool smoothShading;\n\n\nvoid main(void) { \n geometry.uv = vTexCoord;\n\n vec3 normal = normals_commonspace;\n // These are sent as Int8\n normal[0] /= 127.0;\n normal[1] /= 127.0;\n normal[2] /= 127.0;\n\n if (!smoothShading || (normal[0] == 0.0 && normal[1] == 0.0 && normal[2] == 0.0)) {\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n }\n\n //Picking pass.\n if (picking_uActive && !picking_uAttribute) {\n gl_FragColor = encodeVertexIndexToRGB(vertexIndex);\n return;\n }\n\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);;\n float propertyValue = property;\n\n float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);\n if (x < 0.0 || x > 1.0) {\n // Out of range. Use clampcolor.\n if (isClampColor) {\n color = vec4(colorMapClampColor.rgb, 1.0);\n\n }\n else if (isColorMapClampColorTransparent) {\n discard;\n return;\n }\n else {\n // Use min/max color to clamp.\n x = max(0.0, x);\n x = min(1.0, x);\n\n color = texture2D(colormap, vec2(x, 0.5));\n }\n }\n else {\n color = texture2D(colormap, vec2(x, 0.5));\n }\n\n \n bool is_contours = contourReferencePoint != -1.0 && contourInterval != -1.0;\n if (is_contours) {\n // Contours are made of either depths or properties.\n float val = isContoursDepth ? (abs(worldPos.z) - contourReferencePoint) / contourInterval\n : (propertyValue - contourReferencePoint) / contourInterval;\n\n float f = fract(val);\n float df = fwidth(val);\n\n // keep: float c = smoothstep(df * 1.0, df * 2.0, f); // smootstep from/to no of pixels distance fronm contour line.\n float c = smoothstep(0.0, df * 2.0, f);\n\n color = color * vec4(c, c, c, 1.0);\n }\n\n // Use two sided phong lighting. This has no effect if \"material\" property is not set.\n vec3 lightColor = getPhongLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n gl_FragColor = vec4(lightColor, 1.0);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
1
+ declare const fsShader = "#version 300 es\n#define SHADER_NAME terrainmap-shader\n\nprecision highp float;\n\n\nuniform bool isContoursDepth;\nuniform float contourReferencePoint;\nuniform float contourInterval;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nflat in int vertexIndex;\n\nin vec3 worldPos;\nin float property;\n\nuniform sampler2D colormap;\n\nuniform float valueRangeMin;\nuniform float valueRangeMax;\nuniform float colorMapRangeMin;\nuniform float colorMapRangeMax;\n\nuniform vec3 colorMapClampColor;\nuniform bool isClampColor;\nuniform bool isColorMapClampColorTransparent;\nuniform bool smoothShading;\n\n\nvoid main(void) { \n geometry.uv = vTexCoord;\n\n vec3 normal = normals_commonspace;\n // These are sent as Int8\n normal[0] /= 127.0;\n normal[1] /= 127.0;\n normal[2] /= 127.0;\n\n if (!smoothShading || (normal[0] == 0.0 && normal[1] == 0.0 && normal[2] == 0.0)) {\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n }\n\n //Picking pass.\n if (picking_uActive && !picking_uAttribute) {\n gl_FragColor = encodeVertexIndexToRGB(vertexIndex);\n return;\n }\n\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);;\n float propertyValue = property;\n\n // This may happen due to GPU interpolation precision causing color artifacts.\n propertyValue = clamp(propertyValue, valueRangeMin, valueRangeMax);\n\n float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);\n if (x < 0.0 || x > 1.0) {\n // Out of range. Use clampcolor.\n if (isClampColor) {\n color = vec4(colorMapClampColor.rgb, 1.0);\n\n }\n else if (isColorMapClampColorTransparent) {\n discard;\n return;\n }\n else {\n // Use min/max color to clamp.\n x = max(0.0, x);\n x = min(1.0, x);\n\n color = texture2D(colormap, vec2(x, 0.5));\n }\n }\n else {\n color = texture2D(colormap, vec2(x, 0.5));\n }\n\n \n bool is_contours = contourReferencePoint != -1.0 && contourInterval != -1.0;\n if (is_contours) {\n // Contours are made of either depths or properties.\n float val = isContoursDepth ? (abs(worldPos.z) - contourReferencePoint) / contourInterval\n : (propertyValue - contourReferencePoint) / contourInterval;\n\n float f = fract(val);\n float df = fwidth(val);\n\n // keep: float c = smoothstep(df * 1.0, df * 2.0, f); // smootstep from/to no of pixels distance fronm contour line.\n float c = smoothstep(0.0, df * 2.0, f);\n\n color = color * vec4(c, c, c, 1.0);\n }\n\n // Use two sided phong lighting. This has no effect if \"material\" property is not set.\n vec3 lightColor = getPhongLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n gl_FragColor = vec4(lightColor, 1.0);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n";
2
2
  export default fsShader;
@@ -54,6 +54,9 @@ void main(void) {
54
54
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);;
55
55
  float propertyValue = property;
56
56
 
57
+ // This may happen due to GPU interpolation precision causing color artifacts.
58
+ propertyValue = clamp(propertyValue, valueRangeMin, valueRangeMax);
59
+
57
60
  float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);
58
61
  if (x < 0.0 || x > 1.0) {
59
62
  // Out of range. Use clampcolor.
@@ -1 +1 @@
1
- {"version":3,"file":"fragment.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/map/fragment.fs.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"fragment.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/map/fragment.fs.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webviz/subsurface-viewer",
3
- "version": "0.27.9",
3
+ "version": "0.27.10",
4
4
  "description": "3D visualization component for subsurface reservoir data",
5
5
  "keywords": [
6
6
  "subsurface",
@@ -45,17 +45,17 @@
45
45
  "@equinor/eds-icons": "^0.21.0",
46
46
  "@nebula.gl/layers": "^1.0.4",
47
47
  "@reduxjs/toolkit": "^1.7.2",
48
- "@turf/simplify": "^6.5.0",
48
+ "@turf/simplify": "^7.0.0",
49
49
  "@vivaxy/png": "^1.3.0",
50
50
  "@webviz/wsc-common": "*",
51
- "ajv": "^8.14.0",
51
+ "ajv": "^8.16.0",
52
52
  "convert-units": "^2.3.4",
53
53
  "d3": "^7.8.2",
54
54
  "d3-color": "^3.1.0",
55
55
  "d3-format": "^3.1.0",
56
56
  "gl-matrix": "^3.4.3",
57
57
  "lodash": "^4.17.21",
58
- "mathjs": "^12.4.1",
58
+ "mathjs": "^13.0.0",
59
59
  "merge-refs": "^1.2.2",
60
60
  "react-redux": "^8.1.1",
61
61
  "workerpool": "^9.1.1"