Jump to content
Search Community

mov.ad

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by mov.ad

  1. Hallo, we are working on a project using GreenSock,

     

    and we are wondering how to animate textShadow or boxShadow with objects.

    /* this is working */
    var element = document.getElementById('animate');
                    
    TweenMax.to(element, 1, {
        textShadow: "10px 10px 10px rgb(0, 0, 0)",
        boxShadow: "0px 0px 5px 2px #F00"
    });
    
    
    /* this is not working */
    TweenMax.to({
        textShadow: "10px 10px 10px rgb(0, 0, 0)",
        boxShadow: "0px 0px 5px 2px #FFF000"
    }, 1, {
        textShadow: "10px 10px 10px rgb(255, 255, 0)",
        boxShadow: "0px 0px 5px 2px #FF0000"
    });
    
    
    /* this is working */
    TweenMax.to({
        textShadowAlpha: 1,
        textShadowH: 1,
        textShadowV: 1,
        textShadowBlur: 1,
        textShadowColor: "rgb(0, 0, 0)",
    }, 1, {
        textShadowAlpha: 1,
        textShadowH: 1,
        textShadowV: 1,
        textShadowBlur: 1,
        colorProps: {
            textShadowColor: "rgb(255, 255, 0)",
        },
        onUpdate: function() {
            var textShadow = this.target.textShadowH + "px " + this.target.textShadowV + "px " + this.target.textShadowBlur + "px " + this.target.textShadowColor;
            element.style.textShadow = textShadow;
        }
    });
    

    With the colorProps animation we managed to let it work with objects. Would it be possible to get help in animating objects/advices on the use of the plugins/Examples which are working?

     

    Thanks a lot for the support,

    Movad

     

     

×
×
  • Create New...