@webviz/subsurface-viewer 0.14.0 → 0.14.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.
Files changed (36) hide show
  1. package/dist/SubsurfaceViewer.d.ts +3 -4
  2. package/dist/SubsurfaceViewer.js +3 -3
  3. package/dist/SubsurfaceViewer.js.map +1 -1
  4. package/dist/layers/grid3d/grid3dLayer.d.ts +2 -2
  5. package/dist/layers/grid3d/grid3dLayer.js +2 -2
  6. package/dist/layers/grid3d/privateGrid3dLayer.d.ts +3 -4
  7. package/dist/layers/grid3d/privateGrid3dLayer.js +5 -6
  8. package/dist/layers/grid3d/privateGrid3dLayer.js.map +1 -1
  9. package/dist/layers/grid3d/test_data/TruncatedSnubCube.d.ts +3 -3
  10. package/dist/layers/grid3d/test_data/TruncatedSnubCube.js +3 -3
  11. package/dist/layers/grid3d/test_data/TruncatedSnubCube.js.map +1 -1
  12. package/dist/layers/index.d.ts +0 -2
  13. package/dist/layers/index.js +0 -1
  14. package/dist/layers/index.js.map +1 -1
  15. package/dist/layers/map/mapLayer.d.ts +2 -2
  16. package/dist/layers/map/mapLayer.js +2 -2
  17. package/dist/layers/map/privateMapLayer.d.ts +3 -4
  18. package/dist/layers/map/privateMapLayer.js +8 -9
  19. package/dist/layers/map/privateMapLayer.js.map +1 -1
  20. package/dist/layers/piechart/pieChartLayer.d.ts +1 -1
  21. package/dist/layers/piechart/pieChartLayer.js +3 -3
  22. package/dist/layers/piechart/pieChartLayer.js.map +1 -1
  23. package/dist/layers/well_markers/wellMarkersLayer.d.ts +1 -1
  24. package/dist/redux/types.d.ts +0 -1
  25. package/dist/redux/types.js +1 -3
  26. package/dist/redux/types.js.map +1 -1
  27. package/package.json +1 -1
  28. package/dist/layers/terrain/map3DLayer.d.ts +0 -46
  29. package/dist/layers/terrain/map3DLayer.js +0 -319
  30. package/dist/layers/terrain/map3DLayer.js.map +0 -1
  31. package/dist/layers/terrain/terrainMapLayer.d.ts +0 -46
  32. package/dist/layers/terrain/terrainMapLayer.js +0 -186
  33. package/dist/layers/terrain/terrainMapLayer.js.map +0 -1
  34. package/dist/layers/terrain/terrainmap.fs.glsl.d.ts +0 -2
  35. package/dist/layers/terrain/terrainmap.fs.glsl.js +0 -134
  36. package/dist/layers/terrain/terrainmap.fs.glsl.js.map +0 -1
@@ -1,134 +0,0 @@
1
- const fsShader = `#version 300 es
2
- #define SHADER_NAME terrainmap-shader
3
-
4
- precision highp float;
5
-
6
- uniform bool hasTexture;
7
- uniform sampler2D sampler;
8
- uniform bool flatShading;
9
- uniform float opacity;
10
-
11
- uniform bool isContoursDepth;
12
-
13
- uniform float contourReferencePoint;
14
- uniform float contourInterval;
15
-
16
- in vec2 vTexCoord;
17
- in vec3 cameraPosition;
18
- in vec3 normals_commonspace;
19
- in vec4 position_commonspace;
20
- in vec4 vColor;
21
- in vec4 positions;
22
-
23
- out vec4 fragColor;
24
-
25
- in vec3 worldPos; // we export this from vertex shader (by injecting into it).
26
-
27
- uniform sampler2D colormap;
28
-
29
- uniform float valueRangeMin;
30
- uniform float valueRangeMax;
31
- uniform float colorMapRangeMin;
32
- uniform float colorMapRangeMax;
33
-
34
- uniform vec3 colorMapClampColor;
35
- uniform bool isClampColor;
36
- uniform bool isColorMapClampColorTransparent;
37
-
38
-
39
- void main(void) {
40
- geometry.uv = vTexCoord;
41
-
42
- vec3 normal;
43
- if (flatShading) {
44
- #ifdef DERIVATIVES_AVAILABLE
45
- normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));
46
- #else
47
- normal = vec3(0.0, 0.0, 1.0);
48
- #endif
49
- } else {
50
- normal = normals_commonspace;
51
- }
52
-
53
- vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;
54
-
55
- float texture_alpha = color.a;
56
-
57
- // Discard transparent pixels.
58
- if (!picking_uActive && color.w < 0.99) {
59
- discard;
60
- return;
61
- }
62
-
63
- // Picking pass.
64
- if (picking_uActive) {
65
- // Send texture coordinates.
66
- float s = vTexCoord.x;
67
- float t = vTexCoord.y;
68
- float b = texture_alpha > 0.95 ? 255.0 : 0.0;
69
-
70
- fragColor = vec4(s, t, b, 1.0);
71
- return;
72
- }
73
-
74
- float propertyValue = 0.0;
75
- if (hasTexture) {
76
- float opcacity = color.w;
77
- float floatScaler = 1.0 / (256.0 * 256.0 * 256.0 - 1.0);
78
- vec3 rgb = color.rgb;
79
- rgb *= vec3(16711680.0, 65280.0, 255.0); //255*256*256, 255*256, 255
80
- float propertyValue_norm = (rgb.r + rgb.g + rgb.b) * floatScaler; // propertyValue_norm will be in range [0-1]
81
-
82
- // If colorMapRangeMin/Max specified, color map will span this interval.
83
- propertyValue = propertyValue_norm * (valueRangeMax - valueRangeMin) + valueRangeMin;
84
- float x = (propertyValue - colorMapRangeMin) / (colorMapRangeMax - colorMapRangeMin);
85
- ;
86
- if (x < 0.0 || x > 1.0) {
87
- // Out of range. Use clampcolor.
88
- if (isClampColor) {
89
- color = vec4(colorMapClampColor.rgb, 1.0);
90
-
91
- }
92
- else if (isColorMapClampColorTransparent) {
93
- discard;
94
- return;
95
- }
96
- else {
97
- // Use min/max color to clamp.
98
- x = max(0.0, x);
99
- x = min(1.0, x);
100
-
101
- color = texture2D(colormap, vec2(x, 0.5));
102
- color.a = opcacity;
103
- }
104
- }
105
- else {
106
- color = texture2D(colormap, vec2(x, 0.5));
107
- color.a = opcacity;
108
- }
109
- }
110
-
111
- bool is_contours = contourReferencePoint != -1.0 && contourInterval != -1.0;
112
- if (is_contours) {
113
- // Contours are made of either depths or properties.
114
- float val = (hasTexture && !isContoursDepth) ? (propertyValue - contourReferencePoint) / contourInterval
115
- : (abs(worldPos.z) - contourReferencePoint) / contourInterval;
116
-
117
- float f = fract(val);
118
- float df = fwidth(val);
119
-
120
- // keep: float c = smoothstep(df * 1.0, df * 2.0, f); // smootstep from/to no of pixels distance fronm contour line.
121
- float c = smoothstep(0.0, df * 2.0, f);
122
-
123
- color = color * vec4(c, c, c, 1.0);
124
- }
125
-
126
- // Use normal lighting.
127
- vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);
128
- fragColor = vec4(lightColor, color.a * opacity);
129
-
130
- DECKGL_FILTER_COLOR(fragColor, geometry);
131
- }
132
- `;
133
- export default fsShader;
134
- //# sourceMappingURL=terrainmap.fs.glsl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"terrainmap.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/terrain/terrainmap.fs.glsl.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}