Skip to content

An HTML5 canvas boilerplate with ES6 and live-reloading with BrowserSync.

Notifications You must be signed in to change notification settings

shinellm/playing-with-canvas-boilerplate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bouncing Words

Canvas Boilerplate is the go-to solution for quickly creating modern canvas pieces using ES6 and webpack.

Here's a test project where I played with getting words to bounce around a webpage. It has the follwing features:

  • Iterates through an array of genres and generates an object for each
  • All objects have a randomized color, size, and velocity at which its moving
  • When you hover over a word, the word stops moving and a filled circle of light opactity appears
  • Once you move your mouse off the word, the filled circle fades away and the word is eventually hit by one of the other bouncing words. Once this happens it gains velocity and moves around the webpage again
  • If you click on a word, it logs the word that you've clicked on

Getting Started

  1. Clone the repo:

    git clone https://github.com/shinellm/playing-with-canvas-boilerplate.git
    
  2. Install dependencies:

    yarn
    

    or

    npm install
    
  3. Run webpack:

    npm start
    

Your canvas piece should open up automatically at http://localhost:3000 and you should see various genres floating around the webpage.

About

An HTML5 canvas boilerplate with ES6 and live-reloading with BrowserSync.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.6%
  • HTML 2.4%