@webviz/subsurface-viewer 1.14.0 → 1.14.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/dist/layers/axes/box.vs.glsl.d.ts +1 -1
- package/dist/layers/axes/box.vs.glsl.js +1 -2
- package/dist/layers/axes/box.vs.glsl.js.map +1 -1
- package/dist/layers/axes/boxLayer.d.ts +3 -0
- package/dist/layers/axes/boxLayer.js +23 -3
- package/dist/layers/axes/boxLayer.js.map +1 -1
- package/dist/layers/gpglLayers/gpglValueMappedSurfaceLayer.js +3 -6
- package/dist/layers/gpglLayers/gpglValueMappedSurfaceLayer.js.map +1 -1
- package/dist/layers/gpglLayers/texTriangle.fs.glsl.d.ts +1 -1
- package/dist/layers/gpglLayers/texTriangle.fs.glsl.js +8 -5
- package/dist/layers/gpglLayers/texTriangle.fs.glsl.js.map +1 -1
- package/dist/layers/grid3d/cellProperty.fs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/cellProperty.fs.glsl.js +1 -1
- package/dist/layers/grid3d/nodeProperty.fs.glsl.d.ts +1 -1
- package/dist/layers/grid3d/nodeProperty.fs.glsl.js +1 -1
- package/dist/layers/grid3d/privateGrid3dLayer.js +3 -5
- package/dist/layers/grid3d/privateGrid3dLayer.js.map +1 -1
- package/dist/layers/map/map.fs.glsl.d.ts +1 -1
- package/dist/layers/map/map.fs.glsl.js +1 -1
- package/dist/layers/map/privateMapLayer.js +3 -5
- package/dist/layers/map/privateMapLayer.js.map +1 -1
- package/dist/layers/northarrow/northArrow3DLayer.d.ts +5 -2
- package/dist/layers/northarrow/northArrow3DLayer.js +26 -7
- package/dist/layers/northarrow/northArrow3DLayer.js.map +1 -1
- package/dist/layers/northarrow/northarrow.fs.glsl.d.ts +1 -1
- package/dist/layers/northarrow/northarrow.fs.glsl.js +1 -3
- package/dist/layers/northarrow/northarrow.fs.glsl.js.map +1 -1
- package/dist/layers/piechart/pieChartLayer.js +21 -2
- package/dist/layers/piechart/pieChartLayer.js.map +1 -1
- package/dist/layers/piechart/piechart.vs.glsl.d.ts +1 -1
- package/dist/layers/piechart/piechart.vs.glsl.js +2 -4
- package/dist/layers/piechart/piechart.vs.glsl.js.map +1 -1
- package/dist/layers/shader_modules/index.d.ts +1 -1
- package/dist/layers/shader_modules/index.js +1 -1
- package/dist/layers/shader_modules/index.js.map +1 -1
- package/dist/layers/shader_modules/phong-lighting/phong-material.js +1 -3
- package/dist/layers/shader_modules/phong-lighting/phong-material.js.map +1 -1
- package/dist/layers/shader_modules/phong-lighting/phong-shaders-glsl.d.ts +1 -1
- package/dist/layers/shader_modules/phong-lighting/phong-shaders-glsl.js +2 -1
- package/dist/layers/shader_modules/phong-lighting/phong-shaders-glsl.js.map +1 -1
- package/dist/layers/shader_modules/utilities.d.ts +85 -0
- package/dist/layers/shader_modules/utilities.js +168 -20
- package/dist/layers/shader_modules/utilities.js.map +1 -1
- package/dist/utils/serialize.d.ts +1 -1
- package/dist/utils/serialize.js +5 -2
- package/dist/utils/serialize.js.map +1 -1
- package/package.json +11 -11
|
@@ -103,7 +103,12 @@ export default class PieChartLayer extends Layer {
|
|
|
103
103
|
const model = new Model(device, Object.assign(Object.assign({ id: `${this.props.id}-pie` }, super.getShaders({
|
|
104
104
|
vs: vertexShader,
|
|
105
105
|
fs: fragmentShader,
|
|
106
|
-
modules: [
|
|
106
|
+
modules: [
|
|
107
|
+
project32,
|
|
108
|
+
picking,
|
|
109
|
+
precisionForTests,
|
|
110
|
+
piechartUniforms,
|
|
111
|
+
],
|
|
107
112
|
})), { geometry: new Geometry({
|
|
108
113
|
topology: "triangle-list",
|
|
109
114
|
attributes: {
|
|
@@ -142,7 +147,7 @@ export default class PieChartLayer extends Layer {
|
|
|
142
147
|
if (!this.props.depthTest) {
|
|
143
148
|
gl.disable(GL.DEPTH_TEST);
|
|
144
149
|
}
|
|
145
|
-
model.
|
|
150
|
+
model.shaderInputs.setProps(Object.assign(Object.assign({}, args.uniforms), { piechart: { scale } }));
|
|
146
151
|
model.draw(context.renderPass);
|
|
147
152
|
if (!this.props.depthTest) {
|
|
148
153
|
gl.enable(GL.DEPTH_TEST);
|
|
@@ -169,4 +174,18 @@ export default class PieChartLayer extends Layer {
|
|
|
169
174
|
}
|
|
170
175
|
PieChartLayer.layerName = "PieChartLayer";
|
|
171
176
|
PieChartLayer.defaultProps = defaultProps;
|
|
177
|
+
const piechartUniformsBlock = `\
|
|
178
|
+
uniform piechartUniforms {
|
|
179
|
+
uniform float scale;
|
|
180
|
+
} piechart;
|
|
181
|
+
`;
|
|
182
|
+
// NOTE: this must exactly the same name than in the uniform block
|
|
183
|
+
const piechartUniforms = {
|
|
184
|
+
name: "piechart",
|
|
185
|
+
vs: piechartUniformsBlock,
|
|
186
|
+
fs: undefined,
|
|
187
|
+
uniformTypes: {
|
|
188
|
+
scale: "f32",
|
|
189
|
+
},
|
|
190
|
+
};
|
|
172
191
|
//# sourceMappingURL=pieChartLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pieChartLayer.js","sourceRoot":"","sources":["../../../src/layers/piechart/pieChartLayer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pieChartLayer.js","sourceRoot":"","sources":["../../../src/layers/piechart/pieChartLayer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAEvF,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAwB9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G,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAExB,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAe,CAAC;QACpD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;QAChD,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QAE/D,uCACO,IAAI,KACP,UAAU,EAAE,gBAAgB,IAC9B;IACN,CAAC;CACJ;AAED,aAAa,CAAC,SAAS,GAAG,eAAe,CAAC;AAC1C,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC;AAE1C,MAAM,qBAAqB,GAAG;;;;CAI7B,CAAC;AAIF,kEAAkE;AAClE,MAAM,gBAAgB,GAAG;IACrB,IAAI,EAAE,UAAU;IAChB,EAAE,EAAE,qBAAqB;IACzB,EAAE,EAAE,SAAS;IACb,YAAY,EAAE;QACV,KAAK,EAAE,KAAK;KACf;CAC8D,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "#version 300 es\n#define SHADER_NAME piechart-vertex-shader\n\nin vec3 positions;\nin vec3 colors;\nin float do_scale;\nin float mx;\nin float my;\nin int pie_index;\n\nflat out int pie_index_;\n\
|
|
1
|
+
declare const _default: "#version 300 es\n#define SHADER_NAME piechart-vertex-shader\n\nin vec3 positions;\nin vec3 colors;\nin float do_scale;\nin float mx;\nin float my;\nin int pie_index;\n\nflat out int pie_index_;\n\nout vec4 vColor;\n\nvoid main(void) {\n\n vec3 v = positions;\n\n if (do_scale == 1.0) {\n // Triangle vertex' are (mx,my) and two more. The\n // latter two will be scaled so that the triangle (or the pie piece its part of) will\n // have constant size depending on zoom.\n float x = piechart.scale * (positions.x - mx);\n float y = piechart.scale * (positions.y - my);\n\n v = vec3(x + mx, y + my, 0.0);\n }\n\n vec3 position_commonspace = project_position(v);\n\n vColor = vec4(colors.rgb, 1.0);\n\n pie_index_ = pie_index;\n\n gl_Position = project_common_position_to_clipspace(vec4(position_commonspace, 0.0));\n}\n";
|
|
2
2
|
export default _default;
|
|
@@ -11,8 +11,6 @@ in int pie_index;
|
|
|
11
11
|
|
|
12
12
|
flat out int pie_index_;
|
|
13
13
|
|
|
14
|
-
uniform float scale;
|
|
15
|
-
|
|
16
14
|
out vec4 vColor;
|
|
17
15
|
|
|
18
16
|
void main(void) {
|
|
@@ -23,8 +21,8 @@ void main(void) {
|
|
|
23
21
|
// Triangle vertex' are (mx,my) and two more. The
|
|
24
22
|
// latter two will be scaled so that the triangle (or the pie piece its part of) will
|
|
25
23
|
// have constant size depending on zoom.
|
|
26
|
-
float x = scale * (positions.x - mx);
|
|
27
|
-
float y = scale * (positions.y - my);
|
|
24
|
+
float x = piechart.scale * (positions.x - mx);
|
|
25
|
+
float y = piechart.scale * (positions.y - my);
|
|
28
26
|
|
|
29
27
|
v = vec3(x + mx, y + my, 0.0);
|
|
30
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"piechart.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/piechart/piechart.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe
|
|
1
|
+
{"version":3,"file":"piechart.vs.glsl.js","sourceRoot":"","sources":["../../../src/layers/piechart/piechart.vs.glsl.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCd,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { decoder } from "./decoder";
|
|
2
|
-
export { utilities } from "./utilities";
|
|
2
|
+
export { utilities, decodeIndexFromRGB, decodeNormalizedValueFromRGB, decodeNormalizedValueWithNaNFromRGB, } from "./utilities";
|
|
3
3
|
export { phongMaterial } from "./phong-lighting/phong-material";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { decoder } from "./decoder";
|
|
2
|
-
export { utilities } from "./utilities";
|
|
2
|
+
export { utilities, decodeIndexFromRGB, decodeNormalizedValueFromRGB, decodeNormalizedValueWithNaNFromRGB, } from "./utilities";
|
|
3
3
|
export { phongMaterial } from "./phong-lighting/phong-material";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layers/shader_modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layers/shader_modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACH,SAAS,EACT,kBAAkB,EAClB,4BAA4B,EAC5B,mCAAmC,GACtC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -11,9 +11,7 @@ export const phongMaterial = {
|
|
|
11
11
|
vs: PHONG_VS,
|
|
12
12
|
fs: PHONG_FS,
|
|
13
13
|
defines: {
|
|
14
|
-
|
|
15
|
-
// @ts-expect-error
|
|
16
|
-
LIGHTING_FRAGMENT: true,
|
|
14
|
+
LIGHTING_FRAGMENT: 1,
|
|
17
15
|
},
|
|
18
16
|
uniformTypes: {
|
|
19
17
|
ambient: "f32",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phong-material.js","sourceRoot":"","sources":["../../../../src/layers/shader_modules/phong-lighting/phong-material.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AASp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,aAAa,CAAC,GAAG,CAC/C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CACD,CAAC;QACtB,CAAC;QACD,uCAAY,aAAa,CAAC,eAAe,GAAK,QAAQ,EAAG;IAC7D,CAAC;CACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const PHONG_VS = "uniform phongMaterialUniforms {\n uniform float ambient;\n uniform float diffuse;\n uniform float shininess;\n uniform vec3 specularColor;\n} material;\n";
|
|
2
|
-
export declare const PHONG_FS = "\nuniform phongMaterialUniforms {\n uniform float ambient;\n uniform float diffuse;\n uniform float shininess;\n uniform vec3 specularColor;\n} material;\n\n// Note modified for two sided
|
|
2
|
+
export declare const PHONG_FS = "#define MAX_LIGHTS 3\n\nuniform phongMaterialUniforms {\n uniform float ambient;\n uniform float diffuse;\n uniform float shininess;\n uniform vec3 specularColor;\n} material;\n\n// Note modified for two sided lighting.\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n vec3 halfway_direction = normalize(light_direction + view_direction); \n\n float lambertian = abs(dot(light_direction, normal_worldspace));\n float specular_angle = abs(dot(normal_worldspace, halfway_direction));\n\n float specular = pow(specular_angle, material.shininess); \n return (lambertian * material.diffuse * surfaceColor + specular * material.specularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = surfaceColor;\n\n if (lighting.enabled == 0) {\n return lightColor;\n }\n\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n lightColor = material.ambient * surfaceColor * lighting.ambientColor;\n\n for (int i = 0; i < lighting.pointLightCount; i++) {\n PointLight pointLight = lighting_getPointLight(i);\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n float light_attenuation = getPointLightAttenuation(pointLight, distance(light_position_worldspace, position_worldspace));\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color / light_attenuation);\n }\n\n int totalLights = min(MAX_LIGHTS, lighting.pointLightCount + lighting.directionalLightCount);\n for (int i = lighting.pointLightCount; i < totalLights; i++) {\n DirectionalLight directionalLight = lighting_getDirectionalLight(i);\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n \n return lightColor;\n}\n";
|
|
@@ -10,6 +10,7 @@ uniform phongMaterialUniforms {
|
|
|
10
10
|
} material;
|
|
11
11
|
`;
|
|
12
12
|
export const PHONG_FS = /* glsl */ `\
|
|
13
|
+
#define MAX_LIGHTS 3
|
|
13
14
|
|
|
14
15
|
uniform phongMaterialUniforms {
|
|
15
16
|
uniform float ambient;
|
|
@@ -18,7 +19,7 @@ uniform phongMaterialUniforms {
|
|
|
18
19
|
uniform vec3 specularColor;
|
|
19
20
|
} material;
|
|
20
21
|
|
|
21
|
-
// Note modified for two sided
|
|
22
|
+
// Note modified for two sided lighting.
|
|
22
23
|
vec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {
|
|
23
24
|
vec3 halfway_direction = normalize(light_direction + view_direction);
|
|
24
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phong-shaders-glsl.js","sourceRoot":"","sources":["../../../../src/layers/shader_modules/phong-lighting/phong-shaders-glsl.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;;;;;;;CAOlC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"phong-shaders-glsl.js","sourceRoot":"","sources":["../../../../src/layers/shader_modules/phong-lighting/phong-shaders-glsl.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;;;;;;;CAOlC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ClC,CAAC"}
|
|
@@ -2,3 +2,88 @@ export declare const utilities: {
|
|
|
2
2
|
name: string;
|
|
3
3
|
fs: string;
|
|
4
4
|
};
|
|
5
|
+
type RGB = [number, number, number];
|
|
6
|
+
/**
|
|
7
|
+
* Encodes a numeric index into an RGB array, where each element represents
|
|
8
|
+
* a color channel (red, green, blue) in the range [0, 255].
|
|
9
|
+
*
|
|
10
|
+
* This function is the same than the shader function `encodeIndexToRGB`,
|
|
11
|
+
* except that the shader function returns values in the range [0, 1] to satisfy
|
|
12
|
+
* OpenGL's requirements for color values.
|
|
13
|
+
*
|
|
14
|
+
* The encoding uses bit-shifting to split the index into three 8-bit values,
|
|
15
|
+
* allowing for unique representation of indices from 0 to 16,777,215.
|
|
16
|
+
*
|
|
17
|
+
* @param index - The numeric index to encode. Values outside the range [0, 16,777,215]
|
|
18
|
+
* are clamped to fit within the representable range.
|
|
19
|
+
* @returns An array of three numbers representing the encoded RGB value.
|
|
20
|
+
*/
|
|
21
|
+
export declare function encodeIndexToRGB(index: number): RGB;
|
|
22
|
+
/**
|
|
23
|
+
* Decodes a numeric index from an RGB-encoded array.
|
|
24
|
+
* Used to decode indices encoded with the shader function `encodeIndexToRGB`.
|
|
25
|
+
*
|
|
26
|
+
* The function interprets the input array as a packed 24-bit integer,
|
|
27
|
+
* where each element represents a color channel (red, green, blue).
|
|
28
|
+
* The index is calculated as: (red * 65536) + (green * 256) + blue.
|
|
29
|
+
*
|
|
30
|
+
* @param encodedIndex - An array of three numbers representing the RGB channels.
|
|
31
|
+
* @returns The decoded numeric index.
|
|
32
|
+
*/
|
|
33
|
+
export declare function decodeIndexFromRGB(encodedIndex: RGB): number;
|
|
34
|
+
/**
|
|
35
|
+
* Encodes a normalized value (in the range [0, 1]) into an RGB representation,
|
|
36
|
+
* where each element represents a color channel (red, green, blue) in the range [0, 255].
|
|
37
|
+
*
|
|
38
|
+
* This function is the same than the shader function `encodeNormalizedValueToRGB`,
|
|
39
|
+
* except that the shader function returns values in the range [0, 1] to satisfy
|
|
40
|
+
* OpenGL's requirements for color values.
|
|
41
|
+
*
|
|
42
|
+
* The value is first clamped to the [0, 1] range, then scaled by `constants.MAX_INDEX`
|
|
43
|
+
* and passed to `encodeIndexToRGB` for conversion.
|
|
44
|
+
*
|
|
45
|
+
* @param value - The normalized value to encode, expected to be between 0 and 1.
|
|
46
|
+
* @returns An RGB object representing the encoded value.
|
|
47
|
+
*/
|
|
48
|
+
export declare function encodeNormalizedValueToRGB(value: number): RGB;
|
|
49
|
+
/**
|
|
50
|
+
* Decodes a normalized value from an RGB-encoded array.
|
|
51
|
+
* Used to decode indices encoded with the shader function `encodeNormalizedValueToRGB`.
|
|
52
|
+
*
|
|
53
|
+
* The function interprets the input `encodedValue` as a 3-element array representing
|
|
54
|
+
* the red, green, and blue channels. It reconstructs the original value by combining
|
|
55
|
+
* the channels into a single integer and normalizing it by dividing by `constants.MAX_INDEX`.
|
|
56
|
+
*
|
|
57
|
+
* @param encodedValue - An array of three numbers representing the RGB channels.
|
|
58
|
+
* @returns The decoded normalized value as a number in the range [0, 1].
|
|
59
|
+
*/
|
|
60
|
+
export declare function decodeNormalizedValueFromRGB(encodedValue: RGB): number;
|
|
61
|
+
/**
|
|
62
|
+
* Encodes a normalized value (in the range [0, 1]) into an RGB representation,
|
|
63
|
+
* where each element represents a color channel (red, green, blue) in the range [0, 255].
|
|
64
|
+
* The value can be NaN, which gets encoded to [255, 255, 255].
|
|
65
|
+
*
|
|
66
|
+
* This function is the same than the shader function `encodeNormalizedValueWithNaNToRGB`,
|
|
67
|
+
* except that the shader function returns values in the range [0, 1] to satisfy
|
|
68
|
+
* OpenGL's requirements for color values.
|
|
69
|
+
*
|
|
70
|
+
* The value is first clamped to the [0, 1] range, then scaled by `constants.MAX_INDEX`
|
|
71
|
+
* and passed to `encodeIndexToRGB` for conversion.
|
|
72
|
+
*
|
|
73
|
+
* @param value - The normalized value to encode, expected to be between 0 and 1.
|
|
74
|
+
* @returns An RGB object representing the encoded value.
|
|
75
|
+
*/
|
|
76
|
+
export declare function encodeNormalizedValueWithNaNToRGB(value: number): RGB;
|
|
77
|
+
/**
|
|
78
|
+
* Decodes a normalized value from an RGB-encoded array.
|
|
79
|
+
* Used to decode indices encoded with the shader function `encodeNormalizedValueWithNaNToRGB`.
|
|
80
|
+
*
|
|
81
|
+
* The function interprets the input `encodedValue` as a 3-element array representing
|
|
82
|
+
* the red, green, and blue channels. It reconstructs the original value by combining
|
|
83
|
+
* the channels into a single integer and normalizing it by dividing by `constants.MAX_INDEX`.
|
|
84
|
+
*
|
|
85
|
+
* @param encodedValue - An array of three numbers representing the RGB channels.
|
|
86
|
+
* @returns The decoded normalized value as a number in the range [0, 1].
|
|
87
|
+
*/
|
|
88
|
+
export declare function decodeNormalizedValueWithNaNFromRGB(encodedValue: RGB): number;
|
|
89
|
+
export {};
|
|
@@ -1,26 +1,174 @@
|
|
|
1
|
-
const fs =
|
|
1
|
+
const fs = `//
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
bool isNanValue(float value) {
|
|
4
|
+
// isnan() does not work in some systems, , neither does (value == value)
|
|
5
|
+
return (value < 0.0 || value > 0.0 || value == 0.0) ? false : true;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const int MAX_INDEX = 256 * 256 * 256 - 1; // 16777215
|
|
9
|
+
|
|
10
|
+
// Encodes an index [0..16777215] to RGB color.
|
|
11
|
+
// Note: 256 * 256 * 256 - 1 = 16777215
|
|
12
|
+
// Alpha value is overwritten by Deck.gl to encode the layer index
|
|
13
|
+
vec4 encodeIndexToRGB(int index) {
|
|
14
|
+
index = clamp(index, 0, MAX_INDEX);
|
|
15
|
+
|
|
16
|
+
vec4 encoded = vec4(index >> 16 & 0xff, index >> 8 & 0xff, index & 0xff, 255.0);
|
|
17
|
+
return encoded / 255.0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Encodes a normalized float [0..1] to RGB color.
|
|
21
|
+
// The value is clamped to [0, 1] before encoding.
|
|
22
|
+
// Due to OpenGL framebuffer precision, only 16777215 values are distinguished.
|
|
23
|
+
// Note: 256 * 256 * 256 - 1 = 16777215
|
|
24
|
+
// Alpha value is overwritten by Deck.gl to encode the layer index
|
|
25
|
+
vec4 encodeNormalizedValueToRGB(float value) {
|
|
26
|
+
value = clamp(value, 0.0, 1.0);
|
|
27
|
+
return encodeIndexToRGB(int(value * float(MAX_INDEX)));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Encodes a normalized float [0..1] to RGB color.
|
|
31
|
+
// NaN gets encoded to [1, 1, 1, 1].
|
|
32
|
+
// The value is clamped to [0, 1] before encoding.
|
|
33
|
+
// Due to OpenGL framebuffer precision, only 16777214 values are distinguished.
|
|
34
|
+
// Note: 256 * 256 * 256 - 2 = 16777214 (one is reserved for NaN)
|
|
35
|
+
// Alpha value is overwritten by Deck.gl to encode the layer index
|
|
36
|
+
vec4 encodeNormalizedValueWithNaNToRGB(float value) {
|
|
37
|
+
if( isNanValue(value) ) {
|
|
38
|
+
return vec4(1.0, 1.0, 1.0, 1.0);
|
|
39
|
+
}
|
|
40
|
+
value = clamp(value, 0.0, 1.0);
|
|
41
|
+
return encodeIndexToRGB(int(value * float(MAX_INDEX - 1)));
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
22
44
|
export const utilities = {
|
|
23
45
|
name: "utilities",
|
|
24
46
|
fs,
|
|
25
47
|
};
|
|
48
|
+
const constants = {
|
|
49
|
+
MAX_INDEX: 256 * 256 * 256 - 1, // 16777215
|
|
50
|
+
SHIFT_VECTOR: [16, 8, 0],
|
|
51
|
+
ENCODE_VECTOR: [16777215 / 65536, 16777215 / 256, 16777215],
|
|
52
|
+
v256: 256, // 256
|
|
53
|
+
v256_2: 256 * 256, // 65536
|
|
54
|
+
v256_3: 256 * 256 * 256, // 16777216
|
|
55
|
+
MAX_NORMALIZED_FLOAT: 255 / 256 +
|
|
56
|
+
255 / 256 / 256 +
|
|
57
|
+
255 / 256 / 256 / 256 +
|
|
58
|
+
255 / 256 / 256 / 256 / 256,
|
|
59
|
+
scaleForNaN: (256 * 256 * 256 - 1) / (256 * 256 * 256),
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Encodes a numeric index into an RGB array, where each element represents
|
|
63
|
+
* a color channel (red, green, blue) in the range [0, 255].
|
|
64
|
+
*
|
|
65
|
+
* This function is the same than the shader function `encodeIndexToRGB`,
|
|
66
|
+
* except that the shader function returns values in the range [0, 1] to satisfy
|
|
67
|
+
* OpenGL's requirements for color values.
|
|
68
|
+
*
|
|
69
|
+
* The encoding uses bit-shifting to split the index into three 8-bit values,
|
|
70
|
+
* allowing for unique representation of indices from 0 to 16,777,215.
|
|
71
|
+
*
|
|
72
|
+
* @param index - The numeric index to encode. Values outside the range [0, 16,777,215]
|
|
73
|
+
* are clamped to fit within the representable range.
|
|
74
|
+
* @returns An array of three numbers representing the encoded RGB value.
|
|
75
|
+
*/
|
|
76
|
+
export function encodeIndexToRGB(index) {
|
|
77
|
+
// clamp to range that can be encoded
|
|
78
|
+
index = Math.min(Math.max(index, 0), constants.MAX_INDEX);
|
|
79
|
+
const encoded = constants.SHIFT_VECTOR.map((v) => (index >> v) & 0xff);
|
|
80
|
+
return encoded;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Decodes a numeric index from an RGB-encoded array.
|
|
84
|
+
* Used to decode indices encoded with the shader function `encodeIndexToRGB`.
|
|
85
|
+
*
|
|
86
|
+
* The function interprets the input array as a packed 24-bit integer,
|
|
87
|
+
* where each element represents a color channel (red, green, blue).
|
|
88
|
+
* The index is calculated as: (red * 65536) + (green * 256) + blue.
|
|
89
|
+
*
|
|
90
|
+
* @param encodedIndex - An array of three numbers representing the RGB channels.
|
|
91
|
+
* @returns The decoded numeric index.
|
|
92
|
+
*/
|
|
93
|
+
export function decodeIndexFromRGB(encodedIndex) {
|
|
94
|
+
return 65536 * encodedIndex[0] + 256 * encodedIndex[1] + encodedIndex[2];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Encodes a normalized value (in the range [0, 1]) into an RGB representation,
|
|
98
|
+
* where each element represents a color channel (red, green, blue) in the range [0, 255].
|
|
99
|
+
*
|
|
100
|
+
* This function is the same than the shader function `encodeNormalizedValueToRGB`,
|
|
101
|
+
* except that the shader function returns values in the range [0, 1] to satisfy
|
|
102
|
+
* OpenGL's requirements for color values.
|
|
103
|
+
*
|
|
104
|
+
* The value is first clamped to the [0, 1] range, then scaled by `constants.MAX_INDEX`
|
|
105
|
+
* and passed to `encodeIndexToRGB` for conversion.
|
|
106
|
+
*
|
|
107
|
+
* @param value - The normalized value to encode, expected to be between 0 and 1.
|
|
108
|
+
* @returns An RGB object representing the encoded value.
|
|
109
|
+
*/
|
|
110
|
+
export function encodeNormalizedValueToRGB(value) {
|
|
111
|
+
// clamp to [0, 1]
|
|
112
|
+
value = Math.min(Math.max(value, 0.0), 1.0);
|
|
113
|
+
return encodeIndexToRGB(value * constants.MAX_INDEX);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Decodes a normalized value from an RGB-encoded array.
|
|
117
|
+
* Used to decode indices encoded with the shader function `encodeNormalizedValueToRGB`.
|
|
118
|
+
*
|
|
119
|
+
* The function interprets the input `encodedValue` as a 3-element array representing
|
|
120
|
+
* the red, green, and blue channels. It reconstructs the original value by combining
|
|
121
|
+
* the channels into a single integer and normalizing it by dividing by `constants.MAX_INDEX`.
|
|
122
|
+
*
|
|
123
|
+
* @param encodedValue - An array of three numbers representing the RGB channels.
|
|
124
|
+
* @returns The decoded normalized value as a number in the range [0, 1].
|
|
125
|
+
*/
|
|
126
|
+
export function decodeNormalizedValueFromRGB(encodedValue) {
|
|
127
|
+
return ((65536 * encodedValue[0] + 256 * encodedValue[1] + encodedValue[2]) /
|
|
128
|
+
constants.MAX_INDEX);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Encodes a normalized value (in the range [0, 1]) into an RGB representation,
|
|
132
|
+
* where each element represents a color channel (red, green, blue) in the range [0, 255].
|
|
133
|
+
* The value can be NaN, which gets encoded to [255, 255, 255].
|
|
134
|
+
*
|
|
135
|
+
* This function is the same than the shader function `encodeNormalizedValueWithNaNToRGB`,
|
|
136
|
+
* except that the shader function returns values in the range [0, 1] to satisfy
|
|
137
|
+
* OpenGL's requirements for color values.
|
|
138
|
+
*
|
|
139
|
+
* The value is first clamped to the [0, 1] range, then scaled by `constants.MAX_INDEX`
|
|
140
|
+
* and passed to `encodeIndexToRGB` for conversion.
|
|
141
|
+
*
|
|
142
|
+
* @param value - The normalized value to encode, expected to be between 0 and 1.
|
|
143
|
+
* @returns An RGB object representing the encoded value.
|
|
144
|
+
*/
|
|
145
|
+
export function encodeNormalizedValueWithNaNToRGB(value) {
|
|
146
|
+
if (Number.isNaN(value)) {
|
|
147
|
+
return [255, 255, 255];
|
|
148
|
+
}
|
|
149
|
+
// clamp to [0, 1]
|
|
150
|
+
value = Math.min(Math.max(value, 0.0), 1.0);
|
|
151
|
+
// MAX_INDEX is used for NaN, so we have one less value to use.
|
|
152
|
+
return encodeIndexToRGB(value * (constants.MAX_INDEX - 1));
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Decodes a normalized value from an RGB-encoded array.
|
|
156
|
+
* Used to decode indices encoded with the shader function `encodeNormalizedValueWithNaNToRGB`.
|
|
157
|
+
*
|
|
158
|
+
* The function interprets the input `encodedValue` as a 3-element array representing
|
|
159
|
+
* the red, green, and blue channels. It reconstructs the original value by combining
|
|
160
|
+
* the channels into a single integer and normalizing it by dividing by `constants.MAX_INDEX`.
|
|
161
|
+
*
|
|
162
|
+
* @param encodedValue - An array of three numbers representing the RGB channels.
|
|
163
|
+
* @returns The decoded normalized value as a number in the range [0, 1].
|
|
164
|
+
*/
|
|
165
|
+
export function decodeNormalizedValueWithNaNFromRGB(encodedValue) {
|
|
166
|
+
if (encodedValue[0] === 255 &&
|
|
167
|
+
encodedValue[1] === 255 &&
|
|
168
|
+
encodedValue[2] === 255) {
|
|
169
|
+
return Number.NaN;
|
|
170
|
+
}
|
|
171
|
+
return ((65536 * encodedValue[0] + 256 * encodedValue[1] + encodedValue[2]) /
|
|
172
|
+
(constants.MAX_INDEX - 1));
|
|
173
|
+
}
|
|
26
174
|
//# sourceMappingURL=utilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/layers/shader_modules/utilities.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/layers/shader_modules/utilities.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CV,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,IAAI,EAAE,WAAW;IACjB,EAAE;CACL,CAAC;AAIF,MAAM,SAAS,GAAG;IACd,SAAS,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE,WAAW;IAC3C,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAQ;IAC/B,aAAa,EAAE,CAAC,QAAQ,GAAG,KAAK,EAAE,QAAQ,GAAG,GAAG,EAAE,QAAQ,CAAQ;IAClE,IAAI,EAAE,GAA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14,4 +14,4 @@ export declare function loadDataArray<T extends TypedArray>(data: string | numbe
|
|
|
14
14
|
*
|
|
15
15
|
* @param data - The Float32Array to dump
|
|
16
16
|
*/
|
|
17
|
-
export declare function debug_dumpToBinaryFile(data: Float32Array): void;
|
|
17
|
+
export declare function debug_dumpToBinaryFile(data: Float32Array, size: number | [number, number]): void;
|
package/dist/utils/serialize.js
CHANGED
|
@@ -106,16 +106,19 @@ export function loadDataArray(data, type) {
|
|
|
106
106
|
*
|
|
107
107
|
* @param data - The Float32Array to dump
|
|
108
108
|
*/
|
|
109
|
-
export function debug_dumpToBinaryFile(data) {
|
|
109
|
+
export function debug_dumpToBinaryFile(data, size) {
|
|
110
110
|
// Write propertiesData to a binary file for debugging
|
|
111
111
|
if (data instanceof Float32Array) {
|
|
112
|
+
const sizeTag = Array.isArray(size)
|
|
113
|
+
? `-${size[0]}x${size[1]}`
|
|
114
|
+
: `-${size}`;
|
|
112
115
|
const blob = new Blob([data.buffer], {
|
|
113
116
|
type: "application/octet-stream",
|
|
114
117
|
});
|
|
115
118
|
const url = URL.createObjectURL(blob);
|
|
116
119
|
const a = document.createElement("a");
|
|
117
120
|
a.href = url;
|
|
118
|
-
a.download =
|
|
121
|
+
a.download = `propertiesData${sizeTag}.bin`;
|
|
119
122
|
a.style.display = "none";
|
|
120
123
|
document.body.appendChild(a);
|
|
121
124
|
a.click();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/utils/serialize.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,SAAe,SAAS,CAAC,GAAW;;QAChC,IAAI,CAAC;YACD,OAAO,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;QAA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Q,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC;QACb,CAAC,CAAC,QAAQ,GAAG,iBAAiB,OAAO,MAAM,CAAC;QAC5C,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,KAAK,EAAE,CAAC;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7B,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webviz/subsurface-viewer",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
4
4
|
"description": "3D visualization component for subsurface reservoir data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"subsurface",
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
"author": "Equinor <opensource@equinor.com>",
|
|
33
33
|
"license": "MPL-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@deck.gl-community/editable-layers": "
|
|
36
|
-
"@deck.gl/aggregation-layers": "
|
|
37
|
-
"@deck.gl/core": "
|
|
38
|
-
"@deck.gl/extensions": "
|
|
39
|
-
"@deck.gl/geo-layers": "
|
|
40
|
-
"@deck.gl/json": "
|
|
41
|
-
"@deck.gl/layers": "
|
|
42
|
-
"@deck.gl/mesh-layers": "
|
|
43
|
-
"@deck.gl/react": "
|
|
35
|
+
"@deck.gl-community/editable-layers": "~9.1.1",
|
|
36
|
+
"@deck.gl/aggregation-layers": "~9.1.15",
|
|
37
|
+
"@deck.gl/core": "~9.1.15",
|
|
38
|
+
"@deck.gl/extensions": "~9.1.15",
|
|
39
|
+
"@deck.gl/geo-layers": "~9.1.15",
|
|
40
|
+
"@deck.gl/json": "~9.1.15",
|
|
41
|
+
"@deck.gl/layers": "~9.1.15",
|
|
42
|
+
"@deck.gl/mesh-layers": "~9.1.15",
|
|
43
|
+
"@deck.gl/react": "~9.1.15",
|
|
44
44
|
"@emerson-eps/color-tables": "^0.4.92",
|
|
45
45
|
"@equinor/eds-core-react": "^0.36.0",
|
|
46
46
|
"@equinor/eds-icons": "^0.21.0",
|
|
47
47
|
"@turf/simplify": "^7.1.0",
|
|
48
48
|
"@vivaxy/png": "^1.3.0",
|
|
49
|
-
"@webviz/wsc-common": "1.3.
|
|
49
|
+
"@webviz/wsc-common": "1.3.7",
|
|
50
50
|
"ajv": "^8.16.0",
|
|
51
51
|
"convert-units": "^2.3.4",
|
|
52
52
|
"d3": "^7.8.2",
|