Threejs-Mouse-Effect
Mouse effect based on Threejs.
Installation
npm install @youyouzone/threejs-mouse-effect
Usage
import MouseEffect from '@youyouzone/threejs-mouse-effect';
// setup
const mouseEffect = new MouseEffect(scene, canvas, camera, options);
// dispose
mouseEffect.dispose();
Props:
- scene: Scene - threejs scene.
- canvas: HtmlCanvasElement - canvas element.
- camera: Camera - threejs camera.
- options?: { isAnimate?: enable animation, default value is true, hoverColor?: set color when hover on a object, default value is 'dodgerblue', }
License
This project is licensed under