loading-wave
A simple wave pendulum-like loading animation for the browser
Last updated 6 years ago by dguttman .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install loading-wave 
SYNC missed versions from official npm registry.

Loading Wave

A simple wave pendulum-like loading animation.

var Wave = require('loading-wave')

var wave = Wave({
  width: 500,
  height: 100,
  n: 10,
  color: 'steelblue'
})

document.body.appendChild(wave.el)

setTimeout(function() {
  wave.stop()
}, 1000)

setTimeout(function() {
  wave.start()
}, 2000)

API

var Wave = require('loading-wave')

Wave(options)

Constructs and returns a LoadingWave object. Available options:

  • width/height: width/height of animation in pixels
  • n: number of items in the animation
  • color: color of items

wave.stop()

Stops the animation. Do this before you hide / remove the animation so that it stops looping.

wave.start()

Starts the animation again. Use this if you want to keep one instance around but need to hide it temporarily.

License

MIT

Current Tags

  • 0.0.2                                ...           latest (6 years ago)

1 Versions

  • 0.0.2                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |