A simple project to try out and demo the use of React Hooks
The page features a "dancer" who can do currently 3 dance moves: Moonwalk, Duck walk, and Duck dance. The delay between moves can be adjusted with the number input. Click the Start button on the left to play/pause the dance, click on the rightmost button to toggle between the dance modes.
Updated with sparkling stars <3
- Just like any other create-react-app projects, run
yarn install
andyarn start
if you use yarn, or replace yarn by npm if you are using npm. The default port to run the app is 3000, so your brower will be opened at localhost:3000. If you are not familiar, read the instructions at https://github.com/facebook/create-react-app
Lots
- Add music for each dance mode
- More dance modes
- Add spotlights
- Beautify Tiny Dancer
- Add a partner (?!!!)
- Choice of different dancers
¯\_(ツ)_/¯
- First take a look at DANCE_MOVES in
src/Jackson.js
. This is where the body parts that participate in the dance, the stages for the body parts, the animations properties for the dance can be specified. - Give the new dance move a unique name
- The stages attribute is an array of the class names of each stage in one iteration for a body part. Each of the body parts should contain all the steps in the dance that makes up one iteration, i.e the stages for all body parts should have equal length. NOTE: currently the total num of moves in one iteration is counted using the number of steps the left leg takes, so we are assuming here that the legs will always move
- If you are adding new moving body parts that will move, add the refs to the relevant body parts (see example of the legs)
- If you need to add a new appearance to the body part, you need to add a new stage name. Add the stage name as a class in
src/Jackson.css
- Add a unique name to the dance move
- If you need to shift the body of the dancer when switching dance modes, add the transform property to the
bodyTransform
attribute
- Why is the file Jackson.js and Jackson.css?
I originally built this for the moon walk only so the dancer was called just Micheal Jackson. He is renamed to Tiny Dancer now