Jump to content
Search Community

nicolasdesle

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by nicolasdesle

  1. Hi all,

     

    This isn't really Greensock-related but I was wondering how you guys create backup images for banners, you know those 40k backup images that are needed when JS is disabled on the browser for example.

     

    I mostly use Animate CC (in combo with TweenMax of course) and how I do it now is right clicking on the banner (the canvas object) in Chrome once the banner reached its end and then saving it as a PNG, and then also mostly compressing it afterwards in Photoshop as a JPG to get it under 40k.

     

    Are there better practices or tools that can automate this?

    This is really time consuming.

     

    Thanks!

    Nicolas

  2. Hi

     

    I would like to tween the scale of an array of Three JS objects.

    I am able to do this on requestAnimationFrame, but I would like to use Tweenmax:

     

    for ( var i = 0; i < meshes.length; i ++ ) {

     

    meshes.scale.x = meshes.scale.y = meshes.scale.z = boost;

     

    }

     

    Any idea how to?

     

     

    Thanks!

  3. Hi 

     

    I would like to create an effect where on hover on a span class with text in it, a line under the text gradually 'grows' underneath it. Like an underlined text, where the underline increases in width.

     

    Here's the css:

     

    .border {
            background-image: url('img/border.jpg');
            background-size: 0px 1px;
            background-repeat: no-repeat;
     }
     
    Here's the HTML:
     
    <span class='border'>my link</span>
     
    And here's the (simplified) JS:
     
    var textLinks = $('.border');
     
    textLinks.each(function(index) {
     
                var targetItem = textLinks.eq(index);
     
                targetItem.on("mouseenter", function(event) {
                    TweenLite.killTweensOf(targetItem);
                    TweenLite.to(targetItem, 1, {css:'background-size:10px 1px', ease:Sine.easeOut});
                });
     
                targetItem.on("mouseleave", function(event) {
                    TweenLite.killTweensOf(targetItem);
                    TweenLite.to(targetItem, 1, {css:'background-size:0px 1px', ease:Sine.easeOut});
                });
    });
     
    On mouseenter everything works fine, the line animaties.
    On mouseleave however nothing happens (although the mouseleave event is triggered when I log it in my console).
     
     
    Anyone knows what the problem is?
    Thanks.

     

  4. Hi

     

    Here's my JS:

     

    var del = 0;    
    divs  = $('.nav');
           
    for(ind in divs){
                del+=.1;
                div = divs[ind];
                var target = div;
                TweenMax.to(target, 1, {css:"opacity:1", delay:del, ease:Sine.easeOut, overwrite:"none"});
    }
     
    and CSS:
     
    .nav {
        color:#000;
        font-family: 'custom', helvetica, sans-serif;
        font-size: 4.25em;
        opacity:0;    
    }   
     
     
     
    Problem: the tweens overwrite each other, resulting in this 'graded' effect attached (half opacities).
    What am I doing wrong? I want all divs to tween to an opacity of 1.
     
    Thanks!
         

    post-7721-0-56350900-1360330583_thumb.png

×
×
  • Create New...