GithubHelp home page GithubHelp logo

Comments (4)

lvivski avatar lvivski commented on August 30, 2024

See http://jsfiddle.net/lvivski/N2v6H/5/

from animatic.

albell avatar albell commented on August 30, 2024

Nice! Chaining fixes are excellent but ... this still doesn't completely solve this use case. I want to move the ball to the right based on an event, without the wiggle ever stopping. Very hard to do!

This obviously doesn't work:
http://jsfiddle.net/N2v6H/6/

Of course I can hardcode it, breaking down each increment of the wiggle into four sequential steps and adding up the translate values in advance:

http://jsfiddle.net/N2v6H/9/

This works, but it is really tedious, inflexible and error-prone, even for a very simply animation like this one. For example, what if I don't know whether the wiggle animation is running at the time that the click event happens? There would need to be some math here getting the exact properties at the time of the animate call, and re-expressing the animation as a new sequence of animations. This is always the place where smaller js anim libraries seem to break down.

from animatic.

lvivski avatar lvivski commented on August 30, 2024

Oh, I see. You want to continue wiggling while moving

from animatic.

lvivski avatar lvivski commented on August 30, 2024

Things will become to complex, if I add infinite sequential animations as an element for parallel animations. So for you particular case either use some container, translate it on click and animate ball infinitely inside it; or use loops co create animations as in http://jsfiddle.net/N2v6H/9/

from animatic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.