react-optical-illusions
v2.0.1
Published
this is open source project optical illusion
Readme
<<<<<<< HEAD
🎭 react-optical-illusions
A React library for creating mesmerizing optical illusions using HTML5 Canvas. This package allows you to integrate visually stunning illusions into your React applications effortlessly.
📦 Installation
Install via npm:
npm install react-optical-illusions🚀 Usage
Import and use the CircleIllusionCanvas component in your React application:
import React from "react";
import { CircleIllusionCanvas } from "react-optical-illusions";
const App = () => {
return (
<div>
<h1 style={{ textAlign: "center", color: "white" }}>Optical Illusion</h1>
<CircleIllusionCanvas balls={12} speed={1000} variant={1} />
</div>
);
};
export default App;🛠 Props
| Prop | Type | Default | Description |
|------------|--------|---------|-------------|
| balls | Number | 10 | Number of dots in the illusion. |
| speed | Number | 1000 | Speed of the animation in milliseconds. |
| variant | Number | 1 | Variant that controls phase shifts in motion. |
🎨 Customization
- Adjust
ballsfor a denser illusion. - Modify
speedto change animation tempo. - Use
variantto experiment with different phase shifts.
🤝 Contributing
We welcome contributions! To contribute:
- Fork the repo
- Create a new branch
- Make your changes
- Submit a pull request
📜 License
MIT License. See LICENSE for more details.
🌟 Support
If you like this package, give it a ⭐ on GitHub!
Optical_illusion_React
9bbe4c6e7618dee65e1888a5b8f80c7c03ac6903
