GithubHelp home page GithubHelp logo

Comments (5)

daniel-lundin avatar daniel-lundin commented on June 9, 2024

If you chain animations it will do so automatically. Or if you start a new animation while another is running. In all other cases you have to store it yourself if you want to continue from where it ended.

Reading from CSS is difficult since the transform is stored as a 4x4 matrix.
Sorry if the documentation is unclear about this.

from snabbt.js.

warpdesign avatar warpdesign commented on June 9, 2024

Thanks for your answer!

Documentation is a bit un clear, I thought from_position: [0, 0, 0] or previous end state meant you could specify something like 'end' so that snabbt automatically starts from previous end state.

The problem is if you don't chain your calls but want to move from previous state later on, there doesn't seem to be a way to do that other than poking into the matrix yourself.

from snabbt.js.

daniel-lundin avatar daniel-lundin commented on June 9, 2024

I've been thinking about this, it would be really nice if the library could keep the end state of previous finished animations. That would make for a much more pleasant user(as in library user) experience.

The problem is in scenarios when DOM elements are added/removed dynamically. I need to figure out a way to listen for DOM detach events so that when elements are removed, their saved end state is removed as well. Otherwise the list of finished end states will just keep growing.

Maybe I can iterate through all finished animation when new ones are started.

I'll test out some different solutions and see if it can be accomplished.

from snabbt.js.

warpdesign avatar warpdesign commented on June 9, 2024

Good thing you're working on it!

from snabbt.js.

daniel-lundin avatar daniel-lundin commented on June 9, 2024

If you try the latest build from master it should work the way you want.
from_position will have precendence over previous end state, I think it makes most sense.
It will be out with the next release which should be really soon. I just want to get the memory optimization out at the same time.

If you find more issues with the from_-properties, please post here and I'll reopen it again.

from snabbt.js.

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.