Skip to content

Commit 75790eb

Browse files
committed
v.1.1.0
1 parent e1f9d27 commit 75790eb

File tree

3 files changed

+42
-20
lines changed

3 files changed

+42
-20
lines changed

README.MD

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Cuberto Mouse Follower
22

3-
<a href="https://www.npmjs.com/package/mouse-follower"><img src="https://img.shields.io/npm/v/mouse-follower" alt="NPM Version"></a>
4-
<a href="LICENCE"><img src="https://img.shields.io/github/license/Cuberto/mouse-follower" alt="Licence"></a>
5-
<img src="https://img.shields.io/bundlephobia/min/mouse-follower?color=orange" alt="Bundle file size">
6-
<img src="https://img.shields.io/bundlephobia/minzip/mouse-follower?color=orange&label=gzip%20size" alt="Bundle file size (gzip)">
7-
<a href="https://npmcharts.com/compare/mouse-follower?minimal=true"><img src="https://img.shields.io/npm/dm/mouse-follower" alt="NPM Downloads"></a>
3+
<a href="https://www.npmjs.com/package/mouse-follower"><img src="https://img.shields.io/npm/v/mouse-follower?color=red" alt="NPM Version"></a>
4+
<a href="LICENCE"><img src="https://img.shields.io/github/license/Cuberto/mouse-follower?color=orange" alt="Licence"></a>
5+
<img src="https://img.shields.io/bundlephobia/min/mouse-follower?color=green" alt="Bundle file size">
6+
<img src="https://img.shields.io/bundlephobia/minzip/mouse-follower?color=yellow&label=gzip%20size" alt="Bundle file size (gzip)">
7+
<a href="https://npmcharts.com/compare/mouse-follower?minimal=true"><img src="https://img.shields.io/npm/dm/mouse-follower?color=blue" alt="NPM Downloads"></a>
88
<img src="https://img.shields.io/github/workflow/status/Cuberto/mouse-follower/Build" alt="GitHub Workflow Status">
99

1010
A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.
@@ -15,37 +15,59 @@ A powerful javascript library to create amazing and smooth effects for the mouse
1515

1616
GSAP v3 (https://greensock.com/gsap/)
1717

18-
## Installation
18+
## Quick start
19+
20+
### Install from NPM
21+
22+
Mouse Follower requires GSAP library to work.
1923

2024
```
2125
npm install gsap --save
2226
npm install mouse-follower --save
2327
```
2428

25-
## Quick start
29+
Import GSAP and Mouse Follower and initialize it:
2630

27-
Import cursor styles from `/src/scss/index.scss` into your main SCSS file:
31+
```js
32+
import MouseFollower from "mouse-follower";
33+
import gsap from "gsap";
34+
35+
MouseFollower.registerGSAP(gsap);
36+
37+
const cursor = new MouseFollower();
38+
```
39+
40+
Don't forget to import the cursor styles from `/src/scss/index.scss` into your main scss file:
2841

2942
```scss
3043
@import "cursor";
3144
```
3245

33-
Mouse Follower requires GSAP library to work.
46+
### Use from CDN
3447

35-
Import GSAP, import Mouse Follower and initialize it in JS:
48+
If you don't want to include Mouse Follower files in your project, you can use it from CDN.
3649

37-
```js
38-
import MouseFollower from "mouse-follower";
39-
import gsap from "gsap";
50+
The following files are available:
4051

41-
MouseFollower.registerGSAP(gsap);
52+
```html
53+
<link rel="stylesheet" href="https://unpkg.com/mouse-follower@1/dist/mouse-follower.min.css">
4254

43-
const cursor = new MouseFollower();
55+
<script src="https://unpkg.com/mouse-follower@1/dist/mouse-follower.min.js"></script>
56+
```
57+
58+
Mouse Follower requires GSAP library to work. You need to import it before the Mouse Follower if you didn't have it before:
59+
60+
```html
61+
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/gsap.min.js"></script>
62+
<script src="https://unpkg.com/mouse-follower@1/dist/mouse-follower.min.js"></script>
63+
<script>
64+
var cursor = new MouseFollower();
65+
</script>
4466
```
4567

46-
### Options
68+
## Options
4769

48-
You can configure cursor follower via options:
70+
You can configure Mouse Follower via options:
4971

5072
```js
5173
const cursor = new MouseFollower({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mouse-follower",
3-
"version": "1.0.8",
3+
"version": "1.1.0",
44
"description": "A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.",
55
"license": "MIT",
66
"source": "./src/index.js",

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Cuberto Mouse Follower
33
* https://cuberto.com/
44
*
5-
* @version 1.0.8
5+
* @version 1.1.0
66
* @author Cuberto, Artem Dordzhiev (Draft)
77
*/
88

@@ -36,7 +36,7 @@ export default class MouseFollower {
3636
* @param {string} options.iconState Icon state name.
3737
* @param {string|null} options.activeState Active (mousedown) state name. Set false to disable.
3838
* @param {string} options.mediaState Media (image/video) state name.
39-
* @param {object} options.stateDetelction State detection rules.
39+
* @param {object} options.stateDetection State detection rules.
4040
* @param {boolean} options.visible Is cursor visible by default.
4141
* @param {boolean} options.visibleOnState Automatically show/hide cursor when state added.
4242
* @param {number} options.speed Cursor movement speed.

0 commit comments

Comments
 (0)