Y
Y
Yuri Yerusalimsky2015-12-27 03:50:18
css
Yuri Yerusalimsky, 2015-12-27 03:50:18

Is it possible to morph (transform) from one SVG image to another using JQuery or some other way?

I have a block element, it has an svg image set as a background. I want to make it so that when you hover over it with the mouse, this svg file is replaced by another, and it does this with a morphing effect, i.e. flow from one image to another. I draw your attention, this is not about the fading of one picture into another, not just the disappearance of one layer and the appearance on top of another in the process. Here we are talking about the "restructuring" of one svg image into another. I think I'm thinking of something too complex or not so easy to implement. I just once saw on cool sites with a minimal interface the transformation of one figure into another. For example, you hover over a square, and it turns into three lines (a standardized representation of a mobile menu icon). Here I would like to zababahat the same chip. It's just that the problem is

UPD: I only found this , but the plugin, as I understand it, is for drawing directly through it. I need, if at all possible, to simply feed the path to the SVG file or block with such a background so that the script performs such an animation-morph.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-01-09
@werber

greensock.com/morphSVG

P
Peter, 2015-12-27
@petermzg

jQuery won't help here, but regular javascript + quick wits will help.
Take the points of one svg, you will have to calculate all this yourself, the second one and sequentially rebuild the main svg moving towards the second one.
The only way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question