Typhon0 / AnimateFX

A library of +70 ready-to-use animations for JavaFX
Apache License 2.0
462 stars 67 forks source link

Modifier-API #29

Closed 41zu closed 5 months ago

41zu commented 1 year ago

Right now some animations are inflexible and sometimes useless because of that. The best example are the Slide* animations.

With this merge request only the Expand, Contract and Slide* animations support modifying the animation. If needed, this API can be extended to other animations to.

Here are some examples:

new SlideOutDown(node) .setResetOnFinished(true) .applyAnimationModifier(new SlideModifier(45)) .play();

var mod = new ScaleModifier(); mod.setEndScale(1.5); new Expand(node).applyAnimationModifier(mod).play();

new Expand(node).applyAnimationModifier(new ScaleModifier(null, 1.5)).play(); ----- This merge request also has a few adjustments for Gradle 8 and 9 compatiblity. ----- The Expand and Contract animations have breaking changes, they don't have the setBeginScale and setEndScale methods anymore.
41zu commented 5 months ago

@Typhon0 I updated the pull request. The produced jar now contains a module-info.java, which declares a Java-Module named "animatefx". Since Java-Modules only exist since Java 9, I set the source and target compatibility to the next LTS version of that, which is Java 11.

I would appreciate it if you could take a look at this pull request and give me feedback if necessary.

Typhon0 commented 5 months ago

Hi 41zu,

Everything looks good. Thanks for your contribution.😄

41zu commented 5 months ago

@Typhon0 Thank you for merging ​👍​