Skip to content

A slot-machine-styled rolling number creator for web pages.

Notifications You must be signed in to change notification settings

iamGeoWat/slot-rolling-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage:

  1. put HTML element in your page:
  2. import rollingNumberCreator from 'package'
  3. init instance: let rollingNumberInstance = rollingNumberCreator();
  4. create rolling number: rollingNumberInstance.default({ el: document.getElementById('digit'), from: '?', to: '1', animationDelay: 0 })
  5. please note: I changed some variables in the original file, see comments in index.js, if animationDelay is not 0, there will be blinks at the start and the end of the animation. If there is any other character you want you roll, find u = "?0123456789" and include them.

Example: img

About

A slot-machine-styled rolling number creator for web pages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published