waiting-around
Wait around in a big queue, like this:
example
This module is a browser widget. Just whip up a main.js like this:
var files ='images/robot.png' : 06'images/twain.png' : 07'images/trex.png' : 1'images/poe.png' : 1'images/triceratops.png' : 1'images/t-rex.png' : 1'images/apatosaur.png' : 1'images/raptor.png' : 1'images/spy.png' : 08;var createQueue = ;var queue = ;queue;var spot = 35;var total = 80;var iv =;
Then use browserify to generate a bundle that you can drop into your html:
$ browserify main.js -o bundle.js
methods
var createQueue = ;
var queue = createQueue(images)
Create a new queue widget with an array or hash of images
to use for the
avatars.
queue.appendTo(target)
Append the queue dom element to the target
element.
queue.spot(n, total)
Set your place in the queue at spot n
of total
.
You will have a pinkish dot over your head.
Spots will be created and destroyed around you.
queue.resize(width, height)
Set the size of the queue.
The avatars will be re-positioned to account for the new dimensions.
queue.reset()
Empty out the queue.
install
With npm do:
npm install waiting-around
license
MIT