mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-04-14 14:43:33 +02:00
Javadoc und kleine Refactorings
This commit is contained in:
@@ -121,7 +121,8 @@ public abstract class Animation<T> implements Updatable {
|
|||||||
* e = Constants.limit(e, 0, 1);
|
* e = Constants.limit(e, 0, 1);
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @param e
|
* @param e Fortschritt der Animation nachdem die Easingfunktion angewandt
|
||||||
|
* wurde.
|
||||||
*/
|
*/
|
||||||
public abstract void interpolate( double e );
|
public abstract void interpolate( double e );
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.util.concurrent.ExecutionException;
|
|||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
|
@SuppressWarnings( "unchecked" )
|
||||||
public class Animations {
|
public class Animations {
|
||||||
|
|
||||||
public static final <T> Future<T> animateProperty( String propName, T target, double to, int runtime, DoubleUnaryOperator easing ) {
|
public static final <T> Future<T> animateProperty( String propName, T target, double to, int runtime, DoubleUnaryOperator easing ) {
|
||||||
@@ -148,7 +149,9 @@ public class Animations {
|
|||||||
public static final <T> Future<T> animate( T target, int runtime, DoubleUnaryOperator easing, DoubleConsumer stepper ) {
|
public static final <T> Future<T> animate( T target, int runtime, DoubleUnaryOperator easing, DoubleConsumer stepper ) {
|
||||||
return TaskRunner.run(new FramerateLimitedTask() {
|
return TaskRunner.run(new FramerateLimitedTask() {
|
||||||
double t = 0.0;
|
double t = 0.0;
|
||||||
|
|
||||||
final long starttime = System.currentTimeMillis();
|
final long starttime = System.currentTimeMillis();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update( double delta ) {
|
public void update( double delta ) {
|
||||||
// One animation step for t in [0,1]
|
// One animation step for t in [0,1]
|
||||||
|
|||||||
Reference in New Issue
Block a user