Discover the enchanting realm of our 2D Dynamic Particle Text Animation web app, where your text transforms into a mesmerizing spectacle of animated particles. Crafted with HTML5 canvas and JavaScript, this application turns user input into a dynamic array of colored particles that react to your cursor's movements, creating an interactive visual feast.
Each particle, derived from the pixels of the rendered text, dances on the screen, responding to interactions with lifelike motion. Enter any text and watch as it dynamically updates, each dot a part of a larger, interactive display. As you move your cursor, the particles sway, creating a fluid and captivating experience that blends art with technology.
Designed for accessibility and ease of use, the app invites users from all backgrounds to engage in digital creativity. It's a testament to the imaginative potential of coding, offering a digital canvas for both expression and exploration. Experience the magic of your words brought to life in a stunning display of dynamic particle animation, a true intersection of code and creativity.
- Dynamic Text Input: Transform any text into a vivid display of animated particles.
- Cursor Interaction: Particles react to cursor movements, creating an immersive experience.
- Responsive Design: Fullscreen canvas that adjusts to window size for optimal viewing on any device.
- Customizable Settings: Easily modify particle size, color, and other properties through the code.
- HTML5
- CSS3
- JavaScript
To get a local copy up and running, follow these simple steps.
No prerequisites are needed, just a modern web browser capable of running HTML5 and JavaScript.
-
Clone the repo
git clone https://www.github.com/Marqui-13/dynamic-particle-text-animation.git
-
Open
index.html
in your web browser.
- View Animation: Simply open the web app to start the animation.
- Interact with Animation: Move your cursor/finger/stylus across the canvas to interact with the particles.
- Change Text: Enter any text in the input box at the top left corner to see it transform into particles.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Marquivion Orr - Initial Work - Marqui Orr
Distributed under the MIT License. See LICENSE
for more information.
- Font Awesome for icons
This project initially uses JavaScript for its implementation. To leverage TypeScript’s type safety and modern features, you may want to convert the JavaScript code to TypeScript. This guide will walk you through the steps required to perform this conversion.
• Node.js and npm installed on your system
• Basic knowledge of JavaScript and TypeScript
First, you need to install TypeScript globally on your machine. Open your terminal and run:
npm install -g typescript
Navigate to your project’s root directory and initialize a TypeScript project. This will create a tsconfig.json file with default settings.
tsc --init
Adjust the tsconfig.json as necessary for your project. For converting existing JavaScript to TypeScript while targeting modern JavaScript environments, consider setting "target": "es6" in your tsconfig.json.
Rename your .js files to .ts. For example, if you have a file named app.js, rename it to app.ts.
Modify your code to include TypeScript syntax. This includes:
• Adding type annotations to variables and function parameters.
• Defining interfaces or types for your objects.
• Resolving any TypeScript errors that arise during compilation.
Compile your TypeScript files back into JavaScript using the TypeScript compiler. Run:
tsc
This command will compile all .ts files in your project to .js files according to the options set in tsconfig.json.
Update your project to use the compiled JavaScript files. If you’re working on a web project, make sure your HTML files reference the newly generated .js files.
Additional Tips
• TypeScript Tooling: Consider using TypeScript-enabled IDEs or editors like Visual Studio Code for better development experience, including real-time error checking and auto-completion.
• Watch Mode: Use tsc --watch to automatically compile your TypeScript files whenever changes are made.
• Advanced Configuration: Explore other tsconfig.json options to fine-tune the compiler to your needs. This includes configuring module resolution, enabling strict mode, and more.
Converting JavaScript to TypeScript can significantly improve your project’s maintainability and catch errors early in the development process. By following these steps, you can smoothly transition your project to TypeScript and take advantage of its powerful features.
Feel free to adjust the wording, steps, and details based on the specific needs and structure of your project!