These are chat archives for ractivejs/ractive

11th
Oct 2018
Cerem Cem ASLAN
@ceremcem
Oct 11 2018 17:36
I suppose you have heard about Raphael or Paper.js. Those are two examples of vector drawing libraries. Do you think those are still useful while we are able to manipulate SVG directly with Ractive? I just need first thoughts.
We can generate SVG with Ractive and I think we can use Ractive to generate Ractive (like Lisp), so everything can be written declaratively
Chris Reeves
@evs-chris
Oct 11 2018 17:41
Haven't used them, but have done a fair amount of manipulating svg. If you're doing anything significant, it would definitely help to have some primitives over the raw svg dom available to ractive.
Cerem Cem ASLAN
@ceremcem
Oct 11 2018 17:47
yes, there would be a significant amount of drawing with lots and lots of computations
I thought I could use Ractive to take advantage of its "calculate only needed portion" property
in the end, resulting application will be something like this: http://web-cad.org/sketcher.html#__sample2D__
Chris Reeves
@evs-chris
Oct 11 2018 18:38
I mean, you could definitely take advantage of partials to make an svg-based ractive drawing app, but you'll have to build all of your drawing primitives from scratch. You could probably create primitives based on other libraries source.
Ractive excels at rendering trees of recursive partials, especially if it can leave portions of the tree unrendered until requested by user interaction.
Cerem Cem ASLAN
@ceremcem
Oct 11 2018 18:47
If I get you correctly, it will be like jQuery-UI to Ractive where we can use lots of pre-defined components in jQui but there is no component libraries available in Ractive. However, if it would perform well, creating everything from scratch is a trivial task (comparing to using currently available not so great tools )
Chris Reeves
@evs-chris
Oct 11 2018 18:50
exactly
since you're doing something relatively complicated with svg generation that needs interactivity, creating primitives from scratch is probably worth it
the source of those other libs could be helpful, but integrating directly would probably be more pain than it's worth
Cerem Cem ASLAN
@ceremcem
Oct 11 2018 18:58

but integrating directly would probably be more pain than it's worth

I agree. Thanks!