tgwizard / bpm-game Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://tgwizard.github.io/bpm-game
Home Page: http://tgwizard.github.io/bpm-game
Right now the user tempo has to be within 3 bpm of the target tempo to be marked "correct". However, being within 3 bpm of 180 bpm is much harder than being within 3 bpm of 60. Would you consider scaling the correctness as a percent of the bpm instead of a constant?
The following warning appears every time for me on the first attempt in the guess the tempo game.
"The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page."
When this warning appears, the audio fails to play and the game hangs.
If I click the "<< Back" link and then choose the game again, it works correctly
The reason for this is that the Timbre.js library starts an AudioContext on load, which happens before a user interaction,
and Chrome now blocks autoplay of audio before a user interaction.
If I let the game crash and go back and select it again, Chrome considers the first attempt a user interaction
so it works the second time.
This should be fixed in the timbre repo by
either delaying the AudioContext start or using resume() later on before playing audio.
However timbre is no longer maintained, so I've prepared a patch fix. Pull request coming soon.
Using Chrome 97.0.4692.99
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.