@geode/opengeodeweb-front 10.38.0-rc.1 → 10.38.0-rc.2
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/app/utils/colormap.ts +11 -6
- package/package.json +1 -1
package/app/utils/colormap.ts
CHANGED
|
@@ -40,14 +40,19 @@ const THREE = 3;
|
|
|
40
40
|
|
|
41
41
|
function buildColorTable(rgbPoints: readonly number[], width: number): Float32Array {
|
|
42
42
|
const lut = vtkColorTransferFunction();
|
|
43
|
+
// oxlint-disable id-length
|
|
44
|
+
const nodes = [];
|
|
43
45
|
for (let pointIdx = 0; pointIdx < rgbPoints.length; pointIdx += 4) {
|
|
44
|
-
|
|
45
|
-
rgbPoints[pointIdx] ?? 0,
|
|
46
|
-
rgbPoints[pointIdx + 1] ?? 0,
|
|
47
|
-
rgbPoints[pointIdx + 2] ?? 0,
|
|
48
|
-
rgbPoints[pointIdx + THREE] ?? 0,
|
|
49
|
-
|
|
46
|
+
nodes.push({
|
|
47
|
+
x: rgbPoints[pointIdx] ?? 0,
|
|
48
|
+
r: rgbPoints[pointIdx + 1] ?? 0,
|
|
49
|
+
g: rgbPoints[pointIdx + 2] ?? 0,
|
|
50
|
+
b: rgbPoints[pointIdx + THREE] ?? 0,
|
|
51
|
+
midpoint: 0.5,
|
|
52
|
+
sharpness: 0,
|
|
53
|
+
});
|
|
50
54
|
}
|
|
55
|
+
lut.setNodes(nodes);
|
|
51
56
|
return lut.getUint8Table(rgbPoints[0] ?? 0, rgbPoints.at(-LAST_POINT_OFFSET) ?? 0, width, true);
|
|
52
57
|
}
|
|
53
58
|
|
package/package.json
CHANGED