Just to round things off with this conversation…
This is *exactly* what I was angling for. Told me all I needed to know in 5
minutes.
++ Well explained
++ instantly tryable
++ Code on github
++ Even has inline working examples (…the sort of thing you can do with svg
and js)
++ Oh, and it's free.

*Using Javascript with SVG*
https://www.petercollingridge.co.uk/tutorials/svg/interactive/javascript/
https://github.com/petercollingridge/code-for-blog

On Sat, 20 Feb 2021 at 14:12, Ian Clark <[email protected]> wrote:

> Thanks, Bob.
>
> The paywall puts me off scribd, but it's good to know where to go as a
> long-stop.
>
> For the nonce, Google is giving me what I want once I start using the
> right keywords. E.g. it helps a lot to know that SVG has its own DOM.
>
> Ian
>
> On Fri, 19 Feb 2021 at 17:36, 'robert therriault' via Chat <
> [email protected]> wrote:
>
>> You are right Ian,
>>
>> That is how Jig operates and it does not reach the level of
>> transformation in a 'live' fashion.
>>
>> Have you looked at "Learn SVG"?
>> https://www.scribd.com/doc/58271695/Learn-SVG It is a pdf that I have
>> used as a reference and chapter 10 is all about 'Scripting the DOM' using
>> Javascript and is probably closer to what you are looking for. It is a
>> little rough around the edges, was written around 2010 I think and could
>> use a good copy editor, but is serviceable as a reference.
>>
>> Cheers, bob
>>
>> > On Feb 19, 2021, at 09:06, Ian Clark <[email protected]> wrote:
>> >
>> > I took a brief look at it yesterday, Bob, when Bill had drawn my
>> attention
>> > to the svgview widget. Whereas Jig uses a webview, if I recall.
>> >
>> > I thought it was neat and much like how I'd approach it. Maybe with
>> > component verbs nested a bit deeper, more like how JHS builds html. I
>> > hadn't spotted the CSS, but now you mention it I can see where.
>> >
>> > But AFAICT it updates the display by regenerating and reloading the
>> entire
>> > svg into the webview. Perfectly adequate for what Jig needs to do. But I
>> > see on the web some people claiming to do animation by regenerating just
>> > the CSS, which could in some applications achieve the sort of efficiency
>> > I'm aiming for.
>> >
>> > Ian
>> >
>> > On Fri, 19 Feb 2021 at 16:39, 'robert therriault' via Chat <
>> > [email protected]> wrote:
>> >
>> >> Hey Ian,
>> >>
>> >> Jig constructs its SVG code for each representation that you require.
>> >> Animations and type fonts and colours are handled through CSS, but
>> other
>> >> constructions are all calculated on the spot. Of particular note are
>> boxes
>> >> that have their sizes cascade up through the chain, using particular
>> >> positions for width and height so that the size of contents affects the
>> >> size of the containing boxes so that the variable unicode outputs do
>> not
>> >> result in jagged edges. It may not get all the way to what you are
>> looking
>> >> for, but it does leverage the power of SVG and CSS (jig does not use
>> >> javascript)
>> >>
>> >> Cheers, bob
>> >>
>> >>> On Feb 19, 2021, at 07:20, greg heil <[email protected]> wrote:
>> >>>
>> >>> Ian
>> >>>
>> >>> About 5 years ago i moved in to a new house
>> >>> before that i spent a couple years
>> >>> communicating with an architect
>> >>> Mostly on the web in SVG files
>> >>> made mostly in Inkscape
>> >>> with extracted components
>> >>> which were handcrafted
>> >>> before retesting
>> >>> in the Inkscape environment
>> >>>
>> >>> Dropbox is no longer in the business
>> >>> of allowing public use of their cloud
>> >>> so i got knocked off the web
>> >>> eventually i may resurrect that part on GitHub
>> >>> or not
>> >>>
>> >>> Have to see
>> >>> if there is an extractable component
>> >>> i used E, N and planar view files
>> >>> The main dynamics were sectional
>> >>> and a plumbing flow
>> >>>
>> >>> ~greg
>> >>> https//picsrp.github.io
>> >>>
>> >>> --
>> >>>
>> >>> from: Ian Clark <[email protected]>
>> >>> to: Chat forum <[email protected]>
>> >>> date: Feb 19, 2021, 5:46 AM
>> >>> subject: Re: [Jchat] Circulatory system graphic
>> >>>
>> >>> 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
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >>
>> >> ----------------------------------------------------------------------
>> >> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> 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