export default class Morpahble {
    constructor(start = 0) {
        this._curVal = start
        this._destVal = start

        this._function = dt => this._curVal = this._destVal
    }

    get value() {
        return this._curVal
    }

    set value(val) {
        this._destVal = val
    }

    update(dt) {
        this.function(dt)
    }

    set function(fn) {
        this._function = fn
    }
}
