mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
Restructuring builds; Moved debug-config
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* typedefs.js
|
||||
* Normalizes browser-specific prefixes
|
||||
*/
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window.requestAnimFrame = (function () {
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function (/* function FrameRequestCallback */ callback) {
|
||||
window.setTimeout(callback, 1000 / 60);
|
||||
};
|
||||
})();
|
||||
|
||||
navigator.getUserMedia = navigator.getUserMedia ||
|
||||
navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
||||
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
||||
}
|
||||
Math.imul = Math.imul || function(a, b) {
|
||||
var ah = (a >>> 16) & 0xffff,
|
||||
al = a & 0xffff,
|
||||
bh = (b >>> 16) & 0xffff,
|
||||
bl = b & 0xffff;
|
||||
// the shift by 0 fixes the sign on the high part
|
||||
// the final |0 converts the unsigned value into a signed value
|
||||
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);
|
||||
};
|
||||
Reference in New Issue
Block a user