Coder Social home page Coder Social logo

framework-transition's Introduction

framework-transition's People

Contributors

afrangeti avatar alexf-corona avatar depilz avatar michaelcorona avatar shchvova avatar walterlua avatar xedur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framework-transition's Issues

_transitionHasCompleted

A weird issue here.

tween._transitionHasCompleted is set to false (unnecessarily, I think; the default nil would already do the same job), but never to true, in particular in the if part just above. I think the cases where this flag is tested might actually be okay, since the tween has already been added to the completed listeners and then quickly evicted, but I'm not certain.


Since I figured at this point the library details will be, at best, slow to change, I wrote some predicates making use of internal members: IsCancelled(), IsCompleted(), etc. That's where I ran afoul of this. ๐Ÿ˜ƒ In an earlier iteration of these APIs I was using the onComplete handler and friends, piggybacking any user-provided listeners atop them if needed; however, doing so artificially limited the logic to transitions launched by my own wrappers, and this even affected other utilities in the same module.

Lacking a proper _transitionHasCompleted, my current fallback is "not paused, and the time has elapsed?", basically mirroring the logic in the library. This will be very slightly off the event.time used internally, so occasionally will be a frame off, but it's probably not so bad.

Anyhow, I'd submit a PR if this were urgent, but I mostly wanted to mention it. Maybe adding some predicates like I described, officially, would be a decent idea? (I have similar stuff for timers, though without problems there.)

Please add onEnterFrame callback to transition

It would be very helpful if transition.to function had onEnterFrame additional callback in params:

transition.to(obj, {
   time: 1000,
   onEnterFrame = function(event)
      -- call each frame
   end
})

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.