Jump to content
Search Community

Background sprite speed vs duration

Vagabond9 test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hello,

I'm using steppedease to display sprite sheets. 

The problem I'm having is the sprite frames run once for the duration parameter.
So if I have a duration of say 20 the spites (background steppedease) runs super slow.
What I'd like to be able to do is control the speed of the sprite frames separate from the duration parameter, and have it continually loop for the length of the tween duration. 

See the Pen BaGNObO by Vagabond9 (@Vagabond9) on CodePen

Link to comment
Share on other sites

Heya, just in case anyone else is running into this problem...

 

I'm using this in a timeline
            this.master = gsap.timeline({
                onComplete: () => {
                    $(id).remove();
                },
            });
Which effectively removed the div before the delayedCall happens.

So after fiddling came up with this alternate to the delayedCall
var anispeed = 1;
var repeats = 5;
tween(id, {...}, { repeat: repeats, .... });
master.add(tween);

 

GSAP is fun to work with!

  • Like 1
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...