Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
anish.m.prasad

Disappear on beizer ends

Recommended Posts

Hi

 

i have multiple div like #animate123 when the cubic beizer ends the the div will disappear (smoothly reduce the width and height or scale till the bezier track ends)

 

var tween = TweenMax.to("#animate123", 5, {
bezier:{
type:"cubic",
values:
[{"x":178.853394,"y":292.738353},{"x":178.853394,"y":292.738353},{"x":461.554575,"y":189.214815},{"x":640,"y":255.010604}],
autoRotate:["x","y","rotation", 0, true]
}, ease:Power1.easeInOut},{className: "+=fish"});

 

please help me 

Link to post
Share on other sites

Please provide a very basic CodePen demo as explained here: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

It is difficult to guess from just looking at the code snippet you provided what the problem is. For instance we have no idea what the className fish is or how it will impact the bezier animation. One thing that jumps out though is that it appears you are wrapping className:"+=fish" in its own object {}. You probably need something more like:

 

var tween = TweenMax.to("#animate123", 5, {
bezier:{
type:"cubic",
values:
[{"x":178.853394,"y":292.738353},{"x":178.853394,"y":292.738353},{"x":461.554575,"y":189.214815},{"x":640,"y":255.010604}],
autoRotate:["x","y","rotation", 0, true]
}, ease:Power1.easeInOut, className: "+=fish"});

  • Like 2
Link to post
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.

×