Ticker

Uses requestAnimationFrame to continuously emit a tick event and provide the passed time since the last tick. This is used in the Animation utility to execute the logic on each frame.

import { Ticker } from 'oblik/utils/ticker'

let ticker = new Ticker()

ticker.on('tick', delta => {
    // `delta` is the time in milliseconds
    // since the last call
})

ticker.start()
← Scroll Tween →