Jump to content
Search Community

Mixins gsap

dawid660 test
Moderator Tag

Recommended Posts

It is possible to set a "mixin" to animation like this:

const example = () => {
    return (
        { fill"609E78"duration1.58 },
        { fill"E69D00"duration0.41 },
        { fill"609E78"duration0.09 },
        { fill"609E78"duration0.5 },
        { fill"E69D00"duration0.41 },
        { fill"609E78"duration0.09 },
        { fill"609E78"duration6.91 },
    )
}
function implementationAnimation() {

 

    gsap.to([dot1_CODE], {
        keyframes: [
            { fill: "609E78"opacity: 1duration: 0.01delay: 2 },
            example()
        ],
        repeat: -1,
    });

I want to use "example" in some other place

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...