kaguranana-birthday-project/node_modules/granim
2021-12-12 18:49:32 -08:00
..
dist initial 2021-12-12 18:49:32 -08:00
docs initial 2021-12-12 18:49:32 -08:00
lib initial 2021-12-12 18:49:32 -08:00
test initial 2021-12-12 18:49:32 -08:00
.eslintrc.js initial 2021-12-12 18:49:32 -08:00
.travis.yml initial 2021-12-12 18:49:32 -08:00
bower.json initial 2021-12-12 18:49:32 -08:00
CHANGELOG.md initial 2021-12-12 18:49:32 -08:00
CONTRIBUTING.md initial 2021-12-12 18:49:32 -08:00
gulpfile.js initial 2021-12-12 18:49:32 -08:00
index.js initial 2021-12-12 18:49:32 -08:00
karma.conf.js initial 2021-12-12 18:49:32 -08:00
LICENSE initial 2021-12-12 18:49:32 -08:00
package.json initial 2021-12-12 18:49:32 -08:00
README.md initial 2021-12-12 18:49:32 -08:00
standalone.js initial 2021-12-12 18:49:32 -08:00

Granim.js Build Status codecov gitter

Create fluid and interactive gradients animations with this small (< 17 kB) js library.

See the demo site.

Install

From NPM

  • Run npm install granim --save

From Bower

  • Run bower install granim

Static

How to use

<!-- Create a <canvas> element -->
<canvas id="granim-canvas"></canvas>

<!-- Call the script -->
<script src="granim.min.js"></script>

<!-- Create a Granim instance -->
<script>
var granimInstance = new Granim({
   element: '#granim-canvas',
   name: 'granim',
   opacity: [1, 1],
   states : {
       "default-state": {
           gradients: [
               ['#834D9B', '#D04ED6'],
               ['#1CD8D2', '#93EDC7']
           ]
       }
   }
});
</script>