-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Pass static argument to scene2d #980
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
Conversation
Sweet! Let me test it out. |
@dfcreative I've got some news! Looks like you're almost there. Most gl2d mocks can now be generated in a reproducible way! Here's the list of mocks that are still problematic: By looking at them quickly, all mocks in ⏫ have made up of one or more |
Wait @dfcreative does gl-plot2d need |
Yeah, eventually gl-shader@4.2.1 fixes errors in console, but resulting images still have bad dimensions, due to wrong canvas size etc, gotta check that the other day. |
Ok, 2558160 fixes dimensions, so that initial case works. Sometimes though, |
@dfcreative great. I'll test this out this afternoon! Thanks!! |
|
||
// check for resize | ||
var canvas = this.canvas; | ||
if(canvas.width !== pixelWidth || canvas.height !== pixelHeight) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, refactored so that now there is updateSize
method
@dfcreative looking good! See 052dc63 where I re-generated every gl2d test image. I think they all look good now. I'm still getting some run-to-run inconsistencies when generating images in batch (we use a concurrency of 5 in our image test routine). BUT generating them one-after-another works like charm 🎉 (at least of my machine). In commit b321cb9 we'll see if that same is true on CircleCI. |
What sort of inconsistencies? The inconsistency I faced with is caused by occasional delay of initial |
On CiricleCI, these mocks are failing the image comparison test when ran in queue (i.e. with zero concurrency). Note that the CircleCI machine is a little weaker than most laptops. |
@dfcreative having to run the gl2d image tests with zero concurrency would be a great start. The only drawback would be slower test runs - which isn't that big of a deal at the moment. So, figuring out why some gl2d mocks are having issues on CircleCI would be amazing. |
Yes, I will check it out. Also the inconsistencies - these are the same I mentioned. |
Great. Thanks for the info. 👍 |
Full docs ➡️ https://github.com/plotly/plotly.js/tree/master/test/image#c-generate-or-update-existing-baseline-image |
The problem is that the baseline images are taller than the default plot height I get (500px vs 450px). These mocks do not have sizes in "layout": {
...
"width": 700,
"height": 500
} Everything works fine. Shall we? |
Hmm, looks like CircleCI is still having issues - see https://circleci.com/gh/plotly/plotly.js/2597 off https://github.com/plotly/plotly.js/compare/gl2d-image-tests |
@monfera hi! There seems to be a single mock failing, that is gl2d_pointcloud-basic. The problem is when we try to read pixels from webgl in static canvas with disabled blending, they get mixed with gray-ish background or something like that. What are the use-cases we may want to disable blend here? If we need solid color we can set |
@dfcreative sorry to hear it's causing testing trouble. The blending is disabled here, the purpose was an approx. 2x speedup on shader performance, which mattered a lot on the 1m point user requirement case. Admittedly the comment could be more specific. It should be possible to specify |
@monfera I would guess practically here can be two cases: if there is little data, then having blending enabled will give better results, whereas if there is 1m points, the precision of a single point does not matter and blending is better to be off. Does it make any sense to detect blending dynamically? |
@dfcreative it's possible as we already have a handle on how many points are visible at any one time. (PS. just saw your commit which looks for the total number of points, and in One thing though, there can be a big difference in the rendered output even if there are lots of points. With proper blending, it's possible to have a density cloud effect but of course it comes with shader time expense. |
@dfcreative replying to your question - the user wouldn't know why there's a difference in behavior and it's not explained in the attributes doc, so it should be made explicit. I usually ask @etpinard when it comes to API changes so I'd defer on this too. Also I see that you set |
@@ -75,7 +75,7 @@ module.exports = { | |||
}, | |||
blend: { | |||
valType: 'boolean', | |||
dflt: false, | |||
dflt: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we usually use null
in situation like this one
this.pointcloudOptions.blend = options.marker.blend; | ||
|
||
var blend = options.marker.blend; | ||
if (blend == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and (blend === null)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Merging. I'll add the CI test command in a separate PR. |
- which are now reproducible via #980
- warn when gl2d are ran batch - skip over multiple subplot test on CI, see #980 for details
- warn when gl2d are ran batch - skip over multiple subplot test on CI, see #980 for details
- warn when gl2d are ran batch - skip over multiple subplot test on CI, see #980 for details
- warn when gl2d are ran batch - skip over multiple subplot test on CI, see #980 for details
- which are now reproducible via #980
- warn when gl2d are ran batch - skip over multiple subplot test on CI, see #980 for details
Merged along with this gl-vis/gl-plot2d#4 will remove image of picked data from rendered result