Skip to content

Files

Latest commit

c8f7dd5 · Jan 26, 2025

History

History

orx-delegate-magic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 26, 2025
Jun 2, 2023
Apr 24, 2023

orx-delegate magic

Collection of magical property delegators. For tracking variable change or interpolate towards the value of a variable.

Delegated properties

Kotlin documentation

Property smoothing

val state = object {
    var radius = 10.0
}

val smoothRadius by smoothing(state::radius)

Property dynamics

val state = object {
    var radius = 10.0
}

val dynamicRadius by springForcing(state::radius)

Property tracking

val state = object {
    var radius = 10.0
}

val radiusHistory by tracking(state::radius)

Demos

DemoDifferencing01

source code

DemoDifferencing01Kt

DemoFollowing01

source code

DemoFollowing01Kt

DemoSmoothing01

source code

DemoSmoothing01Kt

DemoSpring01

source code

DemoSpring01Kt