@webviz/subsurface-viewer 1.11.8 → 1.11.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.
Files changed (123) hide show
  1. package/dist/components/ColorLegend.d.ts +3 -3
  2. package/dist/components/ColorLegend.js.map +1 -1
  3. package/dist/components/ColorLegends.d.ts +2 -2
  4. package/dist/components/Map.d.ts +1 -7
  5. package/dist/components/Map.js.map +1 -1
  6. package/dist/layers/axes/box.fs.glsl.d.ts +1 -1
  7. package/dist/layers/axes/box.fs.glsl.js +3 -3
  8. package/dist/layers/axes/box.vs.glsl.d.ts +1 -1
  9. package/dist/layers/axes/box.vs.glsl.js +4 -0
  10. package/dist/layers/axes/box.vs.glsl.js.map +1 -1
  11. package/dist/layers/axes/boxLayer.d.ts +1 -2
  12. package/dist/layers/axes/boxLayer.js +4 -8
  13. package/dist/layers/axes/boxLayer.js.map +1 -1
  14. package/dist/layers/axes2d/axes2DLayer.js +13 -24
  15. package/dist/layers/axes2d/axes2DLayer.js.map +1 -1
  16. package/dist/layers/colormap/colormap.fs.glsl.d.ts +1 -1
  17. package/dist/layers/colormap/colormap.fs.glsl.js +4 -4
  18. package/dist/layers/colormap/colormapLayer.d.ts +4 -3
  19. package/dist/layers/colormap/colormapLayer.js +31 -50
  20. package/dist/layers/colormap/colormapLayer.js.map +1 -1
  21. package/dist/layers/drawing/drawingLayer.js.map +1 -1
  22. package/dist/layers/gpglLayers/typeDefs.d.ts +24 -0
  23. package/dist/layers/gpglLayers/typeDefs.js +3 -0
  24. package/dist/layers/gpglLayers/typeDefs.js.map +1 -0
  25. package/dist/layers/grid3d/cellProperty.fs.glsl.d.ts +1 -1
  26. package/dist/layers/grid3d/cellProperty.fs.glsl.js +13 -12
  27. package/dist/layers/grid3d/cellProperty.fs.glsl.js.map +1 -1
  28. package/dist/layers/grid3d/cellProperty.vs.glsl.d.ts +1 -1
  29. package/dist/layers/grid3d/cellProperty.vs.glsl.js +3 -2
  30. package/dist/layers/grid3d/cellProperty.vs.glsl.js.map +1 -1
  31. package/dist/layers/grid3d/grid3dLayer.d.ts +5 -4
  32. package/dist/layers/grid3d/grid3dLayer.js +7 -7
  33. package/dist/layers/grid3d/line.fs.glsl.d.ts +1 -1
  34. package/dist/layers/grid3d/line.fs.glsl.js +3 -1
  35. package/dist/layers/grid3d/line.fs.glsl.js.map +1 -1
  36. package/dist/layers/grid3d/line.vs.glsl.d.ts +1 -1
  37. package/dist/layers/grid3d/line.vs.glsl.js +4 -0
  38. package/dist/layers/grid3d/line.vs.glsl.js.map +1 -1
  39. package/dist/layers/grid3d/nodeProperty.fs.glsl.d.ts +1 -1
  40. package/dist/layers/grid3d/nodeProperty.fs.glsl.js +5 -4
  41. package/dist/layers/grid3d/nodeProperty.fs.glsl.js.map +1 -1
  42. package/dist/layers/grid3d/nodeProperty.vs.glsl.d.ts +1 -1
  43. package/dist/layers/grid3d/nodeProperty.vs.glsl.js +3 -2
  44. package/dist/layers/grid3d/nodeProperty.vs.glsl.js.map +1 -1
  45. package/dist/layers/grid3d/privateGrid3dLayer.d.ts +7 -25
  46. package/dist/layers/grid3d/privateGrid3dLayer.js +59 -97
  47. package/dist/layers/grid3d/privateGrid3dLayer.js.map +1 -1
  48. package/dist/layers/grid3d/typeDefs.d.ts +0 -6
  49. package/dist/layers/hillshading2d/hillshading2dLayer.js +10 -10
  50. package/dist/layers/map/line.fs.glsl.d.ts +1 -1
  51. package/dist/layers/map/line.fs.glsl.js +2 -1
  52. package/dist/layers/map/line.fs.glsl.js.map +1 -1
  53. package/dist/layers/map/line.vs.glsl.d.ts +1 -1
  54. package/dist/layers/map/line.vs.glsl.js +4 -0
  55. package/dist/layers/map/line.vs.glsl.js.map +1 -1
  56. package/dist/layers/map/map.fs.glsl.d.ts +1 -1
  57. package/dist/layers/map/map.fs.glsl.js +9 -11
  58. package/dist/layers/map/map.fs.glsl.js.map +1 -1
  59. package/dist/layers/map/map.vs.glsl.d.ts +1 -1
  60. package/dist/layers/map/map.vs.glsl.js +2 -4
  61. package/dist/layers/map/map.vs.glsl.js.map +1 -1
  62. package/dist/layers/map/mapLayer.d.ts +2 -1
  63. package/dist/layers/map/mapLayer.js +5 -62
  64. package/dist/layers/map/mapLayer.js.map +1 -1
  65. package/dist/layers/map/privateMapLayer.d.ts +7 -7
  66. package/dist/layers/map/privateMapLayer.js +46 -45
  67. package/dist/layers/map/privateMapLayer.js.map +1 -1
  68. package/dist/layers/northarrow/northArrow3DLayer.js +4 -8
  69. package/dist/layers/northarrow/northArrow3DLayer.js.map +1 -1
  70. package/dist/layers/northarrow/northarrow.fs.glsl.d.ts +1 -1
  71. package/dist/layers/northarrow/northarrow.fs.glsl.js +1 -1
  72. package/dist/layers/piechart/pieChartLayer.js +4 -7
  73. package/dist/layers/piechart/pieChartLayer.js.map +1 -1
  74. package/dist/layers/piechart/piechart.fs.glsl.d.ts +1 -1
  75. package/dist/layers/piechart/piechart.fs.glsl.js +1 -1
  76. package/dist/layers/points/point.vs.glsl.d.ts +1 -1
  77. package/dist/layers/points/point.vs.glsl.js +2 -2
  78. package/dist/layers/polylines/polyline.vs.glsl.d.ts +1 -1
  79. package/dist/layers/polylines/polyline.vs.glsl.js +1 -1
  80. package/dist/layers/polylines/polylinesLayer.js +1 -1
  81. package/dist/layers/polylines/polylinesLayer.js.map +1 -1
  82. package/dist/layers/selectable_geojson/selectableGeoJsonLayer.js.map +1 -1
  83. package/dist/layers/shader_modules/decoder.fs.glsl.d.ts +1 -1
  84. package/dist/layers/shader_modules/decoder.fs.glsl.js +4 -4
  85. package/dist/layers/triangle/line.fs.glsl.d.ts +1 -1
  86. package/dist/layers/triangle/line.fs.glsl.js +4 -1
  87. package/dist/layers/triangle/line.fs.glsl.js.map +1 -1
  88. package/dist/layers/triangle/line.vs.glsl.d.ts +1 -1
  89. package/dist/layers/triangle/line.vs.glsl.js +4 -1
  90. package/dist/layers/triangle/line.vs.glsl.js.map +1 -1
  91. package/dist/layers/triangle/privateTriangleLayer.d.ts +2 -3
  92. package/dist/layers/triangle/privateTriangleLayer.js +4 -12
  93. package/dist/layers/triangle/privateTriangleLayer.js.map +1 -1
  94. package/dist/layers/triangle/triangle.fs.glsl.d.ts +1 -1
  95. package/dist/layers/triangle/triangle.fs.glsl.js +5 -5
  96. package/dist/layers/triangle/triangle.vs.glsl.d.ts +1 -1
  97. package/dist/layers/triangle/triangle.vs.glsl.js +3 -5
  98. package/dist/layers/triangle/triangle.vs.glsl.js.map +1 -1
  99. package/dist/layers/triangle/triangleLayer.d.ts +2 -1
  100. package/dist/layers/triangle/triangleLayer.js.map +1 -1
  101. package/dist/layers/utils/colormapTools.d.ts +46 -0
  102. package/dist/layers/utils/colormapTools.js +79 -0
  103. package/dist/layers/utils/colormapTools.js.map +1 -0
  104. package/dist/layers/utils/layerTools.d.ts +9 -19
  105. package/dist/layers/utils/layerTools.js +0 -42
  106. package/dist/layers/utils/layerTools.js.map +1 -1
  107. package/dist/layers/well_markers/marker.fs.glsl.d.ts +1 -1
  108. package/dist/layers/well_markers/marker.fs.glsl.js +2 -2
  109. package/dist/layers/well_markers/marker.vs.glsl.d.ts +1 -1
  110. package/dist/layers/well_markers/marker.vs.glsl.js +3 -5
  111. package/dist/layers/well_markers/marker.vs.glsl.js.map +1 -1
  112. package/dist/layers/wells/wellsLayer.d.ts +2 -1
  113. package/dist/layers/wells/wellsLayer.js.map +1 -1
  114. package/dist/utils/index.d.ts +2 -0
  115. package/dist/utils/index.js +1 -0
  116. package/dist/utils/index.js.map +1 -1
  117. package/dist/utils/serialize.d.ts +23 -0
  118. package/dist/utils/serialize.js +105 -0
  119. package/dist/utils/serialize.js.map +1 -0
  120. package/dist/utils/typedArray.d.ts +44 -0
  121. package/dist/utils/typedArray.js +42 -0
  122. package/dist/utils/typedArray.js.map +1 -0
  123. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- declare const _default: "#version 300 es\n#define SHADER_NAME grid3d-node-fragment-shader\n\nin vec3 cameraPosition;\nin vec4 position_commonspace;\nin float property;\n\nflat in vec3 normal;\nflat in int vertexIndex;\n\nout vec4 fragColor;\n\nuniform sampler2D colormap;\n\nvec4 getPropertyColor (float propertyValue) {\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n float normalizedValue = (propertyValue - grid.colorMapRangeMin) / (grid.colorMapRangeMax - grid.colorMapRangeMin);\n if (normalizedValue < 0.0 || normalizedValue > 1.0) {\n // Out of range. Use clampcolor.\n if (grid.isClampColor) {\n color = grid.colorMapClampColor;\n if( color[3] == 0.0 ) {\n discard;\n }\n }\n else {\n // Use min/max color to clamp.\n normalizedValue = clamp (normalizedValue, 0.0, 1.0); \n color = texture(colormap, vec2(normalizedValue, 0.5));\n }\n }\n else {\n color = texture(colormap, vec2(normalizedValue, 0.5));\n }\n return color;\n}\n\n\nvoid main(void) {\n if (picking.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n fragColor = encodeVertexIndexToRGB(vertexIndex); \n return;\n }\n \n // This may happen due to GPU interpolation precision causing color artifacts.\n float propertyValue = clamp(property, grid.valueRangeMin, grid.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 = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, 1.0);\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
1
+ declare const _default: "#version 300 es\n#define SHADER_NAME grid3d-node-fragment-shader\n\nin vec3 cameraPosition;\nin vec4 position_commonspace;\nin float property;\nin vec4 vColor;\n\nflat in vec3 normal;\nflat in int vertexIndex;\n\nout vec4 fragColor;\n\nuniform sampler2D colormap;\n\nvec4 getPropertyColor (float propertyValue) {\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n float normalizedValue = (propertyValue - grid.colormapRangeMin) / (grid.colormapRangeMax - grid.colormapRangeMin);\n if (normalizedValue < 0.0 || normalizedValue > 1.0) {\n // Out of range. Use clampcolor.\n if (grid.isClampColor) {\n color = grid.colormapClampColor;\n if( color[3] == 0.0 ) {\n discard;\n }\n }\n else {\n // Use min/max color to clamp.\n normalizedValue = clamp (normalizedValue, 0.0, 1.0); \n color = texture(colormap, vec2(normalizedValue, 0.5));\n }\n }\n else {\n color = texture(colormap, vec2(normalizedValue, 0.5));\n }\n return color;\n}\n\n\nvoid main(void) {\n if (picking.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n fragColor = encodeVertexIndexToRGB(vertexIndex); \n return;\n }\n\n // This may happen due to GPU interpolation precision causing color artifacts.\n float propertyValue = clamp(property, grid.valueRangeMin, grid.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 = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, vColor.a);\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
2
2
  export default _default;
@@ -5,6 +5,7 @@ export default `\
5
5
  in vec3 cameraPosition;
6
6
  in vec4 position_commonspace;
7
7
  in float property;
8
+ in vec4 vColor;
8
9
 
9
10
  flat in vec3 normal;
10
11
  flat in int vertexIndex;
@@ -15,11 +16,11 @@ uniform sampler2D colormap;
15
16
 
16
17
  vec4 getPropertyColor (float propertyValue) {
17
18
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
18
- float normalizedValue = (propertyValue - grid.colorMapRangeMin) / (grid.colorMapRangeMax - grid.colorMapRangeMin);
19
+ float normalizedValue = (propertyValue - grid.colormapRangeMin) / (grid.colormapRangeMax - grid.colormapRangeMin);
19
20
  if (normalizedValue < 0.0 || normalizedValue > 1.0) {
20
21
  // Out of range. Use clampcolor.
21
22
  if (grid.isClampColor) {
22
- color = grid.colorMapClampColor;
23
+ color = grid.colormapClampColor;
23
24
  if( color[3] == 0.0 ) {
24
25
  discard;
25
26
  }
@@ -42,7 +43,7 @@ void main(void) {
42
43
  fragColor = encodeVertexIndexToRGB(vertexIndex);
43
44
  return;
44
45
  }
45
-
46
+
46
47
  // This may happen due to GPU interpolation precision causing color artifacts.
47
48
  float propertyValue = clamp(property, grid.valueRangeMin, grid.valueRangeMax);
48
49
 
@@ -50,7 +51,7 @@ void main(void) {
50
51
 
51
52
  // Use two sided phong lighting. This has no effect if "material" property is not set.
52
53
  vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);
53
- fragColor = vec4(lightColor, 1.0);
54
+ fragColor = vec4(lightColor, vColor.a);
54
55
  DECKGL_FILTER_COLOR(fragColor, geometry);
55
56
  }
56
57
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"nodeProperty.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/nodeProperty.fs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDd,CAAC"}
1
+ {"version":3,"file":"nodeProperty.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/nodeProperty.fs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDd,CAAC"}
@@ -1,2 +1,2 @@
1
- declare const _default: "#version 300 es\n#define SHADER_NAME grid3d-node-vertex-shader\n\nin vec3 positions;\nin vec3 normals;\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\nconst vec3 pickingColor = vec3(1.0, 1.0, 0.0);\n\nvoid main(void) { \n vertexIndex = gl_VertexID;\n cameraPosition = project.cameraPosition; \n geometry.pickingColor = pickingColor;\n\n normal = normals;\n vec3 position = positions;\n\n float zSign = grid.ZIncreasingDownwards ? -1.0 : 1.0;\n\n position.z *= zSign;\n normal.z *= zSign;\n\n switch(int(grid.coloringMode)) {\n case 2:\n property = position.x;\n break;\n case 3:\n property = position.y;\n break;\n case 4:\n property = position.z;\n break;\n // case 0 or default should never be used\n default:\n property = position.z;\n 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 _default: "#version 300 es\n#define SHADER_NAME grid3d-node-vertex-shader\n\nin vec3 positions;\nin vec3 normals;\n\n// Outputs to fragment shader\nout vec3 cameraPosition;\nout vec4 position_commonspace;\nout float property;\nout vec4 vColor;\n\nflat out vec3 normal;\nflat out int vertexIndex;\n\nconst vec3 pickingColor = vec3(1.0, 1.0, 0.0);\n\nvoid main(void) { \n vertexIndex = gl_VertexID;\n cameraPosition = project.cameraPosition; \n geometry.pickingColor = pickingColor;\n\n normal = normals;\n vec3 position = positions;\n\n float zSign = grid.ZIncreasingDownwards ? -1.0 : 1.0;\n\n position.z *= zSign;\n normal.z *= zSign;\n\n switch(int(grid.coloringMode)) {\n case 2:\n property = position.x;\n break;\n case 3:\n property = position.y;\n break;\n case 4:\n property = position.z;\n break;\n // case 0 or default should never be used\n default:\n property = position.z;\n 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 vColor = vec4(0.0, 0.0, 0.0, layer.opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n";
2
2
  export default _default;
@@ -9,6 +9,7 @@ in vec3 normals;
9
9
  out vec3 cameraPosition;
10
10
  out vec4 position_commonspace;
11
11
  out float property;
12
+ out vec4 vColor;
12
13
 
13
14
  flat out vec3 normal;
14
15
  flat out int vertexIndex;
@@ -49,8 +50,8 @@ void main(void) {
49
50
 
50
51
  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
51
52
 
52
- vec4 color = vec4(0.0);
53
- DECKGL_FILTER_COLOR(color, geometry);
53
+ vColor = vec4(0.0, 0.0, 0.0, layer.opacity);
54
+ DECKGL_FILTER_COLOR(vColor, geometry);
54
55
  }
55
56
  `;
56
57
  //# sourceMappingURL=nodeProperty.vs.glsl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeProperty.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/nodeProperty.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDd,CAAC"}
1
+ {"version":3,"file":"nodeProperty.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/grid3d/nodeProperty.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDd,CAAC"}
@@ -2,19 +2,19 @@ import type { Color, PickingInfo, UpdateParameters, LayerContext } from "@deck.g
2
2
  import { Layer } from "@deck.gl/core";
3
3
  import type { UniformValue } from "@luma.gl/core";
4
4
  import { Model } from "@luma.gl/engine";
5
- import type { DeckGLLayerContext } from "../../components/Map";
6
- import type { ExtendedLayerProps, LayerPickInfo, ColorMapFunctionType } from "../utils/layerTools";
5
+ import type { DeckGLLayerContext, ExtendedLayerProps, LayerPickInfo } from "../utils/layerTools";
6
+ import { type ColorMapFunctionType } from "../utils/colormapTools";
7
7
  import { TGrid3DColoringMode, type IDiscretePropertyValueName } from "./grid3dLayer";
8
8
  import type { MeshType, MeshTypeLines } from "./typeDefs";
9
9
  export interface PrivateLayerProps extends ExtendedLayerProps {
10
10
  mesh: MeshType;
11
11
  meshLines: MeshTypeLines;
12
- colorMapName: string;
13
- colorMapRange: [number, number];
14
- colorMapClampColor: Color | undefined | boolean;
12
+ colormapName: string;
13
+ colormapRange: [number, number];
14
+ colormapClampColor: Color | undefined | boolean;
15
15
  undefinedPropertyValue: number;
16
16
  undefinedPropertyColor: [number, number, number];
17
- colorMapFunction?: ColorMapFunctionType;
17
+ colormapFunction?: ColorMapFunctionType;
18
18
  coloringMode: TGrid3DColoringMode.Property;
19
19
  gridLines: boolean;
20
20
  propertyValueRange: [number, number];
@@ -31,24 +31,7 @@ export default class PrivateLayer extends Layer<PrivateLayerProps> {
31
31
  initializeState(context: DeckGLLayerContext): void;
32
32
  shouldUpdateState({ props, oldProps, context, changeFlags, }: UpdateParameters<Layer<PrivateLayerProps>>): boolean;
33
33
  updateState({ context }: UpdateParameters<Layer<PrivateLayerProps>>): void;
34
- _getModels(context: DeckGLLayerContext): (Model | {
35
- readonly name: "grid";
36
- readonly vs: "uniform gridUniforms {\n bool ZIncreasingDownwards;\n float valueRangeMin;\n float valueRangeMax;\n float colorMapRangeMin;\n float colorMapRangeMax;\n vec4 colorMapClampColor;\n bool isClampColor;\n float coloringMode;\n vec3 undefinedPropertyColor;\n bool isColoringDiscrete;\n float colorMapSize;\n} grid;\n";
37
- readonly fs: "uniform gridUniforms {\n bool ZIncreasingDownwards;\n float valueRangeMin;\n float valueRangeMax;\n float colorMapRangeMin;\n float colorMapRangeMax;\n vec4 colorMapClampColor;\n bool isClampColor;\n float coloringMode;\n vec3 undefinedPropertyColor;\n bool isColoringDiscrete;\n float colorMapSize;\n} grid;\n";
38
- readonly uniformTypes: {
39
- readonly ZIncreasingDownwards: "u32";
40
- readonly valueRangeMin: "f32";
41
- readonly valueRangeMax: "f32";
42
- readonly colorMapRangeMin: "f32";
43
- readonly colorMapRangeMax: "f32";
44
- readonly colorMapClampColor: "vec4<f32>";
45
- readonly isClampColor: "u32";
46
- readonly coloringMode: "f32";
47
- readonly undefinedPropertyColor: "vec3<f32>";
48
- readonly isColoringDiscrete: "u32";
49
- readonly colorMapSize: "f32";
50
- };
51
- })[];
34
+ _getModels(context: DeckGLLayerContext): Model[];
52
35
  draw(args: {
53
36
  moduleParameters?: unknown;
54
37
  uniforms: UniformValue;
@@ -62,5 +45,4 @@ export default class PrivateLayer extends Layer<PrivateLayerProps> {
62
45
  private getPropertyText;
63
46
  private getColoringHints;
64
47
  private getUniforms;
65
- private getColormapTexture;
66
48
  }
@@ -1,9 +1,10 @@
1
1
  import { COORDINATE_SYSTEM, Layer, picking, project32 } from "@deck.gl/core";
2
2
  import { Geometry, Model } from "@luma.gl/engine";
3
- import { utilities } from "../shader_modules";
4
3
  import { lighting } from "@luma.gl/shadertools";
4
+ import { utilities } from "../shader_modules";
5
5
  import { phongMaterial } from "../shader_modules/phong-lighting/phong-material";
6
- import { createPropertyData, getImageData } from "../utils/layerTools";
6
+ import { createPropertyData } from "../utils/layerTools";
7
+ import { createColormapTexture, } from "../utils/colormapTools";
7
8
  import linearFragmentShader from "./nodeProperty.fs.glsl";
8
9
  import linearVertexShader from "./nodeProperty.vs.glsl";
9
10
  import flatFragmentShader from "./cellProperty.fs.glsl";
@@ -12,21 +13,9 @@ import fsLineShader from "./line.fs.glsl";
12
13
  import vsLineShader from "./line.vs.glsl";
13
14
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports
14
15
  import { isDiscreteProperty, isGeometricProperty, } from "./grid3dLayer";
15
- const DEFAULT_TEXTURE_PARAMETERS = {
16
- addressModeU: "clamp-to-edge",
17
- addressModeV: "clamp-to-edge",
18
- minFilter: "linear",
19
- magFilter: "linear",
20
- };
21
- const DISCRETE_TEXTURE_PARAMETERS = {
22
- minFilter: "nearest",
23
- magFilter: "nearest",
24
- addressModeU: "clamp-to-edge",
25
- addressModeV: "clamp-to-edge",
26
- };
27
16
  const defaultProps = {
28
- colorMapName: "",
29
- colorMapClampColor: [200, 200, 200],
17
+ colormapName: "",
18
+ colormapClampColor: [200, 200, 200],
30
19
  coloringMode: 0,
31
20
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
32
21
  propertyValueRange: [0.0, 1.0],
@@ -63,27 +52,19 @@ export default class PrivateLayer extends Layer {
63
52
  }
64
53
  //eslint-disable-next-line
65
54
  _getModels(context) {
66
- var _a;
55
+ var _a, _b;
67
56
  const geometricShading = isGeometricProperty(this.props.coloringMode);
68
57
  const uniforms = this.getUniforms();
69
- const colormap = this.getColormapTexture(context);
70
- const mesh_model = new Model(context.device, {
71
- id: `${this.props.id}-mesh`,
58
+ const colormap = createColormapTexture((_a = this.props.colormapFunction) !== null && _a !== void 0 ? _a : {
59
+ colormapName: this.props.colormapName,
60
+ colorTables: this.context.userData
61
+ .colorTables,
62
+ }, context, this.getColoringHints());
63
+ const mesh_model = new Model(context.device, Object.assign(Object.assign({ id: `${this.props.id}-mesh` }, super.getShaders({
72
64
  vs: geometricShading ? linearVertexShader : flatVertexShader,
73
- fs: geometricShading ? linearFragmentShader : flatFragmentShader,
74
- geometry: new Geometry({
75
- topology: (_a = this.props.mesh.drawMode) !== null && _a !== void 0 ? _a : "triangle-list",
76
- attributes: Object.assign({ positions: this.props.mesh.attributes.positions, normals: this.props.mesh.attributes.normals }, (geometricShading
77
- ? {}
78
- : {
79
- properties: this.props.mesh.attributes.properties,
80
- })),
81
- vertexCount: this.props.mesh.vertexCount,
82
- }),
83
- bufferLayout: this.getAttributeManager().getBufferLayouts(),
84
- bindings: {
85
- colormap,
86
- },
65
+ fs: geometricShading
66
+ ? linearFragmentShader
67
+ : flatFragmentShader,
87
68
  modules: [
88
69
  project32,
89
70
  picking,
@@ -92,24 +73,29 @@ export default class PrivateLayer extends Layer {
92
73
  utilities,
93
74
  gridUniforms,
94
75
  ],
95
- isInstanced: false,
96
- });
76
+ })), { geometry: new Geometry({
77
+ topology: (_b = this.props.mesh.drawMode) !== null && _b !== void 0 ? _b : "triangle-list",
78
+ attributes: Object.assign({ positions: this.props.mesh.attributes.positions, normals: this.props.mesh.attributes.normals }, (geometricShading
79
+ ? {}
80
+ : {
81
+ properties: this.props.mesh.attributes.properties,
82
+ })),
83
+ vertexCount: this.props.mesh.vertexCount,
84
+ }), bufferLayout: this.getAttributeManager().getBufferLayouts(), bindings: {
85
+ colormap,
86
+ }, isInstanced: false }));
97
87
  mesh_model.shaderInputs.setProps({
98
88
  grid: Object.assign({}, uniforms),
99
89
  });
100
- const mesh_lines_model = new Model(context.device, {
101
- id: `${this.props.id}-lines`,
90
+ const mesh_lines_model = new Model(context.device, Object.assign(Object.assign({ id: `${this.props.id}-lines` }, super.getShaders({
102
91
  vs: vsLineShader,
103
92
  fs: fsLineShader,
104
- geometry: new Geometry(this.props.meshLines),
105
- bufferLayout: this.getAttributeManager().getBufferLayouts(),
106
93
  modules: [project32, picking, gridUniforms],
107
- isInstanced: false,
108
- });
94
+ })), { geometry: new Geometry(this.props.meshLines), bufferLayout: this.getAttributeManager().getBufferLayouts(), isInstanced: false }));
109
95
  mesh_lines_model.shaderInputs.setProps({
110
96
  grid: Object.assign({}, uniforms),
111
97
  });
112
- return [mesh_model, mesh_lines_model, gridUniforms];
98
+ return [mesh_model, mesh_lines_model];
113
99
  }
114
100
  draw(args) {
115
101
  if (!this.state["models"]) {
@@ -189,10 +175,10 @@ export default class PrivateLayer extends Layer {
189
175
  }
190
176
  getColoringHints() {
191
177
  var _a, _b;
192
- if (this.props.colorMapFunction instanceof Uint8Array) {
178
+ if (this.props.colormapFunction instanceof Uint8Array) {
193
179
  return {
194
180
  discreteData: true,
195
- colormapSize: this.props.colorMapFunction.length / 3,
181
+ colormapSize: this.props.colormapFunction.length / 3,
196
182
  };
197
183
  }
198
184
  if (isDiscreteProperty(this.props.coloringMode)) {
@@ -213,26 +199,26 @@ export default class PrivateLayer extends Layer {
213
199
  var _a, _b, _c, _d, _e, _f, _g, _h;
214
200
  const valueRangeMin = (_b = (_a = this.props.propertyValueRange) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 0.0;
215
201
  const valueRangeMax = (_d = (_c = this.props.propertyValueRange) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : 1.0;
216
- // If specified color map will extend from colorMapRangeMin to colorMapRangeMax.
202
+ // If specified color map will extend from colormapRangeMin to colormapRangeMax.
217
203
  // Otherwise it will extend from valueRangeMin to valueRangeMax.
218
- const colorMapRangeMin = (_f = (_e = this.props.colorMapRange) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : valueRangeMin;
219
- const colorMapRangeMax = (_h = (_g = this.props.colorMapRange) === null || _g === void 0 ? void 0 : _g[1]) !== null && _h !== void 0 ? _h : valueRangeMax;
220
- const isColorMapClampColorTransparent = this.props.colorMapClampColor === false;
221
- const hasClampColor = this.props.colorMapClampColor !== undefined &&
222
- this.props.colorMapClampColor !== true &&
223
- this.props.colorMapClampColor !== false;
224
- let colorMapClampColor = (hasClampColor ? this.props.colorMapClampColor : [0, 0, 0, 255]);
225
- if (isColorMapClampColorTransparent) {
226
- colorMapClampColor = [0, 0, 0, 0];
204
+ const colormapRangeMin = (_f = (_e = this.props.colormapRange) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : valueRangeMin;
205
+ const colormapRangeMax = (_h = (_g = this.props.colormapRange) === null || _g === void 0 ? void 0 : _g[1]) !== null && _h !== void 0 ? _h : valueRangeMax;
206
+ const isColormapClampColorTransparent = this.props.colormapClampColor === false;
207
+ const hasClampColor = this.props.colormapClampColor !== undefined &&
208
+ this.props.colormapClampColor !== true &&
209
+ this.props.colormapClampColor !== false;
210
+ let colormapClampColor = (hasClampColor ? this.props.colormapClampColor : [0, 0, 0, 255]);
211
+ if (isColormapClampColorTransparent) {
212
+ colormapClampColor = [0, 0, 0, 0];
227
213
  }
228
- if (colorMapClampColor.length === 3) {
229
- colorMapClampColor = [...colorMapClampColor, 255];
214
+ if (colormapClampColor.length === 3) {
215
+ colormapClampColor = [...colormapClampColor, 255];
230
216
  }
231
- const isClampColor = hasClampColor || isColorMapClampColorTransparent;
217
+ const isClampColor = hasClampColor || isColormapClampColorTransparent;
232
218
  // Normalize to [0,1] range.
233
- const colorMapClampColorUniform = colorMapClampColor.map((x) => (x !== null && x !== void 0 ? x : 0) / 255);
234
- if (isColorMapClampColorTransparent) {
235
- colorMapClampColor[3] = 0;
219
+ const colormapClampColorUniform = colormapClampColor.map((x) => (x !== null && x !== void 0 ? x : 0) / 255);
220
+ if (isColormapClampColorTransparent) {
221
+ colormapClampColor[3] = 0;
236
222
  }
237
223
  const undefinedPropertyColorUniform = this.props.undefinedPropertyColor.map((x) => (x !== null && x !== void 0 ? x : 0) / 255);
238
224
  const coloringHints = this.getColoringHints();
@@ -240,39 +226,15 @@ export default class PrivateLayer extends Layer {
240
226
  ZIncreasingDownwards: this.props.ZIncreasingDownwards,
241
227
  valueRangeMin,
242
228
  valueRangeMax,
243
- colorMapRangeMin,
244
- colorMapRangeMax,
245
- colorMapClampColor: Array.from(colorMapClampColorUniform),
229
+ colormapRangeMin: colormapRangeMin,
230
+ colormapRangeMax: colormapRangeMax,
231
+ colormapClampColor: Array.from(colormapClampColorUniform),
246
232
  isClampColor,
247
233
  coloringMode: this.props.coloringMode,
248
234
  undefinedPropertyColor: undefinedPropertyColorUniform,
249
235
  isColoringDiscrete: coloringHints.discreteData,
250
- colorMapSize: coloringHints.colormapSize,
251
- };
252
- }
253
- getColormapTexture(context) {
254
- const textureProps = {
255
- sampler: DEFAULT_TEXTURE_PARAMETERS,
256
- width: 256,
257
- height: 1,
258
- format: "rgb8unorm-webgl",
236
+ colormapSize: coloringHints.colormapSize,
259
237
  };
260
- const colormapHints = this.getColoringHints();
261
- if (colormapHints.discreteData) {
262
- if (colormapHints.colormapSize === 0) {
263
- const colormap = context.device.createTexture(Object.assign(Object.assign({}, textureProps), { sampler: DISCRETE_TEXTURE_PARAMETERS, width: colormapHints.colormapSize, data: new Uint8Array([0, 0, 0, 0, 0, 0]) }));
264
- return colormap;
265
- }
266
- const colormapData = this.props.colorMapFunction instanceof Uint8Array
267
- ? this.props.colorMapFunction
268
- : getImageData(this.props.colorMapName, this.context.userData
269
- .colorTables, this.props.colorMapFunction, colormapHints.colormapSize, colormapHints.discreteData);
270
- const colormap = context.device.createTexture(Object.assign(Object.assign({}, textureProps), { sampler: DISCRETE_TEXTURE_PARAMETERS, width: colormapHints.colormapSize, data: colormapData }));
271
- return colormap;
272
- }
273
- const data = getImageData(this.props.colorMapName, this.context.userData.colorTables, this.props.colorMapFunction);
274
- const colormap = context.device.createTexture(Object.assign(Object.assign({}, textureProps), { data: data }));
275
- return colormap;
276
238
  }
277
239
  }
278
240
  PrivateLayer.layerName = "PrivateLayer";
@@ -283,14 +245,14 @@ uniform gridUniforms {
283
245
  bool ZIncreasingDownwards;
284
246
  float valueRangeMin;
285
247
  float valueRangeMax;
286
- float colorMapRangeMin;
287
- float colorMapRangeMax;
288
- vec4 colorMapClampColor;
248
+ float colormapRangeMin;
249
+ float colormapRangeMax;
250
+ vec4 colormapClampColor;
289
251
  bool isClampColor;
290
252
  float coloringMode;
291
253
  vec3 undefinedPropertyColor;
292
254
  bool isColoringDiscrete;
293
- float colorMapSize;
255
+ float colormapSize;
294
256
  } grid;
295
257
  `;
296
258
  const gridUniforms = {
@@ -301,14 +263,14 @@ const gridUniforms = {
301
263
  ZIncreasingDownwards: "u32",
302
264
  valueRangeMin: "f32",
303
265
  valueRangeMax: "f32",
304
- colorMapRangeMin: "f32",
305
- colorMapRangeMax: "f32",
306
- colorMapClampColor: "vec4<f32>",
266
+ colormapRangeMin: "f32",
267
+ colormapRangeMax: "f32",
268
+ colormapClampColor: "vec4<f32>",
307
269
  isClampColor: "u32",
308
270
  coloringMode: "f32",
309
271
  undefinedPropertyColor: "vec3<f32>",
310
272
  isColoringDiscrete: "u32",
311
- colorMapSize: "f32",
273
+ colormapSize: "f32",
312
274
  },
313
275
  };
314
276
  //# sourceMappingURL=privateGrid3dLayer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"privateGrid3dLayer.js","sourceRoot":"","sources":["../../../src/layers/grid3d/privateGrid3dLayer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAO7E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,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@ -36,12 +36,6 @@ export type MeshTypeLines = {
36
36
  };
37
37
  vertexCount: number;
38
38
  };
39
- export type Material = {
40
- ambient: number;
41
- diffuse: number;
42
- shininess: number;
43
- specularColor: [number, number, number];
44
- } | boolean;
45
39
  export type WebWorkerParams = {
46
40
  points: Float32Array;
47
41
  polys: Uint32Array;
@@ -55,8 +55,8 @@ export default class Hillshading2DLayer extends BitmapLayer {
55
55
  }
56
56
  const valueRangeMin = (_c = this.props.valueRange[0]) !== null && _c !== void 0 ? _c : 0.0;
57
57
  const valueRangeMax = (_d = this.props.valueRange[1]) !== null && _d !== void 0 ? _d : 1.0;
58
- const colorMapRangeMin = (_f = (_e = this.props.colorMapRange) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : valueRangeMin;
59
- const colorMapRangeMax = (_h = (_g = this.props.colorMapRange) === null || _g === void 0 ? void 0 : _g[1]) !== null && _h !== void 0 ? _h : valueRangeMax;
58
+ const colormapRangeMin = (_f = (_e = this.props.colorMapRange) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : valueRangeMin;
59
+ const colormapRangeMax = (_h = (_g = this.props.colorMapRange) === null || _g === void 0 ? void 0 : _g[1]) !== null && _h !== void 0 ? _h : valueRangeMax;
60
60
  const [minVal, maxVal] = this.props.valueRange;
61
61
  const bitmapResolution = this.props.image
62
62
  ? [
@@ -72,8 +72,8 @@ export default class Hillshading2DLayer extends BitmapLayer {
72
72
  map: {
73
73
  valueRangeMin,
74
74
  valueRangeMax,
75
- colorMapRangeMin,
76
- colorMapRangeMax,
75
+ colormapRangeMin,
76
+ colormapRangeMax,
77
77
  bitmapResolution,
78
78
  valueRangeSize,
79
79
  lightDirection,
@@ -115,8 +115,8 @@ const map2DUniformsBlock = /*glsl*/ `\
115
115
  uniform mapUniforms {
116
116
  float valueRangeMin;
117
117
  float valueRangeMax;
118
- float colorMapRangeMin;
119
- float colorMapRangeMax;
118
+ float colormapRangeMin;
119
+ float colormapRangeMax;
120
120
 
121
121
  vec2 bitmapResolution;
122
122
  float valueRangeSize;
@@ -139,9 +139,9 @@ float decode_rgb2float(vec3 rgb) {
139
139
  value = floor(value / map.step + 0.5) * map.step;
140
140
  }
141
141
 
142
- // If colorMapRangeMin/Max specified, color map will span this interval.
142
+ // If colormapRangeMin/Max specified, color map will span this interval.
143
143
  float x = value * (map.valueRangeMax - map.valueRangeMin) + map.valueRangeMin;
144
- x = (x - map.colorMapRangeMin) / (map.colorMapRangeMax - map.colorMapRangeMin);
144
+ x = (x - map.colormapRangeMin) / (map.colormapRangeMax - map.colormapRangeMin);
145
145
  x = max(0.0, x);
146
146
  x = min(1.0, x);
147
147
 
@@ -156,8 +156,8 @@ const map2DUniforms = {
156
156
  uniformTypes: {
157
157
  valueRangeMin: "f32",
158
158
  valueRangeMax: "f32",
159
- colorMapRangeMin: "f32",
160
- colorMapRangeMax: "f32",
159
+ colormapRangeMin: "f32",
160
+ colormapRangeMax: "f32",
161
161
  bitmapResolution: "vec2<f32>",
162
162
  valueRangeSize: "f32",
163
163
  lightDirection: "vec3<f32>",
@@ -1,2 +1,2 @@
1
- declare const _default: "#version 300 es\n#define SHADER_NAME map-lines-fragment-shader\n\nprecision highp float;\n\nout vec4 fragColor;\n\nvoid main(void) {\n fragColor = vec4(0.0, 0.0, 0.0, 1.0);\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
1
+ declare const _default: "#version 300 es\n#define SHADER_NAME map-lines-fragment-shader\n\nprecision highp float;\n\nin vec4 vColor;\nout vec4 fragColor;\n\nvoid main(void) {\n fragColor = vColor;\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
2
2
  export default _default;
@@ -4,10 +4,11 @@ export default `\
4
4
 
5
5
  precision highp float;
6
6
 
7
+ in vec4 vColor;
7
8
  out vec4 fragColor;
8
9
 
9
10
  void main(void) {
10
- fragColor = vec4(0.0, 0.0, 0.0, 1.0);
11
+ fragColor = vColor;
11
12
  DECKGL_FILTER_COLOR(fragColor, geometry);
12
13
  }
13
14
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"line.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/map/line.fs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;CAYd,CAAC"}
1
+ {"version":3,"file":"line.fs.glsl.js","sourceRoot":"","sources":["../../../src/layers/map/line.fs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;CAad,CAAC"}
@@ -1,2 +1,2 @@
1
- declare const _default: "#version 300 es\n#define SHADER_NAME map-lines-vertex-shader\n\nprecision highp float;\n\nin vec3 positions;\n\nout vec4 position_commonspace;\n\nuniform bool ZIncreasingDownwards;\n\nvoid main(void) {\n vec3 position = positions;\n position[2] *= map.ZIncreasingDownwards ? -1.0 : 1.0;\n\n vec3 position_commonspace = project_position(position);\n gl_Position = project_common_position_to_clipspace(vec4(position_commonspace, 0.0));\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n}\n";
1
+ declare const _default: "#version 300 es\n#define SHADER_NAME map-lines-vertex-shader\n\nprecision highp float;\n\nin vec3 positions;\n\nout vec4 position_commonspace;\nout vec4 vColor;\n\nuniform bool ZIncreasingDownwards;\n\nvoid main(void) {\n vec3 position = positions;\n position[2] *= map.ZIncreasingDownwards ? -1.0 : 1.0;\n\n vec3 position_commonspace = project_position(position);\n gl_Position = project_common_position_to_clipspace(vec4(position_commonspace, 0.0));\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vColor = vec4(0.0, 0.0, 0.0, layer.opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n";
2
2
  export default _default;
@@ -7,6 +7,7 @@ precision highp float;
7
7
  in vec3 positions;
8
8
 
9
9
  out vec4 position_commonspace;
10
+ out vec4 vColor;
10
11
 
11
12
  uniform bool ZIncreasingDownwards;
12
13
 
@@ -17,6 +18,9 @@ void main(void) {
17
18
  vec3 position_commonspace = project_position(position);
18
19
  gl_Position = project_common_position_to_clipspace(vec4(position_commonspace, 0.0));
19
20
  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
21
+
22
+ vColor = vec4(0.0, 0.0, 0.0, layer.opacity);
23
+ DECKGL_FILTER_COLOR(vColor, geometry);
20
24
  }
21
25
  `;
22
26
  //# sourceMappingURL=line.vs.glsl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"line.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/map/line.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;CAoBd,CAAC"}
1
+ {"version":3,"file":"line.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/map/line.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CAwBd,CAAC"}
@@ -1,2 +1,2 @@
1
- declare const _default: "#version 300 es\n#define SHADER_NAME map-fragment-shader\n\nprecision highp float;\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\nout vec4 fragColor;\n\nuniform sampler2D colormap;\n\n\nvoid main(void) { \n geometry.uv = vTexCoord;\n\n vec3 normal = normals_commonspace;\n\n if(!map.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.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n 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, map.valueRangeMin, map.valueRangeMax);\n\n float x = (propertyValue - map.colorMapRangeMin) / (map.colorMapRangeMax - map.colorMapRangeMin);\n if (x < 0.0 || x > 1.0) {\n // Out of range. Use clampcolor.\n if (map.isClampColor) {\n color = vec4(map.colorMapClampColor.rgb, 1.0);\n }\n else if (map.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 = texture(colormap, vec2(x, 0.5));\n }\n }\n else {\n color = texture(colormap, vec2(x, 0.5));\n }\n\n bool is_contours = map.contourReferencePoint != -1.0 && map.contourInterval != -1.0;\n if (is_contours) {\n float val = map.isContoursDepth ? (abs(worldPos.z) - map.contourReferencePoint) / map.contourInterval\n : (propertyValue - map.contourReferencePoint) / map.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 from 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 = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n\n fragColor = vec4(lightColor, 1.0);\n\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
1
+ declare const _default: "#version 300 es\n#define SHADER_NAME map-fragment-shader\n\nprecision highp float;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\nin vec3 worldPos;\nin float property;\nflat in int vertexIndex;\n\n// Uniforms\nuniform sampler2D colormap;\n\nout vec4 fragColor;\n\n\nvoid main(void) { \n geometry.uv = vTexCoord;\n\n vec3 normal = normals_commonspace;\n\n if(!map.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.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n 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, map.valueRangeMin, map.valueRangeMax);\n\n float x = (propertyValue - map.colormapRangeMin) / (map.colormapRangeMax - map.colormapRangeMin);\n if (x < 0.0 || x > 1.0) {\n // Out of range. Use clampcolor.\n if (map.isClampColor) {\n color = vec4(map.colormapClampColor.rgb, 1.0);\n }\n else if (map.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 = texture(colormap, vec2(x, 0.5));\n }\n }\n else {\n color = texture(colormap, vec2(x, 0.5));\n }\n\n bool is_contours = map.contourReferencePoint != -1.0 && map.contourInterval != -1.0;\n if (is_contours) {\n float val = map.isContoursDepth ? (abs(worldPos.z) - map.contourReferencePoint) / map.contourInterval\n : (propertyValue - map.contourReferencePoint) / map.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 from 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 = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n\n fragColor = vec4(lightColor, vColor.a);\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
2
2
  export default _default;