Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackEaseInOut doesn't work #65

Open
flashultra opened this issue Nov 8, 2015 · 1 comment
Open

BackEaseInOut doesn't work #65

flashultra opened this issue Nov 8, 2015 · 1 comment

Comments

@flashultra
Copy link

BackEaseInOut not works at expected. I trying with: Actuate.tween (spriteSpin, 1, { y: 100 }).ease (Back.easeInOut); , but sprite disapear from the screen. It should work as is shown here http://greensock.com/tweenlite-as

@nealR
Copy link

nealR commented Jun 1, 2017

public function calculate (k:Float):Float {
		
	if ((k /= 0.5) < 1) return 0.5 * (k * k * (((s *= (1.525)) + 1) * k - s));
	return 0.5 * ((k -= 2) * k * (((s *= (1.525)) + 1) * k + s) + 2);
		
}

Each call to calculate is further modifying the stored variable s

What it should be is...

public function new (s:Float) {

	this.s = s * 1.525;

}


public function calculate (k:Float):Float {

	if ((k /= 0.5) < 1) return 0.5 * (k * k * ((s + 1) * k - s));
	return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants