[orx-shapes] Demo comments
This commit is contained in:
@@ -11,7 +11,10 @@ import kotlin.math.PI
|
||||
import kotlin.math.cos
|
||||
|
||||
/**
|
||||
* Demonstration of uniform contour blending
|
||||
* Animated demonstration of uniform contour blending. Once a `ContourBlend` between two
|
||||
* contours is created, it can be queried using the `.mix()` method to get a contour interpolated
|
||||
* between the first one (when the blend argument is 0.0) and the second one (when the argument
|
||||
* is 1.0)
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
|
||||
@@ -13,6 +13,15 @@ import kotlin.math.cos
|
||||
|
||||
/**
|
||||
* Demonstration of non-uniform contour blending
|
||||
*
|
||||
* The `mix` method of a `ContourBlend` does not only accept a Double, but also a function.
|
||||
* This function should take one Double argument, which specifies the normalized `t` value between
|
||||
* the start and the end of the contour, and should return a normalized value indicating the
|
||||
* morphing state between the first contour and the second contour, for that specific t value.
|
||||
*
|
||||
* This allows us, for instance, to morph one part of the shape first, then have other parts follow.
|
||||
*
|
||||
* This demo shows a grid of 9 contours which are part circle and part 5-point start.
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
|
||||
Reference in New Issue
Block a user