Skip to content

Latest commit

 

History

History

orx-delegate-magic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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