Giter VIP home page Giter VIP logo

takitajwar17 / happy-birthday-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

The Happy Birthday Project is an HTML5 Canvas and JavaScript-based web animation, creating a dynamic "Happy Birthday" wish with lively features like animated fireworks and floating balloons. Driven by the app.js logic, the project employs the HTML5 Canvas API for rendering dynamic elements, ensuring a responsive design for adaptability.

Home Page: https://takitajwar17.github.io/Happy-Birthday-Project/

JavaScript 93.32% HTML 3.57% CSS 3.11%

happy-birthday-project's Introduction

Project Documentation: Happy Birthday Project

Overview

This project is a web-based animation created using HTML5 Canvas and JavaScript. It generates a visually appealing "Happy Birthday" wish with dynamic elements such as fireworks, floating balloons, and colorful letters. The animation is designed to create a festive and celebratory atmosphere.

Deployment

The deployed version of this project is available here.

Files

  • index.html: The main HTML file that structures the document, includes the necessary meta tags, links to external stylesheets and scripts, and sets up the Canvas element.

  • style.css: The CSS file that provides styling for the HTML elements, including the Canvas positioning, font styles, and other visual properties.

  • app.js: The JavaScript file that contains the logic for generating the animated elements, such as letters, fireworks, and balloons. It utilizes the HTML5 Canvas API for drawing and animation.

HTML Structure

The HTML document follows a standard structure, including the DOCTYPE declaration, HTML, head, meta tags, title, and body. The main content is within the body, where the Canvas element is positioned.

<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Meta tags, title, and stylesheets -->
</head>
<body>
    <!-- Canvas element for animation -->
    <canvas id="c"></canvas>

    <!-- JavaScript file for animation logic -->
    <script src="app.js"></script>
</body>
</html>

CSS Styles

The CSS file (style.css) is used to style the Canvas and other elements. Notable styles include positioning the Canvas element to cover the entire viewport, styling for the paragraphs, and links.

JavaScript Logic

The JavaScript file (app.js) contains the logic for animating the birthday wish. The key components are:

Letters

  • Each letter is represented as an object with properties such as position, color, and animation phase.
  • The animation includes a firework effect, contemplation, and the release of balloons.

Fireworks

  • Fireworks are simulated using lines drawn on the Canvas, creating an animated burst effect.

Balloons

  • Balloons are simulated by inflating and floating upwards, adding a dynamic and festive element to the animation.

Animation Loop

The anim() function serves as the main animation loop, continuously updating and redrawing the Canvas to create the dynamic effects.

Responsive Design

The project includes a responsive design that adjusts the Canvas size and positioning when the browser window is resized.

Usage

To view the animation, open the index.html file in a modern web browser.

Author

This project was created by @takitajwar17 as a creative and interactive way to send birthday wishes.

happy-birthday-project's People

Contributors

takitajwar17 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.