Jump to content
Search Community

Animating at Same Time - Missing Point of TimeLineMax

ainsley_clark test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi all,

 

Sorry if this has been covered but the links I'm using I cant relate to my code.

 

I have a TimeLineMax set up and wish to animate different items along the timeline, for example below, .blue_stroke, .orange_stroke and .shadow I want to animate at the same time, at the moment Im using an animation delay at the end of the tween, which is sort of defeating the purpose of timelinemax for me.

 

Thanks in advance for your help.

 

	$(document).ready(function(){
		var timeLine = new TimelineMax();
		timeLine.add("start", 2);
		timeLine
			.to('#logo', 2, {strokeDashoffset: 0, ease:Power2.easeIn})
			.to('.blue_stroke', 1, {fillOpacity: 1})
			.to('.orange_stroke', 1, {fillOpacity: 1}, '-=1')
			.to('.shadow', 1, {opacity: 0.57}, '-=1')
			.to('#logo', .5, {opacity: 0.5, ease:Power2.easeIn}, '-=.8')
			//.to('#logo', 0.2, {strokeDashoffset: length});	
	});

 

Link to comment
Share on other sites

Hi Mike,

 

Thanks for your reply.

 

Apologies if it isn't clear

The question is regarding timing. 

I would like 3 tweens (.blue_stroke, .orange_stroke and .shadow) all to start at the same time without adding a negative delay to them.

Currently I minus 1 second to the tweens so they play at the same time, but I'm wondering if there is a more dynamic way to-do so.

 

Thanks again.

 

Ainsley.

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...