[orx-jvm] Move panel, gui, dnk3, keyframer, triangulation to orx-jvm

This commit is contained in:
Edwin Jakobs
2021-06-27 21:32:24 +02:00
parent 5814acef8f
commit 874d49779f
159 changed files with 22 additions and 21 deletions

View File

@@ -0,0 +1,35 @@
import org.amshove.kluent.`should be`
import org.amshove.kluent.shouldBeNear
import org.openrndr.extra.keyframer.KeyframerChannel
import org.openrndr.extras.easing.Easing
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
object TestKeyframerChannel : Spek({
describe("a keyframer channel without keys") {
val kfc = KeyframerChannel()
it ("should return null when asking for value before first key time") {
kfc.value(0.0) `should be` null
}
}
describe("a keyframer channel with a single key") {
val kfc = KeyframerChannel()
kfc.add(0.0, 1.0, Easing.Linear.function)
kfc.value(0.0)?.shouldBeNear(1.0, 10E-6)
it ("should return null when asking for value before first key time") {
kfc.value(-1.0) `should be` null
}
}
describe("a keyframer channel with two keys") {
val kfc = KeyframerChannel()
kfc.add(0.0, 1.0, Easing.Linear.function)
kfc.add(1.0, 2.0, Easing.Linear.function)
kfc.value(0.0)?.shouldBeNear(1.0, 10E-6)
it ("should return null when asking for value before first key time") {
kfc.value(-1.0) `should be` null
}
}
})