home
about
usage
settings
Usage
Installation
Add 2 scripts to your page:
<script src="js/libs/jsband-min.js"></script>
<script src="js/pave-min.js"></script>
Now background is ready for use!
Create background
Create an empty DIV and give it an ID (e.g. "DIV_ID").
Create a Pave instance, indicating the DIV ID and settings:
var pave = new Pave("DIV_ID",{
//settings
});

Done!
You can even create multiple Pave instances on your page.
Each setting has a default value and can be ignored. Here is a complete list of settings.
Replace background
Let's say your DIV already contains Pave instance.
Create a new Pave instance for the same DIV:
pave = new Pave("DIV_ID",{
//new settings
});
A new instance will replace the old one.
Remove background
To remove a Pave instance, you should use a special method:
pave.destroy();
It stops all animations, frees memory and removes everything related to Pave instance.
Resize background
Pave is responsive (i.e., it resized automatically when you resize the browser window).
You can style your DIV using percentage units without worrying about displaying the background.
However, you have the option to manually call the method:
pave.resize();
It rebuilds background according to the size of your DIV.