Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.42 KB

README.md

File metadata and controls

60 lines (40 loc) · 1.42 KB

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