0.6.6 • Published 5 years ago

@pelayomendez/electron-snapsvg-animator v0.6.6

Weekly downloads
1
License
ISC / MIT
Repository
github
Last release
5 years ago

electron-snapsvg-animator

This is a Plugin for ease the use of Animate CC exported animated SVG inside electron applications. It makes use of the Snap.svg javascript library and Snap.svg Animator to render content.

Usage:

Include the addon in your renderer process.

const svgAnimationManager  = require('electron-snapsvg-animator')

Load an exported SVG animation .json file. Expecify FPS, width, height, absolute path

svgAnimationManager.loadAnimation(60, 150, 150, path.resolve(__dirname, 'example_animation.json'))

Attach the animation to a DOM object by passing it's id tag.

svgAnimationManager.addAnimation("div-mainContainer")

You can add aditional CSS styles.

svgAnimationManager.setStyle("opacity", "0.5")

Remove the animation when you dont need it.

svgAnimationManager.removeAnimation()

TODO:

  • Handle multiple animation files.
0.6.6

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago