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

commonMain.ru.casperix.spine.animation.RotateTimeline.kt Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package ru.casperix.spine.animation

class RotateTimeline(
    override val boneIndex: Int,
    override val frames: List,
) : AbstractTimeline(frames), CurveTimeline1, BoneTimeline {
    private val rotationController = BoneTransformChannel(frames, false, 0, { it.angle }, { it.rotation })

    override fun apply(context: AnimationContext) = context.getBoneContext(boneIndex)?.run {
        bone.local = bone.local.copy(rotation = rotationController.getCurrentValue(this))
    } ?: Unit
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy