Jump to content
Search Community

TonyUK

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by TonyUK

  1. Hi,

     

    I wonder if anyone can help with this.

     

    I would like the reclangle to shake with rotation: 20, to rotation:-20, decreasing til it stops at its original rotation...which is 0.

     

    TweenLite.fromTo("#rect", 2, { rotation: 20}, { rotation: -20, ease: RoughEase.ease.config({ strength: 5, points: 20, taper:"out", randomize: false}), clearProps: "rotation"});         
    };

     

    The problem is that because the "To" bit of the tween is a rotation value, so the rectangle shakes back and forth fine, but gradually going to the rotation: -20 (which i dont want).

     

    Any ideas please?

    See the Pen rWLxXv by Tony5587 (@Tony5587) on CodePen

    • Like 1
  2. HI Rodrigo,

     

    Thanks for the prompt reply,

     

    It's going to be rather difficult for me to illustrate the problem using codepen as it is a canvas project i am working on.

    The elements that i am animating are in the canvas library and are referenced in the javascript code like this:

     

    var navigation = new lib.navigation();
    this.addChild(navigation);
    navigation.x = 58;
    navigation.y = 500;

     

    which i can't illustrate using codepen?

     

    Any thoughts?

  3. HI,

     

    I have been using GSAP JS successfully in an HTML5 canvas project to do this sort of thing:

    TweenMax.to(navigation, 0.2, {scaleX:1.1, scaleY:1.1, ease: Power2. easeOut});

     

    I am trying to play around and use some other effects, but having NO success with this:

    TweenMax.to(navigation, 2, {boxShadow:"0px 0px 10px 10px black"});

     

    Now i know that to use "boxShadow" i need to use the CSS Plugin, though as i have:

    <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>

    in my html, that should be sufficient?

     

    Can you please help me to apply the CSS effects to my elements that are loaded thus:

     

    var navigation = new lib.navigation();
    this.addChild(navigation);
    navigation.x = 58;
    navigation.y = 500;

     

    Many thanks,

    Tony

     

     

     

     

×
×
  • Create New...