GithubHelp home page GithubHelp logo

different durations problem about tweeny HOT 3 CLOSED

mobius3 avatar mobius3 commented on May 21, 2024
different durations problem

from tweeny.

Comments (3)

mobius3 avatar mobius3 commented on May 21, 2024

I can reproduce your issue. I'm working on it. Thanks.

from tweeny.

androdlang avatar androdlang commented on May 21, 2024

Oh thank you very much!!!!

from tweeny.

mobius3 avatar mobius3 commented on May 21, 2024

This is fixed now. Some comments for the code you posted:

Values 1, 2, 3 for durations are too small, it is fine to have big values there, in fact is intended to match the unit of time that you are using, since you are using millis, I'd think of using milliseconds there as well, and think of it as 'I want to move from 0 to 5 in X milliseconds'.

I'd also use .step(millis()) instead of seeking like that because it is more straightforward (I understand you might have done this in this example just to demonstrate the error)

As a last point, using straight integers like that for tween target values might be a problem because it is hard to interpolate them properly. Linear interpolation works as intended because it is intentionally prepared to handle integer values (by rounding floats) but other easings don't. I suggest you use floats and cast them if you need integers.

Let me know if it is still broken. Thanks for your issue!

from tweeny.

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.