-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix rendering of WebGL traces on latest Chrome-128
and Edge-128
browsers
#7131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bfabb55
5b6663c
4fcc821
87c77bf
be53698
890ccfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Fix rendering of parcoords and stackgl traces on the latest Chrome-128 and Edge-128 browsers [[#7131](https://github.com/plotly/plotly.js/pull/7131)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23536,6 +23536,19 @@ function makeVector(length, fill) { | |
return result | ||
} | ||
|
||
// Fix for Chrome 128 | ||
var INF = 1e38 | ||
function ensureFinite(arr) { | ||
return arr.map(function(v) { | ||
return ( | ||
isNaN(v) ? 0 : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this one exclude NaN values? Doesn’t that pose a risk that missing data will be filled in spuriously? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We didn't encounter that case in our tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have that case (missing data, particularly with lines but also points and surfaces) in our image tests? This is stackgl so I guess my question is scoped to the 3D trace types. But also, this is different from what you did in parcoords, why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In stackgl jasmine tests I encountered a case with both infinity and NaN. So I had to guard against both. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still want to understand:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The case of NaN didn't happen in the parcoords cases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @archmoj @alexcjohnson is this a must-have for our next minor release? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that several trace types seem fully broken on latest Chrome (and Edge, per plotly/plotly.py#4729, not surprising as it’s built on Chrome) I certainly think so. I don’t particularly care how the fix is done but I do want us to test thoroughly that the fix can’t generate incorrect data points on a graph |
||
v > INF ? INF : | ||
v < -INF ? -INF : | ||
v | ||
) | ||
}) | ||
} | ||
|
||
//Create shims for uniforms | ||
function createUniformWrapper(gl, wrapper, uniforms, locations) { | ||
|
||
|
@@ -23598,7 +23611,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { | |
gl['uniform' + d + 'iv'](locations[idx], objPath) | ||
break | ||
case 'v': | ||
gl['uniform' + d + 'fv'](locations[idx], objPath) | ||
gl['uniform' + d + 'fv'](locations[idx], ensureFinite(objPath)) | ||
break | ||
default: | ||
throw new GLError('', 'Unrecognized data type for vector ' + name + ': ' + t) | ||
|
@@ -23608,7 +23621,7 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { | |
if(d < 2 || d > 4) { | ||
throw new GLError('', 'Invalid uniform dimension type for matrix ' + name + ': ' + t) | ||
} | ||
gl['uniformMatrix' + d + 'fv'](locations[idx], false, objPath) | ||
gl['uniformMatrix' + d + 'fv'](locations[idx], false, ensureFinite(objPath)) | ||
break | ||
} else { | ||
throw new GLError('', 'Unknown uniform data type for ' + name + ': ' + t) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
"gl-pointcloud2d": "^1.0.3", | ||
"gl-scatter3d": "^1.4.1", | ||
"gl-select-box": "^1.0.4", | ||
"gl-shader": "4.3.1", | ||
"gl-shader": "github:archmoj/gl-shader#0409f68f8005ef3a3f3fccb6121bc7f0a5fda8bb", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"gl-spikes2d": "^1.0.2", | ||
"gl-spikes3d": "^1.0.11", | ||
"gl-streamtube3d": "^1.4.2", | ||
|
Uh oh!
There was an error while loading. Please reload this page.