Skip to content
No description or website provided.
JavaScript CoffeeScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
demo
dest
src
tasks
.gitignore
README.md
bower.json
gulpfile.coffee
package.json

README.md

 ____                                __
/\  _`\                             /\ \                    __
\ \,\L\_\    ___   __  __    ___    \_\ \     __   _ __    /\_\    ____  
 \/_\__ \   / __`\/\ \/\ \ /' _ `\  /'_` \  /'__`\/\`'__\  \/\ \  /',__\
   /\ \L\ \/\ \L\ \ \ \_\ \/\ \/\ \/\ \L\ \/\  __/\ \ \/ __ \ \ \/\__, `\
   \ `\____\ \____/\ \____/\ \_\ \_\ \___,_\ \____\\ \_\/\_\_\ \ \/\____/
    \/_____/\/___/  \/___/  \/_/\/_/\/__,_ /\/____/ \/_/\/_/\ \_\ \/___/
                                                           \ \____/
                                                            \/___/

Sound effector small JavaScript library.

Demo

https://sugarshin.github.io/sounder.js/

Quickstart

bower i sounder.js

Usage

<script src="sounder.js"></script>

Or use it as an AMD, CommonJS module

// CommonJS

var Sounder = require('sounder');

var sounder = new Sounder(),
    output = document.getElementById('output');

sounder.create(output);

Config

Sounder([ options ]);

options.size

Piece size

Type: Array

Default: [20, 4]

options.color

Coloring

If specify Array, will be chosen at random

Type: String or Array

Default: '#e74c3c'

options.column

Effect column length

Type: Number

Default: 6

options.maxHeight

Effect max height length

Type: Number

Default: 10

options.autoPlay

Effect auto playing

Type: Boolean

Default: false

options.speed

fps

Type: Number

Default: 60

Methods

.create( DOMElement )

Create and redering.

DOMElement

Type: Element

Returns: this

.play( [callback] )

Play.

Returns: this

.pause( [callback] )

Pause.

Returns: this

.toggle( [callback, callback] )

Toggles the state between play and pause.

Function of the first argument is the callback function for play. next is pause.

Returns: this

.stop( [callback] )

Stop.

Returns: this

.reset()

Effect counter reset.

Returns: this

.destory()

Destory.

Contributing

This library was developed with following things

gulp

CoffeeScript

npm i

Support browser

Modern browser and IE8+

License

MIT

© sugarshin

Something went wrong with that request. Please try again.