Jump to content
Search Community

Disappear on beizer ends

anish.m.prasad 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

 

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