English | 简体中文
A highly extensible danmaku library with a robust plugin system, occlusion prevention, and collision detection, implemented based on CSS
, DOM
, and hooks-plugin
.
import { create } from 'danmu';
const manager = create(
plugin: {
$createNode({ node, data }) {
// Render danmaku content to the DOM
node.textContent = data;
},
},
);
// Initialize
manager.mount(document.getElementById('root'));
manager.startPlaying();
// Send danmuku
manager.push('danmaku content');