Plugin for countUp.js with odometer or barrel style numbers
npm install odometer_countup
interface OdometerOptions {
duration?: number // barrel animation in seconds,
lastDigitDelay?: number // delay last digit in animation, in seconds, 0 to deactivate
}
export class Odometer implements CountUpPlugin;
`
Example
`
import { CountUp } from 'countup.js';
import { Odometer } from 'odometer_countup';
const counter = new CountUp("counter", 99999, {
plugin: new Odometer({ duration: 2.3, lastDigitDelay: 0 }),
duration: 3.0
});
counter.start();
``