Greg wrote
>One can certainly tie SVG components to transitions in CSS and DOM events
like mouseovers and double clicks. Is that what you mean?

Yes.

To expand on a bald answer, let me focus a little. Suppose I've found a
nice svg of a Cadillac dashboard. I want to hack it so that I can
programmatically give it an integer value (arising from a computation in J)
to set the position of the steering wheel. That spotlights my requirement
right now, and maybe for evermore. Generalize it to rocketship sprites,
wriggling worms, watch-this-space text boxes, moving arrows and beating
hearts. You get the idea.

Why? To spruce up a lacklustre app I'm working on with sexy graphics.

Now a decade ago I was doing this sort of thing in plain html with embedded
javascript and a series of overlaid images. So crude. So simple. So why am
I (quote) "outside my comfort zone" now?

Python promotes itself by offering "just one way to do it". In stark
contrast, HTML and SVG (not to mention J) could boast: there's always one
more way to do it (if you think that's a virtue), i.e. "giving it" the
integer. If I had a spare 2 weeks to plow thru reams of badly written
how-to articles, stackoverflow posts, missing manuals and ladders with
missing rungs, in the end I'd find something that someone could have shown
me in 3 lines of code. But I don't.

The way forward? Snoop around for code samples. Do you have one for me? I
don't know what I'm looking for but I'll sure recognize it when I see it.

Ian

On Fri, 19 Feb 2021 at 04:28, greg heil <[email protected]> wrote:

> Ian
>
> >One can certainly tie SVG components to transitions in CSS and DOM events
> like mouseovers and double clicks. Is that what you mean?
>
> ~greg
> https//picsrp.github.io
>
> --
>
> from: Ian Clark <[email protected]>
> to: Chat forum <[email protected]>
> date: Feb 18, 2021, 7:19 PM
> subject: Re: [Jchat] Circulatory system graphic
>
> >Thanks for that example, Brian. I'm impressed with how readable the code
> is. Suggests to me the artist writes her svg by hand, and doesn't use a svg
> generator like Inkscape (…or debug/jig).
>
> >A professional illustrator (like my daughter) would think of using a gif
> for this sort of thing. Only a programmer – and maybe it needs a J-er –
> would appreciate the flexibility of using svg instead.
>
> >The animation is hardwired with <animateTransform>. I'm keen to see an
> example where parameters like co-ordinates and delays are altered without
> reloading the whole (edited) textfile, something I'm told is easy with svg.
> Because it's declarative, not prescriptive (…are those the right terms?)
> Altering the DOM by injecting javascript? I'm outside my comfort zone here.
>
> Ian
>
> --
>
> from: Brian Schott <[email protected]>
> to: Chat forum <[email protected]>
> date: Feb 18, 2021, 8:50 AM
> subject: [Jchat] Circulatory system graphic
>
> >Looking at Ian's link I stumbled on this particular one and think it is
> informative both relative to its subject matter and its demonstrative value
> relative to SVG animation.
>
>
> https://upload.wikimedia.org/wikipedia/commons/c/c2/Circulatory_system_SMIL.svg
>
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to