Search Unity

What is needed in LeanTween

Discussion in 'Assets and Asset Store' started by dentedpixel, Jan 25, 2013.

?

What is needed in LeanTween?

Poll closed Jan 25, 2014.
  1. Animate over a bezier curve

    3 vote(s)
    9.4%
  2. Color Tweening

    4 vote(s)
    12.5%
  3. Looping (ping-pong, once, clamp forever)

    17 vote(s)
    53.1%
  4. GUI Animation Helpers

    8 vote(s)
    25.0%
  1. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    I am taking recommendations on what should be implemented next in my animation engine LeanTween (A super efficient tweening engine for Unity3d).
     
    Last edited: Jun 25, 2013
  2. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Actually, after looking at the package now, I would like to vote for GUI Animation helper too! :)
    I think having a LeanTween Visual Editor and Inspector (much like HOTween Inspector where you can look at debug information) is a must, or it will just be too tedious.

    I also think "animate over a bezier curve" would be an essential feature, but not as essential as the GUI helper because without it - it would be like driving a car with no steering wheel and you must manually turn each wheel by hand! :D

    To be honest, I think all of the above should be included...but I would rate them in this order of priority :

    1. LeanTween Visual Editor and Inspector (GUI Animation helpers)
    2. Color Tweening (I think this one should be easy to implement and probably most essential in Tween engine)
    3. Looping (ping-pong, once, clamp forever) - also essential!
    4. Animate over a bezier curve (Would be very nice!)
    5. Some audio tweening function would be nice too (like iTween's Audio from and Audio to)
     
  3. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    GUI Animation Helpers are now available LeanTween.

    Easily animate GUI Buttons Labels Textures or any element that uses the Rect structure!

    Hopefully I can get to some of the other features on the wish-list soon. Personally GUI animation helpers are the most important to me at the moment, it has helped me cut down on spaghetti code and write very clean one or two lines of code to do complex GUI animations.

    Please visit DentedPixel.com for examples of how to use these GUI animation Helpers:

     
  4. Baskyn

    Baskyn

    Joined:
    Feb 17, 2013
    Posts:
    67
    I'm going with GUI animation helpers. It sounds good at least haha. What exactly would it be for? I've never used HOTween, so I have no clue as to what it's for.

    I'm also here to suggest the punch function, since you pointed me to this thread! :)

    As for uses of punch, a good example is this canon in iTween:

    http://www.youtube.com/watch?v=vk0nXdL035k
     
    Last edited: Feb 28, 2013
  5. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    261
    Would absolutely love Playmaker actions for LeanTween.
    If these don't already exist or aren't in progress of being delevoped, I might look at creating a few myself.
     
  6. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    LeanTween just got Punchy! Version 0.96 now includes a punch easy type. An example would be:

    PHP:
    LeanTween.rotateX(gameObject270.0f1.5f, {"ease":LeanTweenType.punch});
    $FunnyPunch.png
     
  7. lopez1de

    lopez1de

    Joined:
    May 22, 2013
    Posts:
    14
    Loooooooooooooooooping and ping pong please :p
     
    Last edited: Jun 16, 2013
  8. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    PlayMaker-Support :p

    But yes, a GUI-Helper would be great, also the Looping!
     
  9. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Does this still not have looping? I really want to use this as my tweening engine, but without looping, I can't :(
     
  10. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Camera Shake
     
  11. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    I have seen looping come up a number of times, I am just curious what type of looping would be most helpful to everyone? Clamping style looping would be the easiest to implement, this is where when it finishes the tween it starts where it began. Would that be sufficient? Or is everyone looking for a ping-pong style looping as well (slightly harder to implement)?
     
  12. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    I think both are super common.
     
  13. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    LeanTween V1.18 update is missing the /plugin folder
     
  14. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Thanks BlackAnt, I am aware of the situation and I submitted a fixed version last Friday, but the Asset Store has yet to approve this fix (it usually takes up to 5 days so maybe on Wednesday). Until then you can get the latest on github:

    https://github.com/dentedpixel/LeanTween

    Sorry about the mistake!
     
  15. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    works with windows 8?
     
  16. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Unfortunately I have not tested it Rahuxx. I only have access to Mac computers currently, but next time I am around some PCs I will test.

    Can anyone else confirm whether or not it works with Win 8???
     
  17. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    HI Dente, with windows 8 I mean windows 8 RT and Pro tablets.
    rahu
     
  18. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Right, understood, unfortunately you need a Windows computer to see if it will publish to a Windows tablet (I guess you would need a Windows tablet too, so I guess I am doubly out of luck). The fact that LeanTween works with the difficult (and abandoned) Flash publishing makes me think it would work, but I cannot confirm that...
     
  19. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Yes, a good camera shake that behaves like itween ShakeRotation version, that will stop itself.
     
  20. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi Imtrobin,

    Have you seen the ExampleCameraShake scene (in the included examples)? I know you have to pass an animation curve which is slightly annoying, but if that is the behavior you are looking for, I may try and make a baked in version where you don't have to pass an animation curve...
     
  21. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Yes, I seen and tried it. You are doing two tweens. I'm not very sure how to make it stop, and also yes, if you can get rid of the curve, thanks.
     
  22. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Cool. Yeah it's pretty easy to get it to stop. you can either just set the repeat to something small like:

    LeanTween.rotateAround( gameObject, Vector3.up, 1f, 0.2f).setEase( shakeCurve ).setLoopClamp().setRepeat(5);

    Or you can cancel it at an arbitrary time like:

    int cancelId = LeanTween.rotateAround( gameObject, Vector3.up, 1f, 0.2f).setEase( shakeCurve ).setLoopClamp().setRepeat(-1).id;

    // Later to cancel
    LeanTween.cancel(gameObject, cancelId);

    The two tweens are important, because it is rotating the camera both up and down, and left and right. Often times you would only want to rotate the camera up and down (say for heavy footsteps). So it may seem like I am just making extra work for the programmer, keeping those tweens seperate, but actually it gives you a lot of power to get really detailed on how you want your camera shake to look.

    I hope that makes sense. Baking the animation curve into the engine is definitely something I can do...
     
  23. serpin

    serpin

    Joined:
    Nov 13, 2011
    Posts:
    54
    Please, don't. This is a specific task that can be accomplished in a thousand different ways and none of those have to clutter LeanTween.
    It's lean, after all, right? =)
     
  24. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Hi !

    Here is an example of color tween :)



    Code (CSharp):
    1.  
    2.              Color myStartColor = Color.white;
    3.              Color myTargetColor = Color.red;
    4.              LeanTween.value
    5.             (
    6.                 myGameObject,
    7.                 val => myGameObject.renderer.material.color = Color.Lerp(myStartColor, myTargetColor, val),
    8.                 0f, 1f, 1f
    9.             );
     
  25. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Thanks! Actually color tweening has already been added :), it's on the github version (what I consider my pre-release candidate for the Asset Store).

    But, I like your solution too, that could translate well into many different tweenable objects besides color.