https://github.com/mudin/magic-scroll
Apple Magic Mouse scrolling effect for normal mouses
https://github.com/mudin/magic-scroll
es6 magic-scroll rollup scroll smooth-scrolling
Last synced: 7 months ago
JSON representation
Apple Magic Mouse scrolling effect for normal mouses
- Host: GitHub
- URL: https://github.com/mudin/magic-scroll
- Owner: mudin
- License: mit
- Created: 2019-08-24T00:29:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-19T23:45:43.000Z (almost 6 years ago)
- Last Synced: 2025-01-21T09:29:03.174Z (over 1 year ago)
- Topics: es6, magic-scroll, rollup, scroll, smooth-scrolling
- Language: HTML
- Homepage: https://mudin.github.io/magic-scroll/
- Size: 3.33 MB
- Stars: 44
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MagicScroll
## Why MagicScroll?
If you have tried to use Apple magic mouse or macbook Trackpad, the scroll is very smooth. However normal scroll is not.
In order to make the smilar effect I have tried to implement MagicScroll.
We can apply this for any kind of place where mouse wheel is need to be smooth (For example, IndoorJS demo below)
## [Demo](https://mudin.github.io/magic-scroll/)

## [JS fiddle demo](https://jsfiddle.net/mudin/2nstb5pf/)
## [IndoorJS demo](https://mudin.github.io/indoorjs/)
## Install
```
npm i magic-scroll.js -S
```
or
```
https://unpkg.com/magic-scroll.js/dist/MagicScroll.umd.js
```
## Usage
```
let magicScroll = new MagicScroll({
target: document.querySelector(".scroll-view.after"), // for body, no need to set target
speed: 80,
smooth: 12
});
```
## License
[MIT](LICENSE).