weizhenye / Danmaku

A high-performance JavaScript danmaku engine. 高性能弹幕引擎库

Home Page:https://danmaku.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

don't work with my project

Yang03 opened this issue · comments

only create many div, without animation, and hide, need add css ?

Please provide more infomation.
Which browser? Which mode? How you initialize it?

is my test code

var danmaku = new Danmaku();
        danmaku.init({
            container: document.getElementById('app'),
        });

        function sendDanmaku(data) {
            var comment = {
                text: data,
                style: {
                fontSize: '20px',
                color: '#ffffff'
              },
            };
            danmaku.emit(comment);
        }
        setInterval(function() {
            sendDanmaku('现在时间是:' +  new Date().getTime());
        }, 4000)
    </script>

And you should make sure #app has width and height.