GithubHelp home page GithubHelp logo

pixi-actions's People

Contributors

calamari avatar srpatel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pixi-actions's Issues

Should default timing mode be linear?

We were trying to track down an obscure visual issue with two actions running at once, and I did not realise the libraries default timing mode is the custom pow2out timing. It's written pretty clearly in the README, but my brain just assumed the default timing mode would be linear.

Do wethink a better default might be linear? I know that's what SKActions and most other tweening libraries use.

Also side-note: It might be worth just bundling the "standard" timing functions from here: https://raw.githubusercontent.com/ai/easings.net/master/src/easings/easingsFunctions.ts

Thank you

A very useful library.
Is there a way to listen to a complete event?

[QUESTION] Is there a way to set a origin to scaleTo?

I wanted to put this in discussion but currently, this repo does not have a discussion.

What I want to achieve is to scale to size by declaring an origin.

If I am not wrong, the origin now is at the centre OR (0, 0) of the Sprite.

Actions.scaleTo( target, x, y, time, interpolation );

Rounding errors prevent actions from running further

JavaScript is notorious problematic when it comes to rounding errors.

If I run this little script, it will stop/hang just after the first step:

  function easeInSine(x) {
    return 1 - Math.cos((x * Math.PI) / 2);
  }

  Actions.repeat(
    Actions.sequence(
      Actions.rotateTo(sprite, PIXI.DEG_TO_RAD * 30, 0.4, easeInSine),
      Actions.rotateTo(sprite, PIXI.DEG_TO_RAD * -30, 0.4, Interpolations.pow2out),
    )
  ).play();

I guess that is, because easeInSine(1) will just be 0.99999999999 and within RotateTo.tick method the return value is checking factor >= 1. I would suggest changing it to checking if the time did run out.

What do you think?

Love the lib, btw ;-)

Add `paused`?

Great work, love the library. Would be great to have a built-in way to pause .tick() for specific entities ๐Ÿ‘ to mirror SKNode.paused

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.