Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using svg in reveal.js #1239

Closed
ghost opened this issue May 24, 2015 · 4 comments
Closed

using svg in reveal.js #1239

ghost opened this issue May 24, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented May 24, 2015

Hi,
I would like to animate (actually extend) a scheme made in svg.
How do I do this with reveal.js.

eg. start with a square, first progress would draw a new circle (in a different layer) and next progress draws a star (new layer) and remove the square.

Any pointers how to do this?

@ghost
Copy link
Author

ghost commented May 25, 2015

Hi,

This how far i got: I can use fragment for incremental showing (I think).
I don't know how to use svg ids and or classes for showing certain groups.

From some googling i did found that somehow i can use

However this shows the complete figure and not only layer1...

any pointers?

@maxmeyer
Copy link

Be careful if you add css to your embedded svg, mermaid-js/mermaid#157, https://www.fedux.org/articles/2015/05/08/embedded-css-in-svg-image.html

@hadim hadim mentioned this issue Jun 6, 2015
@rajgoel
Copy link
Contributor

rajgoel commented Jul 15, 2015

Hi,

you can check out this plugin for animated svg:
https://github.com/rajgoel/reveal.js/tree/animate/plugin/animate

You can find a small example from pull request #804 here: http://courses.telematique.eu/reveal.js-animate/index.html#/20 . In the example the animation is embedded in the svg-file. When advancing to the next fragment, the svg-animation is triggered. There is not much documentation for the plugin, but the source code in index.html and Soccer_ball_animated.svg should be self-explaining.

@ghost ghost closed this as completed Feb 25, 2016
@cknoll
Copy link

cknoll commented Apr 14, 2019

Great!

Just for reference: the gist has been forked to a repo: https://github.com/csachs/reveal-svg-fragment.
Nevertheless to make this work I had to add <script src="//cdn.jsdelivr.net/d3js/3.5.17/d3.min.js"></script> which is mentioned in the comments below the gist https://github.com/rajgoel/reveal.js/tree/animate/plugin/animate.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants