# animate-cursor

> A portable mouse animation package.

Latest version **0.0.2** (published 2023-04-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install animate-cursor
pnpm add animate-cursor
yarn add animate-cursor
bun add animate-cursor
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-04-01 |
| First published | 2023-03-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 550 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tdungck1 |
| Keywords | animate, cursor, mouse, webgl, three, react, vuejs, angular |

## Links

- npm: https://www.npmjs.com/package/animate-cursor
- npm.io page: https://npm.io/package/animate-cursor

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2023-04-01
- 0.0.1 — 2023-03-20

## README

# Intro
A portable mouse animation package.
It can be used in several javascript libraries and frameworks.
This project was cloned from package legendary-cursor of Domenicobrz
https://github.com/Domenicobrz/legendary-cursor

## Available Scripts
### Setup
```
npm i animate-cursor
```

### Usage
#### Init library
In the project directory, you can run:
```javascript
import initAnimCursor from 'animate-cursor'
initAnimCursor()
//or
initAnimCursor({
      lineSize: 0.05,
      opacityDecrement: 0.55,
      speedExpFactor: 0.8,
      lineExpFactor: 0.6,
      sparklesCount: 65,
      maxOpacity: 0.99,  // should be a number between [0 ... 1]
      // texture1:         "http://path_to_texture",      // texture displayed on mouse hover
      // texture2:         "http://path_to_texture",      // texture displayed on mouse click
      // texture3:         "http://path_to_texture",      // texture displayed on sparkles
  })
```

#### Take control of animation
```javascript
const legendaryCursor = initAnimCursor()

legendaryCursor.pause()     // temporarily disable animation
legendaryCursor.resume()    // resume animation

```

---
_Source: https://npm.io/package/animate-cursor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
