mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 18:34:56 -04:00
skeletal: require at least 2 keyframes
This commit is contained in:
parent
b5ead41748
commit
0b67b70cad
@ -29,6 +29,10 @@ data class RotateKeyframe(
|
|||||||
) : SkeletalKeyframe {
|
) : SkeletalKeyframe {
|
||||||
override val type get() = TYPE
|
override val type get() = TYPE
|
||||||
|
|
||||||
|
init {
|
||||||
|
if (data.size < 2) throw IllegalArgumentException("Must have at least 2 keyframes!")
|
||||||
|
}
|
||||||
|
|
||||||
override fun instance() = object : Vec3KeyframeInstance(data, loop, interpolation) {
|
override fun instance() = object : Vec3KeyframeInstance(data, loop, interpolation) {
|
||||||
override fun apply(value: Vec3, transform: TransformInstance) {
|
override fun apply(value: Vec3, transform: TransformInstance) {
|
||||||
transform.value
|
transform.value
|
||||||
|
@ -28,6 +28,10 @@ data class ScaleKeyframe(
|
|||||||
) : SkeletalKeyframe {
|
) : SkeletalKeyframe {
|
||||||
override val type get() = TYPE
|
override val type get() = TYPE
|
||||||
|
|
||||||
|
init {
|
||||||
|
if (data.size < 2) throw IllegalArgumentException("Must have at least 2 keyframes!")
|
||||||
|
}
|
||||||
|
|
||||||
override fun instance() = object : Vec3KeyframeInstance(data, loop, interpolation) {
|
override fun instance() = object : Vec3KeyframeInstance(data, loop, interpolation) {
|
||||||
override fun apply(value: Vec3, transform: TransformInstance) {
|
override fun apply(value: Vec3, transform: TransformInstance) {
|
||||||
transform.value
|
transform.value
|
||||||
|
@ -28,6 +28,10 @@ data class TranslateKeyframe(
|
|||||||
) : SkeletalKeyframe {
|
) : SkeletalKeyframe {
|
||||||
override val type get() = TYPE
|
override val type get() = TYPE
|
||||||
|
|
||||||
|
init {
|
||||||
|
if (data.size < 2) throw IllegalArgumentException("Must have at least 2 keyframes!")
|
||||||
|
}
|
||||||
|
|
||||||
override fun instance() = object : Vec3KeyframeInstance(data, loop, interpolation) {
|
override fun instance() = object : Vec3KeyframeInstance(data, loop, interpolation) {
|
||||||
override fun apply(value: Vec3, transform: TransformInstance) {
|
override fun apply(value: Vec3, transform: TransformInstance) {
|
||||||
transform.value
|
transform.value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user