Jump to content
Search Community

Rio

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Rio

  1. I have a game app where target elements of `elm1` and `elm2` are constantly moving according to the value of `x1` and `x2` that are receivable via WebSocket. The issue with the code below is that the target elements blink and seemingly default to 0px. How can I fix this? Sorry for not providing CodePen URL because it's hard to implement WebSocket.

     

    let xSetter1 = gsap.utils.pipe(
    
    gsap.utils.clamp(0, 800), gsap.utils.snap(5),
    
    gsap.quickSetter(elm1, "x", "px")
    
    );
    
    xSetter1(x1) ;
    
    
    
    let xSetter2 = gsap.utils.pipe(
    
     gsap.utils.clamp(0, 800),
    
    gsap.utils.snap(5),
    
    gsap.quickSetter(elm2, "x", "px")
    
    );
    
    xSetter1(x2) ;

     

  2. Following method adds up the value every time the code runs.  When the compass is set to 30degrees first time, that's ok. But when the second time the code runs the rotation value is 45 degrees, the compass point to 75 degrees.

     

    gsap.to(".compass", {rotation: 30, duration: 1});

     

    How can I make it point to 45 degrees?  

     

  3. Thanks, @GreenSock and @PointC !

     

    As you said, MorphSVG has the potential to open up a new method of character animation. Playing with Rive, I was reminded of MorphSVG as the shapes (SVG) deformed one after another. However, one problem that Rive has and GSAP doesn't is resizing the result to fit the viewport.


    Using sprite is like classical cell animation. ex; PIXI.JS.https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-and-animations-with-pixijs5 This might be worth to try. Plus, GSAP has its plugin.

     

    Whichever method is more suitable to me, I have to think about how to integrate it with my application. I plan to integrate user-uploaded photos and character animations to generate a kind of greeting card.

     

    So, it seems the versatility of GSAP wins out imo.

    Any thoughts in this regard? 

     

    • Like 1
  4. I wonder how I can start learning character animation with GSAP.

    I'm guessing combining motionPath and MorphSVG could lead us to interesting works.

     

    While I was searching web, I found Rive.app that specializes in this area.

    Animations that drawn in the following link looks ideal to me.

    https://rive.app/#runtimes

    Did anybody create something like that with GSAP?

     

    However, I really want to stick with GSAP as there are still many things I need for my web app.

     

     

  5. Hi gsap community,

     

    This is my first post!  I'm sorry if this is already asked previously.

    I am trying to synchronize sound effect and the animation via howler.js .

     

    The issue is that the sound does not start on the first attempt of play(). This is happening only on mobile(ios).

    There is no problem when I tap on restart(second attempt). Desktop works like a charm.

     

    Why this on mobile?

    See the Pen 8ba9316d6abf27c301f65e9de0ffc5c5 by riotron (@riotron) on CodePen

×
×
  • Create New...