srpatel / pixi-actions Goto Github PK
View Code? Open in Web Editor NEWA tweening and interpolation library for PixiJS.
License: MIT License
A tweening and interpolation library for PixiJS.
License: MIT License
I think that would be a great feature and probably not too difficult to accommodate.
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
A very useful library.
Is there a way to listen to a complete event?
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 );
Is there something I'm overlooking? I tried a number of approaches but it seems like the actions never start.
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 ;-)
Great work, love the library. Would be great to have a built-in way to pause .tick()
for specific entities ๐ to mirror SKNode.paused
Very cool library, thank you for sharing! I'd love to use it, but I don't want to lock myself in to Pixi v7. Is that a valid concern?
Thank you for your great work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.