Skip to content

Commit

Permalink
2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhenye committed Apr 4, 2023
1 parent a270ef7 commit 70f242b
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 47 deletions.
24 changes: 17 additions & 7 deletions dist/danmaku.canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
return 'transform';
}());

const dpr = window.devicePixelRatio || 1;
var dpr = typeof window !== 'undefined' && window.devicePixelRatio || 1;

var canvasHeightCache = Object.create(null);

Expand Down Expand Up @@ -280,17 +280,27 @@
}

var raf =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
(
typeof window !== 'undefined' &&
(
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame
)
) ||
function(cb) {
return setTimeout(cb, 50 / 3);
};

var caf =
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
(
typeof window !== 'undefined' &&
(
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame
)
) ||
clearTimeout;

function binsearch(arr, prop, key) {
Expand Down
2 changes: 1 addition & 1 deletion dist/danmaku.canvas.min.js

Large diffs are not rendered by default.

22 changes: 16 additions & 6 deletions dist/danmaku.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,27 @@
}

var raf =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
(
typeof window !== 'undefined' &&
(
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame
)
) ||
function(cb) {
return setTimeout(cb, 50 / 3);
};

var caf =
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
(
typeof window !== 'undefined' &&
(
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame
)
) ||
clearTimeout;

function binsearch(arr, prop, key) {
Expand Down
2 changes: 1 addition & 1 deletion dist/danmaku.dom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 17 additions & 7 deletions dist/danmaku.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
remove: remove,
};

const dpr = window.devicePixelRatio || 1;
var dpr = typeof window !== 'undefined' && window.devicePixelRatio || 1;

var canvasHeightCache = Object.create(null);

Expand Down Expand Up @@ -365,17 +365,27 @@
}

var raf =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
(
typeof window !== 'undefined' &&
(
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame
)
) ||
function(cb) {
return setTimeout(cb, 50 / 3);
};

var caf =
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
(
typeof window !== 'undefined' &&
(
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame
)
) ||
clearTimeout;

function binsearch(arr, prop, key) {
Expand Down
Loading

0 comments on commit 70f242b

Please sign in to comment.