We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3e9b6c commit c74e9d4Copy full SHA for c74e9d4
README.md
@@ -6,24 +6,26 @@ Create fluid and interactive gradients animations with this small (< 10 kB) js l
6
## Install
7
* Download the script in the `dist/` folder
8
9
-## Basic config
+## How to use
10
```html
11
+<!-- Create a <canvas> element -->
12
<canvas id="granim-canvas"></canvas>
13
14
+<!-- Call the script -->
15
+<script src="granim.min.js"></script>
16
+
17
+<!-- Create a Granim instance -->
18
<script>
19
var granimInstance = new Granim({
20
element: '#granim-canvas',
21
name: 'granim',
22
opacity: [1, 1],
- stateTransitionSpeed: 1000,
23
states : {
24
"default-state": {
25
gradients: [
26
['#834d9b', '#d04ed6'],
27
['#1CD8D2', '#93EDC7']
- ],
- transitionSpeed: 5000,
- loop: true
28
+ ]
29
}
30
31
);
0 commit comments