Re: Conical gradients

If I had to guess, I'd say there are some inconsistencies between 
browsers in how parseFloat deals with Infinity. Sorry about not testing 
that. But as Gavin suggested, you can indeed also just enter a really 
large number. (I'll fix it properly once I'm home again.)

On 02/19/2014 01:26 AM, Paul LeBeau wrote:
> Hi Jasper
> Setting radius to "Infinity" doesn't work for me.  I just get a black
> square.
> Paul
> On 19 February 2014 08:27, Jasper van de Gronde <
> <>> wrote:
>     On 2014-01-25 02:03, Alan Gresley wrote:
>         I can't see how combining both a radial and conic gradient would
>         allow for a kind of spiral gradient. A spiral gradient is more
>         like a repeating radial gradient. What you don't cover is
>         something like a turbine [3] which is a repeating conic gradient.
>     I figured it made more sense to just code it up than to keep talking
>     past each other. What I meant is now implemented in javascript, and
>     available here:
>     <>
>     The left image essentially shows the gradient when viewed as a
>     function of radius and angle (horizontal axis and vertical axis),
>     while the right image shows what the actual gradient would look like
>     when filling a square. (I didn't bother coding up support for
>     different horizontal/vertical radii, nor for allowing the "focus"
>     and "center" to be different, but it would be perfectly possible to
>     add such functionality as well.)
>     To get a repeating conical gradient, just enter some (integer)
>     number of arms larger than 1, with Infinity for the radius.
>     Note that of course the exact parameters required could be fleshed
>     out some more, and perhaps there are better ways to expose this
>     functionality, but if at some point both radial and conical
>     gradients would be allowed, I still think it would be a shame not to
>     allow the full spectrum of "polar gradients".
>     And just to clarify: it might feel a little strange to enter
>     "Infinity" as a radius, but it doesn't give any problems (basically
>     some stuff gets divided by infinity, which is perfectly fine), and
>     simply yields the limit case of what happens when the radius goes to
>     infinity (which happens to give a conical gradient if you specify
>     that you want 1 or more arms). But if desired other schemes are also
>     possible, like having a radius and a "period" similar to the number
>     of arms (mathematically it's the same idea).

Received on Wednesday, 19 February 2014 08:56:47 UTC