Uh oh!
There was an error while loading. Please reload this page.
Handle streamtube coordinates in string format and handle different data orders in isosurface and volume - #4431
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| if(len === undefined) len = arr.length; | ||
| // no need for casting typed arrays to numbers | ||
| if(Lib.isTypedArray(arr)) return arr.slice(0, len); |
There was a problem hiding this comment.
It's better to use arr.subarray() for typed arrays, as .slice isn't supported in older browsers.
There was a problem hiding this comment.
Good call.
Wondering if we need to slice the array at all?
There was a problem hiding this comment.
slice (or subarry) is needed for distictVals to work correctly.
But it may be better not to slice if the length is correct.
There was a problem hiding this comment.
But it may be better not to slice if the length is correct.
that could be a nice optimisation for typed arrays, but for regular arrays we'll need to slice in general to cast numerical-strings items w/o mutating.
- computed trace._len and process grid at the start of calc - apply subarray instead of slice for typed arrays - improve streamtube jasmine test
- add image tests for various grid fill orders - add jasmine tests for various grid fill orders and data types
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…re them at trace._x etc. - rename previous trace._x, _y, _z & _intensity as well as trace._i, _j & _k to trace._meshX, etc. to avoid name conflicts
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
etpinard
commented
Dec 30, 2019
Nice job @archmoj - this PR is looking very nice now, one commit away from merging. |
etpinard
commented
Dec 30, 2019
Beautiful fix!! Thanks very much for bringing some sanity into streamtube-land 💃 💃 💃 |
Fixes#4427:
Whereas raw x, y and z values were used in
streamtubecalc step, in order to find the order of data, it was necessary to ensure casting to numbers before comparing two values.Before
After
And fixes#4440:
Similar to #4271, this PR fixed the data cube order issue so that the
valueas well asx,yandzarrays could be filled in different orders.Before
After
@plotly/plotly_js