https://github.com/thbar/playground
https://github.com/thbar/playground
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/thbar/playground
- Owner: thbar
- Created: 2011-11-16T22:23:16.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-11-17T23:01:14.000Z (over 14 years ago)
- Last Synced: 2025-03-24T13:51:19.170Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 3.31 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I wanted to see if it's possible to sync a music track with a given BPM (beats per minute) with a three.js animation.
It works (currently on Chrome) - here are the key points:
* `audio.currentTime` returns the audio position in seconds
* I use that and the precomputed BPM to guess the current beat index
* three.js is used for rendering
* the jQuery easing functions are used to bounce the cubes
Follow the author on Twitter! [thibaut_barrere](http://www.twitter.com/thibaut_barrere)
License: MIT for the code, Creative Commons Attribution-NonCommercial-ShareAlike 3.0 for the music.