1.0.2 • Published 1 year ago

react-click-display-fireworks v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

1

The mouse click event of the react+ts version, colorful fireworks effects will appear when the mouse clicks. feedback: send shitian1.clover@gmail.com github:https://github.com/Mnxj

2

// npm i react-click-display-fireworks

// step1
import MouseClickAnimation from 'react-click-display-fireworks';

// mount get dom
const canvasEl = document.querySelector ('.fireworks') as any;

// step2 create hover
const mouse = new MouseClickAnimation(canvasEl);

// step3 listener
const onMousedown = (e ) => {
          mouse.updateCoords(e)
          mouse.animateParticules()
}

document.addEventListener('mousedown',onMousedown)
mouse.setCanvasSize();// init
window.addEventListener('resize', mouse.setCanvasSize);

// step4 remember clear
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago