Alexander Deplov

Non-linear animation

Non-linear animation

Code

var circle = new Path.Circle({
    radius: 20, 
    fillColor: 'red',
    position: view.center + [100, 0]
})

var t = -1
function onFrame(event){ 
    if (event.count % 120 == 0){
        t *= -1
    }
    circle.rotate(2 + t, view.center)
    
}