danmuku
Version:
Display danmu (flying comments) on HTML5 video.
26 lines (22 loc) • 413 B
JavaScript
function collidableRange() {
var max = 9007199254740991;
return [{
range: 0,
time: -max,
width: max,
height: 0
}, {
range: max,
time: max,
width: 0,
height: 0
}];
}
export var space = {};
export function resetSpace() {
space.ltr = collidableRange();
space.rtl = collidableRange();
space.top = collidableRange();
space.bottom = collidableRange();
}
resetSpace();