@mapcatch/util 2.0.3-b → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/dist/catchUtil.min.esm.js +4080 -3875
- package/dist/catchUtil.min.js +42 -36
- package/package.json +1 -1
- package/src/constants/default_layers.js +153 -10
- package/src/constants/index.js +1 -0
- package/src/constants/layer_groups_multispectral.js +34 -0
- package/src/constants/layer_icons.js +1 -0
- package/src/gl-operations/index.js +14 -2
- package/src/gl-operations/reglCommands/default.js +2 -0
- package/src/gl-operations/reglCommands/hillshading.js +10 -2
- package/src/gl-operations/reglCommands/multiLayers.js +3 -1
- package/src/gl-operations/reglCommands/transitions.js +2 -0
- package/src/gl-operations/renderer.js +21 -4
- package/src/gl-operations/shaders/fragment/drawResult.js +6 -1
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvDirect.js +6 -1
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvFinalColorscale.js +6 -1
- package/src/gl-operations/shaders/fragment/hillshading/hsPregen.js +6 -1
- package/src/gl-operations/shaders/fragment/interpolateColor.js +7 -4
- package/src/gl-operations/shaders/fragment/interpolateColorOnly.js +7 -4
- package/src/gl-operations/shaders/fragment/interpolateValue.js +18 -5
- package/src/gl-operations/shaders/fragment/single.js +6 -1
- package/src/gl-operations/shaders/util/computeColor.glsl +5 -4
|
@@ -19,7 +19,9 @@ vec4 computeColor(
|
|
|
19
19
|
sampler2D sentinelColormap,
|
|
20
20
|
int scaleLength,
|
|
21
21
|
int sentinelLength,
|
|
22
|
-
bool littleEndian
|
|
22
|
+
bool littleEndian,
|
|
23
|
+
vec4 aboveColor,
|
|
24
|
+
vec4 belowColor
|
|
23
25
|
) {
|
|
24
26
|
|
|
25
27
|
// vertical texture coordinate to find color and offset
|
|
@@ -44,16 +46,15 @@ vec4 computeColor(
|
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
|
|
48
49
|
// Do linear interpolation using the color scale, if defined.
|
|
49
50
|
if (scaleLength > 0) {
|
|
50
51
|
// If value below color scale range, clamp to lowest color stop.
|
|
51
52
|
float scaleOffsetLowest = getTexelValue(scaleColormap, vec2(0.0, offsetRow), littleEndian);
|
|
52
53
|
float scaleOffsetHighest = getTexelValue(scaleColormap, vec2(1.0, offsetRow), littleEndian);
|
|
53
54
|
if (inputVal < scaleOffsetLowest) {
|
|
54
|
-
return
|
|
55
|
+
return belowColor;
|
|
55
56
|
} else if (inputVal > scaleOffsetHighest) {
|
|
56
|
-
return
|
|
57
|
+
return aboveColor;
|
|
57
58
|
} else {
|
|
58
59
|
for (int i = 0; i < SCALE_MAX_LENGTH; ++i) {
|
|
59
60
|
float i_f = float(i);
|