Skip to content

Commit b0cd99d

Browse files
committed
fixup cmin/cmax -> vertexIntensityBounds,
... with the help of gl-vis/gl-streamtube3d#5
1 parent 3b1f809 commit b0cd99d

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Diff for: package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"gl-select-box": "^1.0.2",
8484
"gl-spikes2d": "^1.0.1",
8585
"gl-surface3d": "^1.3.4",
86-
"gl-streamtube3d": "[email protected]:gl-vis/gl-streamtube3d#97c89d7d0e4e4ed1074d47fbfc715bb2d149841c",
86+
"gl-streamtube3d": "[email protected]:gl-vis/gl-streamtube3d#d004f17506ed7fafc30586836d1a76b55dea8e48",
8787
"glslify": "^6.1.1",
8888
"has-hover": "^1.0.1",
8989
"has-passive-events": "^1.0.0",

Diff for: src/traces/streamtube/calc.js

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ module.exports = function calc(gd, trace) {
3030
normMin = Math.min(normMin, norm);
3131
}
3232

33+
trace._normMax = normMax;
34+
3335
colorscaleCalc(trace, [normMin, normMax], '', 'c');
3436

3537
var xMax = -Infinity;

Diff for: src/traces/streamtube/convert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function convert(scene, trace) {
100100
// N.B. cmin/cmax correspond to the min/max vector norm
101101
// in the u/v/w arrays, which in general is NOT equal to max
102102
// intensity that colors the tubes.
103-
meshData.vertexIntensityBounds = [trace.cmin, trace.cmax];
103+
meshData.vertexIntensityBounds = [trace.cmin / trace._normMax, trace.cmax / trace._normMax];
104104

105105
// pass gl-mesh3d lighting attributes
106106
meshData.lightPosition = [trace.lightposition.x, trace.lightposition.y, trace.lightposition.z];

0 commit comments

Comments
 (0)