Skip to content

Commit c74e9d4

Browse files
committed
Update README
1 parent f3e9b6c commit c74e9d4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ Create fluid and interactive gradients animations with this small (< 10 kB) js l
66
## Install
77
* Download the script in the `dist/` folder
88

9-
## Basic config
9+
## How to use
1010
```html
11+
<!-- Create a <canvas> element -->
1112
<canvas id="granim-canvas"></canvas>
1213

14+
<!-- Call the script -->
15+
<script src="granim.min.js"></script>
16+
17+
<!-- Create a Granim instance -->
1318
<script>
1419
var granimInstance = new Granim({
1520
element: '#granim-canvas',
1621
name: 'granim',
1722
opacity: [1, 1],
18-
stateTransitionSpeed: 1000,
1923
states : {
2024
"default-state": {
2125
gradients: [
2226
['#834d9b', '#d04ed6'],
2327
['#1CD8D2', '#93EDC7']
24-
],
25-
transitionSpeed: 5000,
26-
loop: true
28+
]
2729
}
2830
}
2931
);

0 commit comments

Comments
 (0)