createRadialGradient has stopped rendering properly

I have some notebooks which I haven’t modified (except today a bit, after I noticed the bug). The thumbnails look correct, but when you view the notebook, the radial gradients no longer render in the canvas. I’m wondering if something has changed in the rendering model that might have caused this. I’ll make a simple test notebook to illustrate more clearly, but in the meantime, you can see it in

Which used to look like 3D spheres (due to the use of radialgradients) but now looks like flat discs.

jbum

Simpler example here: https://beta.observablehq.com/@jbum/test-gradient

works for me in Firefox, broken on chrome

Hi Jim.

I hate to say it, but it looks like you’ve uncovered a bug — or perhaps a change — in createRadialGradient in Chrome 65.

Looking at your Test Gradient sketch: https://beta.observablehq.com/@jbum/test-gradient

With your given createRadialGradient parameters, both the start circle and the end circle are centered on the coordinates: (-rad/3, -rad/3). If you slightly move either the x or the y, for either the start or the end circles, to say, -rad/3.0001, the gradient will suddenly appear:

Very odd indeed…

1 Like

An update. Looks like there’s already a Chrome bug, two hours old, for this:

https://bugs.chromium.org/p/chromium/issues/detail?id=826619&q=createradialgradient&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified#

1 Like

Thanks so much! I worked around by tweaking second param to -rad/3.1