Jump to content
GreenSock

RobbyT15

Tweening a line using KinteicJS Plugin

Recommended Posts

I'm getting an error that I'm not understanding.  I'm trying to animate a kinetic line, however, the line is not animating and I'm getting the following error:

 

TypeError: s.charAt is not a function                                       TweenMax.min.js: 16

 

Why am I getting this error?  I've attached my javascript file.

script.txt

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

Currently our KineticPlugin, for the most part, only tweens simple values like single numbers or colors. What you want to do is tween an Array of points which is a little different.

 

Some good and bad news

 

Its totally possible that we could add this functionality to KineticPlugin, just not sure when that will happen.

 

We have a plugin that handles tweening arrays of values.

 

That plugin is not yet officially released. It will be very soon.

 

For now, I created a little demo that lets you see how you can use the EndArrayPlugin to tween the points and then apply those new points to the line via an onUpdate callback:

 

http://codepen.io/GreenSock/pen/81cdf372eab8d7653a976f054979e111

 

Feel free to fork that demo and play around with it.

 

You can grab the sneak-release of the plugin from here:

http://forums.greensock.com/topic/9019-javascript-endarray/?hl=endarray

 

If we have any news on updating KineticPlugin with the ability to tween points of a line we will post back here.

  • Like 3
Link to comment
Share on other sites

Good news: I updated KineticPlugin to make it possible to animate array values like "points". Please take a peek at the attached preview of the upcoming release and let me know if it works well for you. 

GSAP_1.11.5_preview1.zip

  • Like 2
Link to comment
Share on other sites

Thank you both.  I like that plugin Carl, I didn't play around with it much over the weekend but I did look at it and I plan on toying with it more when I get the chance.  Thank you Jack for updating the plugin so fast, it works very well for what I'm trying to do.  You guys are awesome.

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