All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.teamwizardry.librarianlib.math.SimpleAnimation.kt Maven / Gradle / Ivy

There is a newer version: 5.0.0-alpha.10
Show newest version
package com.teamwizardry.librarianlib.math

import com.teamwizardry.librarianlib.core.util.lerp.Lerper

public class SimpleAnimation(
    private val lerper: Lerper,
    public val from: T,
    public val to: T,
    duration: Float,
    public val easing: Easing
): BasicAnimation(duration) {
    override fun getValueAt(time: Float, loopCount: Int): T {
        return lerper.lerp(from, to, easing.ease(time))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy