Using GSAP Plugins

You can use any GSAP plugin for your animations, don't forget to register them before you use it in Spirit Studio.

See GSAP Plugin Register.

Example:

import gsap from 'gsap';
import DrawSVGPlugin from 'gsap/DrawSVGPlugin';
import MorphSVGPlugin from 'gsap/MorphSVGPlugin';
import spirit from 'spiritjs';

// tell GSAP what plugins we use
gsap.registerPlugin(MorphSVGPlugin, DrawSVGPlugin);

// use gsap instance
spirit.setup(gsap).then(() => {
  spirit.loadAnimation({ animationData, loop: true });
});

results matching ""

    No results matching ""