@webviz/subsurface-viewer 1.11.9 → 1.12.0

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 (62) hide show
  1. package/dist/components/ColorLegend.d.ts +4 -4
  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/boxLayer.d.ts +1 -2
  7. package/dist/layers/axes/boxLayer.js.map +1 -1
  8. package/dist/layers/colormap/colormap.fs.glsl.d.ts +1 -1
  9. package/dist/layers/colormap/colormap.fs.glsl.js +3 -3
  10. package/dist/layers/colormap/colormapLayer.d.ts +5 -4
  11. package/dist/layers/colormap/colormapLayer.js +31 -50
  12. package/dist/layers/colormap/colormapLayer.js.map +1 -1
  13. package/dist/layers/drawing/drawingLayer.js.map +1 -1
  14. package/dist/layers/gpglLayers/typeDefs.d.ts +24 -0
  15. package/dist/layers/gpglLayers/typeDefs.js +3 -0
  16. package/dist/layers/gpglLayers/typeDefs.js.map +1 -0
  17. package/dist/layers/grid3d/cellProperty.fs.glsl.d.ts +1 -1
  18. package/dist/layers/grid3d/cellProperty.fs.glsl.js +8 -8
  19. package/dist/layers/grid3d/grid3dLayer.d.ts +6 -5
  20. package/dist/layers/grid3d/grid3dLayer.js +7 -7
  21. package/dist/layers/grid3d/nodeProperty.fs.glsl.d.ts +1 -1
  22. package/dist/layers/grid3d/nodeProperty.fs.glsl.js +2 -2
  23. package/dist/layers/grid3d/privateGrid3dLayer.d.ts +6 -7
  24. package/dist/layers/grid3d/privateGrid3dLayer.js +42 -73
  25. package/dist/layers/grid3d/privateGrid3dLayer.js.map +1 -1
  26. package/dist/layers/grid3d/typeDefs.d.ts +0 -6
  27. package/dist/layers/hillshading2d/hillshading2dLayer.js +10 -10
  28. package/dist/layers/map/map.fs.glsl.d.ts +1 -1
  29. package/dist/layers/map/map.fs.glsl.js +3 -3
  30. package/dist/layers/map/mapLayer.d.ts +3 -2
  31. package/dist/layers/map/mapLayer.js +5 -62
  32. package/dist/layers/map/mapLayer.js.map +1 -1
  33. package/dist/layers/map/privateMapLayer.d.ts +7 -7
  34. package/dist/layers/map/privateMapLayer.js +42 -37
  35. package/dist/layers/map/privateMapLayer.js.map +1 -1
  36. package/dist/layers/polylines/polylinesLayer.js +1 -1
  37. package/dist/layers/polylines/polylinesLayer.js.map +1 -1
  38. package/dist/layers/selectable_geojson/selectableGeoJsonLayer.js.map +1 -1
  39. package/dist/layers/shader_modules/decoder.fs.glsl.d.ts +1 -1
  40. package/dist/layers/shader_modules/decoder.fs.glsl.js +4 -4
  41. package/dist/layers/triangle/privateTriangleLayer.d.ts +2 -3
  42. package/dist/layers/triangle/privateTriangleLayer.js.map +1 -1
  43. package/dist/layers/triangle/triangleLayer.d.ts +2 -1
  44. package/dist/layers/triangle/triangleLayer.js.map +1 -1
  45. package/dist/layers/utils/colormapTools.d.ts +48 -0
  46. package/dist/layers/utils/colormapTools.js +79 -0
  47. package/dist/layers/utils/colormapTools.js.map +1 -0
  48. package/dist/layers/utils/layerTools.d.ts +9 -19
  49. package/dist/layers/utils/layerTools.js +0 -42
  50. package/dist/layers/utils/layerTools.js.map +1 -1
  51. package/dist/layers/wells/wellsLayer.d.ts +3 -2
  52. package/dist/layers/wells/wellsLayer.js.map +1 -1
  53. package/dist/utils/index.d.ts +2 -0
  54. package/dist/utils/index.js +1 -0
  55. package/dist/utils/index.js.map +1 -1
  56. package/dist/utils/serialize.d.ts +23 -0
  57. package/dist/utils/serialize.js +105 -0
  58. package/dist/utils/serialize.js.map +1 -0
  59. package/dist/utils/typedArray.d.ts +44 -0
  60. package/dist/utils/typedArray.js +42 -0
  61. package/dist/utils/typedArray.js.map +1 -0
  62. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"drawingLayer.js","sourceRoot":"","sources":["../../../src/layers/drawing/drawingLayer.tsx"],"names":[],"mappings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,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;aAClC;YACD,sBAAsB,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC;YAC5D,gBAAgB,EAAE,iBAAiB,CAAC,SAAS;YAC7C,MAAM,EAAE,CAAC,UAAyC,EAAE,EAAE,CAClD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;YAC5B,cAAc,EAAE;gBACZ,OAAO,EAAE;oBACL,aAAa,EAAE,IAAI;oBACnB,YAAY,EAAE,CAAC,OAAgB,EAAE,EAAE,CAC/B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;iBAClC;aACJ;SACJ,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC;IACvD,CAAC;CACJ;AAED,YAAY,CAAC,SAAS,GAAG,cAAc,CAAC;AACxC,YAAY,CAAC,YAAY,GAAG,YAA4C,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { Material as DeckGlMaterial } from "@deck.gl/core";
2
+ /**
3
+ * Material properties for a graphical surface, used for lighting and shading.
4
+ *
5
+ * This type can either be an object specifying material properties,
6
+ * or a boolean value.
7
+ *
8
+ * - If an object, it contains:
9
+ * - `ambient`: The ambient reflection coefficient.
10
+ * - `diffuse`: The diffuse reflection coefficient.
11
+ * - `shininess`: The shininess exponent for specular highlights.
12
+ * - `specularColor`: The RGB color of the specular reflection as a tuple of three numbers.
13
+ *
14
+ * - If a boolean, it may be used as a flag to enable default material or disable the lighting.
15
+ */
16
+ export type Material = {
17
+ ambient?: number | undefined;
18
+ diffuse?: number | undefined;
19
+ shininess?: number | undefined;
20
+ specularColor?: [number, number, number] | undefined;
21
+ } | boolean;
22
+ type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
23
+ export declare const _test: Equals<Material, DeckGlMaterial>;
24
+ export {};
@@ -0,0 +1,3 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ export const _test = true;
3
+ //# sourceMappingURL=typeDefs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeDefs.js","sourceRoot":"","sources":["../../../src/layers/gpglLayers/typeDefs.ts"],"names":[],"mappings":"AAgCA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,KAAK,GAAqC,IAAI,CAAC"}
@@ -1,2 +1,2 @@
1
- declare const _default: "#version 300 es\n#define SHADER_NAME grid3d-cell-fragment-shader\n\nin vec3 cameraPosition;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nflat in vec3 normal;\nflat in int vertexIndex;\nflat in float property;\n\nout vec4 fragColor;\n\nuniform sampler2D colormap;\n\n// Calculate color from propertyValue using discrete colormap.\nvec4 getDiscretePropertyColor (float propertyValue) {\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n // On some machines (like in docker container), float comparison and texture lookup may fail due to precision.\n // Use this tolerance for comparison and to shift the lookup position.\n float tolerance = (1.0 / grid.colorMapSize) * 0.5;\n\n if (propertyValue < grid.colorMapRangeMin - tolerance || propertyValue > grid.colorMapRangeMax + tolerance) {\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 float p = clamp (propertyValue, grid.colorMapRangeMin, grid.colorMapRangeMax);\n float x = p / grid.colorMapSize;\n color = texture(colormap, vec2(x + tolerance, 0.5));\n }\n }\n else {\n float x = propertyValue / grid.colorMapSize;\n color = texture(colormap, vec2(x + tolerance, 0.5));\n }\n \n return color;\n}\n\nvec4 getContinuousPropertyColor (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\nvoid main(void) {\n\n if (picking.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n fragColor = encodeVertexIndexToRGB(vertexIndex); \n return;\n }\n\n if (isnan(property)) {\n vec3 lightColor = lighting_getLightColor(grid.undefinedPropertyColor.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, vColor.a);\n DECKGL_FILTER_COLOR(fragColor, geometry);\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 = grid.isColoringDiscrete ? getDiscretePropertyColor(round(propertyValue)) : getContinuousPropertyColor(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";
1
+ declare const _default: "#version 300 es\n#define SHADER_NAME grid3d-cell-fragment-shader\n\nin vec3 cameraPosition;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nflat in vec3 normal;\nflat in int vertexIndex;\nflat in float property;\n\nout vec4 fragColor;\n\nuniform sampler2D colormap;\n\n// Calculate color from propertyValue using discrete colormap.\nvec4 getDiscretePropertyColor (float propertyValue) {\n vec4 color = vec4(1.0, 1.0, 1.0, 1.0);\n // On some machines (like in docker container), float comparison and texture lookup may fail due to precision.\n // Use this tolerance for comparison and to shift the lookup position.\n float tolerance = (1.0 / grid.colormapSize) * 0.5;\n\n if (propertyValue < grid.colormapRangeMin - tolerance || propertyValue > grid.colormapRangeMax + tolerance) {\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 float p = clamp (propertyValue, grid.colormapRangeMin, grid.colormapRangeMax);\n float x = p / grid.colormapSize;\n color = texture(colormap, vec2(x + tolerance, 0.5));\n }\n }\n else {\n float x = propertyValue / grid.colormapSize;\n color = texture(colormap, vec2(x + tolerance, 0.5));\n }\n \n return color;\n}\n\nvec4 getContinuousPropertyColor (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\nvoid main(void) {\n\n if (picking.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n fragColor = encodeVertexIndexToRGB(vertexIndex); \n return;\n }\n\n if (isnan(property)) {\n vec3 lightColor = lighting_getLightColor(grid.undefinedPropertyColor.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, vColor.a);\n DECKGL_FILTER_COLOR(fragColor, geometry);\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 = grid.isColoringDiscrete ? getDiscretePropertyColor(round(propertyValue)) : getContinuousPropertyColor(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;
@@ -19,25 +19,25 @@ vec4 getDiscretePropertyColor (float propertyValue) {
19
19
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
20
20
  // On some machines (like in docker container), float comparison and texture lookup may fail due to precision.
21
21
  // Use this tolerance for comparison and to shift the lookup position.
22
- float tolerance = (1.0 / grid.colorMapSize) * 0.5;
22
+ float tolerance = (1.0 / grid.colormapSize) * 0.5;
23
23
 
24
- if (propertyValue < grid.colorMapRangeMin - tolerance || propertyValue > grid.colorMapRangeMax + tolerance) {
24
+ if (propertyValue < grid.colormapRangeMin - tolerance || propertyValue > grid.colormapRangeMax + tolerance) {
25
25
  // Out of range. Use clampcolor.
26
26
  if (grid.isClampColor) {
27
- color = grid.colorMapClampColor;
27
+ color = grid.colormapClampColor;
28
28
  if( color[3] == 0.0 ) {
29
29
  discard;
30
30
  }
31
31
  }
32
32
  else {
33
33
  // Use min/max color to clamp.
34
- float p = clamp (propertyValue, grid.colorMapRangeMin, grid.colorMapRangeMax);
35
- float x = p / grid.colorMapSize;
34
+ float p = clamp (propertyValue, grid.colormapRangeMin, grid.colormapRangeMax);
35
+ float x = p / grid.colormapSize;
36
36
  color = texture(colormap, vec2(x + tolerance, 0.5));
37
37
  }
38
38
  }
39
39
  else {
40
- float x = propertyValue / grid.colorMapSize;
40
+ float x = propertyValue / grid.colormapSize;
41
41
  color = texture(colormap, vec2(x + tolerance, 0.5));
42
42
  }
43
43
 
@@ -46,11 +46,11 @@ vec4 getDiscretePropertyColor (float propertyValue) {
46
46
 
47
47
  vec4 getContinuousPropertyColor (float propertyValue) {
48
48
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
49
- float normalizedValue = (propertyValue - grid.colorMapRangeMin) / (grid.colorMapRangeMax - grid.colorMapRangeMin);
49
+ float normalizedValue = (propertyValue - grid.colormapRangeMin) / (grid.colormapRangeMax - grid.colormapRangeMin);
50
50
  if (normalizedValue < 0.0 || normalizedValue > 1.0) {
51
51
  // Out of range. Use clampcolor.
52
52
  if (grid.isClampColor) {
53
- color = grid.colorMapClampColor;
53
+ color = grid.colormapClampColor;
54
54
  if( color[3] == 0.0 ) {
55
55
  discard;
56
56
  }
@@ -1,9 +1,10 @@
1
1
  import type React from "react";
2
2
  import type { Color } from "@deck.gl/core";
3
3
  import { CompositeLayer } from "@deck.gl/core";
4
- import type { Material } from "./typeDefs";
4
+ import type { Material } from "../gpglLayers/typeDefs";
5
5
  import PrivateLayer from "./privateGrid3dLayer";
6
- import type { ExtendedLayerProps, ColorMapFunctionType, ReportBoundingBoxAction } from "../utils/layerTools";
6
+ import type { ExtendedLayerProps, ReportBoundingBoxAction } from "../utils/layerTools";
7
+ import type { ColormapFunctionType } from "../utils/colormapTools";
7
8
  export type WebWorkerParams = {
8
9
  points: Float32Array;
9
10
  polys: Uint32Array;
@@ -62,7 +63,7 @@ export interface Grid3DLayerProps extends ExtendedLayerProps {
62
63
  */
63
64
  propertiesData: string | number[] | Float32Array | Uint16Array | undefined;
64
65
  /**
65
- * Discrete propety value-name pairs to be displayed in cursor readouts.
66
+ * Discrete property value-name pairs to be displayed in cursor readouts.
66
67
  * The property values are used as the array indices.
67
68
  */
68
69
  discretePropertyValueNames?: IDiscretePropertyValueName[];
@@ -91,7 +92,7 @@ export interface Grid3DLayerProps extends ExtendedLayerProps {
91
92
  * E.g. [255, 0, 0] for constant red cells.
92
93
  * Can be defined as Uint8Array containing [R, G, B] triplets in [0, 255] range each.
93
94
  */
94
- colorMapFunction?: ColorMapFunctionType | Uint8Array;
95
+ colorMapFunction?: ColormapFunctionType | Uint8Array;
95
96
  /**
96
97
  * Value in propertiesData indicating that the property is undefined.
97
98
  * When propertiesData is Uint16Array the value is index in discretePropertyValueNames if provided.
@@ -143,5 +144,5 @@ export default class Grid3DLayer extends CompositeLayer<Grid3DLayerProps> {
143
144
  private getPropertyValueRange;
144
145
  private getUndefinedPropertyValue;
145
146
  private getUndefinedPropertyColor;
146
- private isColorMapFunctionConstantColor;
147
+ private isColormapFunctionConstantColor;
147
148
  }
@@ -169,7 +169,7 @@ export default class Grid3DLayer extends CompositeLayer {
169
169
  valueRange: (_a = this.props.colorMapRange) !== null && _a !== void 0 ? _a : propertyValueRange,
170
170
  colorName: this.props.colorMapName,
171
171
  title: "MapLayer",
172
- colorMapFunction: this.props.colorMapFunction,
172
+ colormapFunction: this.props.colorMapFunction,
173
173
  };
174
174
  this.setState({
175
175
  mesh,
@@ -216,12 +216,12 @@ export default class Grid3DLayer extends CompositeLayer {
216
216
  mesh: this.state["mesh"],
217
217
  meshLines: this.state["mesh_lines"],
218
218
  pickable: this.props.pickable,
219
- colorMapName: this.props.colorMapName,
220
- colorMapRange: this.props.colorMapRange,
221
- colorMapClampColor: this.props.colorMapClampColor,
219
+ colormapName: this.props.colorMapName,
220
+ colormapRange: this.props.colorMapRange,
221
+ colormapClampColor: this.props.colorMapClampColor,
222
222
  undefinedPropertyValue: undefinedValue,
223
223
  undefinedPropertyColor: undefinedColor,
224
- colorMapFunction: this.props.colorMapFunction,
224
+ colormapFunction: this.props.colorMapFunction,
225
225
  coloringMode: this.props.coloringMode,
226
226
  gridLines: this.props.gridLines,
227
227
  propertyValueRange: this.getPropertyValueRange(),
@@ -263,12 +263,12 @@ export default class Grid3DLayer extends CompositeLayer {
263
263
  var _a, _b;
264
264
  const colorFunc = this.props.colorMapFunction;
265
265
  if (((_a = this.props.propertiesData) === null || _a === void 0 ? void 0 : _a.length) === 0 &&
266
- this.isColorMapFunctionConstantColor(colorFunc)) {
266
+ this.isColormapFunctionConstantColor(colorFunc)) {
267
267
  return [colorFunc[0], colorFunc[1], colorFunc[2]];
268
268
  }
269
269
  return (_b = this.props.undefinedPropertyColor) !== null && _b !== void 0 ? _b : [204, 204, 204];
270
270
  }
271
- isColorMapFunctionConstantColor(colorFunc) {
271
+ isColormapFunctionConstantColor(colorFunc) {
272
272
  return ((Array.isArray(colorFunc) || colorFunc instanceof Uint8Array) &&
273
273
  colorFunc.length >= 3);
274
274
  }
@@ -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;\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";
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;
@@ -16,11 +16,11 @@ uniform sampler2D colormap;
16
16
 
17
17
  vec4 getPropertyColor (float propertyValue) {
18
18
  vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
19
- float normalizedValue = (propertyValue - grid.colorMapRangeMin) / (grid.colorMapRangeMax - grid.colorMapRangeMin);
19
+ float normalizedValue = (propertyValue - grid.colormapRangeMin) / (grid.colormapRangeMax - grid.colormapRangeMin);
20
20
  if (normalizedValue < 0.0 || normalizedValue > 1.0) {
21
21
  // Out of range. Use clampcolor.
22
22
  if (grid.isClampColor) {
23
- color = grid.colorMapClampColor;
23
+ color = grid.colormapClampColor;
24
24
  if( color[3] == 0.0 ) {
25
25
  discard;
26
26
  }
@@ -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];
@@ -45,5 +45,4 @@ export default class PrivateLayer extends Layer<PrivateLayerProps> {
45
45
  private getPropertyText;
46
46
  private getColoringHints;
47
47
  private getUniforms;
48
- private getColormapTexture;
49
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,10 +52,14 @@ 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);
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());
70
63
  const mesh_model = new Model(context.device, Object.assign(Object.assign({ id: `${this.props.id}-mesh` }, super.getShaders({
71
64
  vs: geometricShading ? linearVertexShader : flatVertexShader,
72
65
  fs: geometricShading
@@ -81,7 +74,7 @@ export default class PrivateLayer extends Layer {
81
74
  gridUniforms,
82
75
  ],
83
76
  })), { geometry: new Geometry({
84
- topology: (_a = this.props.mesh.drawMode) !== null && _a !== void 0 ? _a : "triangle-list",
77
+ topology: (_b = this.props.mesh.drawMode) !== null && _b !== void 0 ? _b : "triangle-list",
85
78
  attributes: Object.assign({ positions: this.props.mesh.attributes.positions, normals: this.props.mesh.attributes.normals }, (geometricShading
86
79
  ? {}
87
80
  : {
@@ -182,10 +175,10 @@ export default class PrivateLayer extends Layer {
182
175
  }
183
176
  getColoringHints() {
184
177
  var _a, _b;
185
- if (this.props.colorMapFunction instanceof Uint8Array) {
178
+ if (this.props.colormapFunction instanceof Uint8Array) {
186
179
  return {
187
180
  discreteData: true,
188
- colormapSize: this.props.colorMapFunction.length / 3,
181
+ colormapSize: this.props.colormapFunction.length / 3,
189
182
  };
190
183
  }
191
184
  if (isDiscreteProperty(this.props.coloringMode)) {
@@ -206,26 +199,26 @@ export default class PrivateLayer extends Layer {
206
199
  var _a, _b, _c, _d, _e, _f, _g, _h;
207
200
  const valueRangeMin = (_b = (_a = this.props.propertyValueRange) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 0.0;
208
201
  const valueRangeMax = (_d = (_c = this.props.propertyValueRange) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : 1.0;
209
- // If specified color map will extend from colorMapRangeMin to colorMapRangeMax.
202
+ // If specified color map will extend from colormapRangeMin to colormapRangeMax.
210
203
  // Otherwise it will extend from valueRangeMin to valueRangeMax.
211
- const colorMapRangeMin = (_f = (_e = this.props.colorMapRange) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : valueRangeMin;
212
- const colorMapRangeMax = (_h = (_g = this.props.colorMapRange) === null || _g === void 0 ? void 0 : _g[1]) !== null && _h !== void 0 ? _h : valueRangeMax;
213
- const isColorMapClampColorTransparent = this.props.colorMapClampColor === false;
214
- const hasClampColor = this.props.colorMapClampColor !== undefined &&
215
- this.props.colorMapClampColor !== true &&
216
- this.props.colorMapClampColor !== false;
217
- let colorMapClampColor = (hasClampColor ? this.props.colorMapClampColor : [0, 0, 0, 255]);
218
- if (isColorMapClampColorTransparent) {
219
- 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];
220
213
  }
221
- if (colorMapClampColor.length === 3) {
222
- colorMapClampColor = [...colorMapClampColor, 255];
214
+ if (colormapClampColor.length === 3) {
215
+ colormapClampColor = [...colormapClampColor, 255];
223
216
  }
224
- const isClampColor = hasClampColor || isColorMapClampColorTransparent;
217
+ const isClampColor = hasClampColor || isColormapClampColorTransparent;
225
218
  // Normalize to [0,1] range.
226
- const colorMapClampColorUniform = colorMapClampColor.map((x) => (x !== null && x !== void 0 ? x : 0) / 255);
227
- if (isColorMapClampColorTransparent) {
228
- colorMapClampColor[3] = 0;
219
+ const colormapClampColorUniform = colormapClampColor.map((x) => (x !== null && x !== void 0 ? x : 0) / 255);
220
+ if (isColormapClampColorTransparent) {
221
+ colormapClampColor[3] = 0;
229
222
  }
230
223
  const undefinedPropertyColorUniform = this.props.undefinedPropertyColor.map((x) => (x !== null && x !== void 0 ? x : 0) / 255);
231
224
  const coloringHints = this.getColoringHints();
@@ -233,39 +226,15 @@ export default class PrivateLayer extends Layer {
233
226
  ZIncreasingDownwards: this.props.ZIncreasingDownwards,
234
227
  valueRangeMin,
235
228
  valueRangeMax,
236
- colorMapRangeMin,
237
- colorMapRangeMax,
238
- colorMapClampColor: Array.from(colorMapClampColorUniform),
229
+ colormapRangeMin: colormapRangeMin,
230
+ colormapRangeMax: colormapRangeMax,
231
+ colormapClampColor: Array.from(colormapClampColorUniform),
239
232
  isClampColor,
240
233
  coloringMode: this.props.coloringMode,
241
234
  undefinedPropertyColor: undefinedPropertyColorUniform,
242
235
  isColoringDiscrete: coloringHints.discreteData,
243
- colorMapSize: coloringHints.colormapSize,
244
- };
245
- }
246
- getColormapTexture(context) {
247
- const textureProps = {
248
- sampler: DEFAULT_TEXTURE_PARAMETERS,
249
- width: 256,
250
- height: 1,
251
- format: "rgb8unorm-webgl",
236
+ colormapSize: coloringHints.colormapSize,
252
237
  };
253
- const colormapHints = this.getColoringHints();
254
- if (colormapHints.discreteData) {
255
- if (colormapHints.colormapSize === 0) {
256
- 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]) }));
257
- return colormap;
258
- }
259
- const colormapData = this.props.colorMapFunction instanceof Uint8Array
260
- ? this.props.colorMapFunction
261
- : getImageData(this.props.colorMapName, this.context.userData
262
- .colorTables, this.props.colorMapFunction, colormapHints.colormapSize, colormapHints.discreteData);
263
- const colormap = context.device.createTexture(Object.assign(Object.assign({}, textureProps), { sampler: DISCRETE_TEXTURE_PARAMETERS, width: colormapHints.colormapSize, data: colormapData }));
264
- return colormap;
265
- }
266
- const data = getImageData(this.props.colorMapName, this.context.userData.colorTables, this.props.colorMapFunction);
267
- const colormap = context.device.createTexture(Object.assign(Object.assign({}, textureProps), { data: data }));
268
- return colormap;
269
238
  }
270
239
  }
271
240
  PrivateLayer.layerName = "PrivateLayer";
@@ -276,14 +245,14 @@ uniform gridUniforms {
276
245
  bool ZIncreasingDownwards;
277
246
  float valueRangeMin;
278
247
  float valueRangeMax;
279
- float colorMapRangeMin;
280
- float colorMapRangeMax;
281
- vec4 colorMapClampColor;
248
+ float colormapRangeMin;
249
+ float colormapRangeMax;
250
+ vec4 colormapClampColor;
282
251
  bool isClampColor;
283
252
  float coloringMode;
284
253
  vec3 undefinedPropertyColor;
285
254
  bool isColoringDiscrete;
286
- float colorMapSize;
255
+ float colormapSize;
287
256
  } grid;
288
257
  `;
289
258
  const gridUniforms = {
@@ -294,14 +263,14 @@ const gridUniforms = {
294
263
  ZIncreasingDownwards: "u32",
295
264
  valueRangeMin: "f32",
296
265
  valueRangeMax: "f32",
297
- colorMapRangeMin: "f32",
298
- colorMapRangeMax: "f32",
299
- colorMapClampColor: "vec4<f32>",
266
+ colormapRangeMin: "f32",
267
+ colormapRangeMax: "f32",
268
+ colormapClampColor: "vec4<f32>",
300
269
  isClampColor: "u32",
301
270
  coloringMode: "f32",
302
271
  undefinedPropertyColor: "vec3<f32>",
303
272
  isColoringDiscrete: "u32",
304
- colorMapSize: "f32",
273
+ colormapSize: "f32",
305
274
  },
306
275
  };
307
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,iBAAiB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAOhF,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,gBAAgB,MAAM,wBAAwB,CAAC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AE,gBAAgB;YAClC,gBAAgB,EAAE,gBAAgB;YAClC,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC;YACzD,YAAY;YACZ,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;YACrC,sBAAsB,EAAE,6BAA6B;YACrD,kBAAkB,EAAE,aAAa,CAAC,YAAY;YAC9C,YAAY,EAAE,aAAa,CAAC,YAAY;SAC3C,CAAC;IACN,CAAC;CACJ;AAED,YAAY,CAAC,SAAS,GAAG,cAAc,CAAC;AACxC,YAAY,CAAC,YAAY,GAAG,YAAY,CAAC;AAEzC,uCAAuC;AACvC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;CAclC,CAAC;AAgBF,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,iBAAiB;IACrB,EAAE,EAAE,iBAAiB;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;QACpB,gBAAgB,EAAE,KAAK;QACvB,gBAAgB,EAAE,KAAK;QACvB,kBAAkB,EAAE,WAAW;QAC/B,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,KAAK;QACnB,sBAAsB,EAAE,WAAW;QACnC,kBAAkB,EAAE,KAAK;QACzB,YAAY,EAAE,KAAK;KACtB;CAC0D,CAAC"}
@@ -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-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";
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;
@@ -39,13 +39,13 @@ void main(void) {
39
39
  // This may happen due to GPU interpolation precision causing color artifacts.
40
40
  propertyValue = clamp(propertyValue, map.valueRangeMin, map.valueRangeMax);
41
41
 
42
- float x = (propertyValue - map.colorMapRangeMin) / (map.colorMapRangeMax - map.colorMapRangeMin);
42
+ float x = (propertyValue - map.colormapRangeMin) / (map.colormapRangeMax - map.colormapRangeMin);
43
43
  if (x < 0.0 || x > 1.0) {
44
44
  // Out of range. Use clampcolor.
45
45
  if (map.isClampColor) {
46
- color = vec4(map.colorMapClampColor.rgb, 1.0);
46
+ color = vec4(map.colormapClampColor.rgb, 1.0);
47
47
  }
48
- else if (map.isColorMapClampColorTransparent) {
48
+ else if (map.isColormapClampColorTransparent) {
49
49
  discard;
50
50
  return;
51
51
  }