Git Product home page Git Product logo

react-sine-wave's Introduction

ashiishme react sinve wave logo built with react, typescript and canvas API

React Sine Wave

Sine wave animation with random colors using React & Typescript with Canvas API ๐Ÿ˜.

Demo

Deployed URL: https://ashiishme.github.io/react-sine-wave/

react-sine-wave.mp4

Installation

git clone https://github.com/ashiishme/react-sine-wave.git
cd react-sine-wave
yarn install

Start the server

yarn start

Enjoy the wave animation at: http://localhost:3000/

react-sine-wave's People

Contributors

ashiishme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-sine-wave's Issues

Memory leak in draw func

Hello. Looks like we have a memory leak in the draw function in wave.ts. I can see the draw function being called in a continuous loop even when the component has been unmounted. I was getting a console error regarding this.

Screen Shot 2021-07-18 at 7 02 45 PM

Framerate of animation slows down when resizing the browser window

The animation works great when loading the page initially, however if the user decides to resize the browser window, or the canvas' dimensions, the animation slows down greatly. I do not know the cause of this issue, but I noticed it as I was playing around with the code myself. The bug is present on your live demo as well. Any ideas?

Change color of wave

Option to change color of wave.

  1. Color picker to select 2 colors
  2. Opacity low button so that user will not miss the button.
  3. Configuration to hide the button if needed

New Concept

  • A button to generate random color.
  • User press the button, the color changes.
  • One wave will have full alpha, another wave will have slightly less but the same color so that we don't have to create 2 buttons.

Transition the wave color

Currently, the wave just "snaps" to another color.
A smooth transition would look nice and appealing.

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.