Kash Chauhan
This project showcases a beautiful flower animation created using JavaScript, HTML, and CSS. The animation dynamically generates flower petals and animates their growth and movement, resulting in a visually captivating display.
- Dynamic generation of flower petals.
- Smooth animations for petal growth and rotation.
- Configurable options for colors, sizes, and animation speed.
- Lightweight and runs in the browser with no external dependencies.
-
Clone the repository:
git clone https://github.com/chauhankashmira/flower-animation-js.git cd flower-animation-js
-
Open the
index.html
file in your browser:open index.html
-
Edit the
config
object in the JavaScript file to customize the animation:const config = { petalCount: 20, // Number of petals per flower petalColors: ['#FFB6C1', '#FF69B4', '#FF1493'], // Array of colors animationSpeed: 2, // Speed of petal animations in seconds flowerSize: 100 // Diameter of the flower in pixels };
-
Refresh the browser to see your changes.
The animation is implemented using:
- HTML5 Canvas for drawing petals and animating them.
- JavaScript for creating and animating the flower elements dynamically.
- CSS for styling the background and other elements (if needed).
flower-animation-js/
├── index.html # Main HTML file
├── style.css # Styles for the page
├── script.js # JavaScript code for the animation
└── README.md # Project documentation
- This project is compatible with all modern browsers that support HTML5 and JavaScript.
Contributions are welcome! Feel free to fork this repository, make changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy the beauty of animated flowers! 🌸