Giter VIP home page Giter VIP logo

Comments (2)

ef4 avatar ef4 commented on July 23, 2024

In a lot of scenarios you don't need this. But yes, there are probably some cases where you do.

We don't do any kind of cleanup or removal of sprites until the whole transition finishes. So if you're just trying to keep some removed sprites visible while animating something else, you don't need to do anything. But interruptions also cause the transition to finish. At that point, any removed sprites that weren't still animating get garbage collected. A wait motion would be useful for that situation.

I think I should probably just change the garbage collection rule to be less aggressive. Instead of "drop any removed sprites that weren't still actively animating" it can be "drop any removed sprites that are not visible".

The only downside of that change would be that if people have unboundedly long chains of transitions interrupting each other (like the "auto" button of the /#/each route in the dummy app), they will need to explicitly do something like sprite.hide() if they want to avoid a big pileup of old sprites. That seems OK, since that's a rarer situation.

from ember-animated.

nickschot avatar nickschot commented on July 23, 2024

But interruptions also cause the transition to finish. At that point, any removed sprites that weren't still animating get garbage collected.

I think I am/was seeing exactly this. If no generator is returned by the rule it will not be removed at all, if a generator is returned which doesn't do a motion with said sprite it is immediately removed (with other animations happening at the same time).

from ember-animated.

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.