1 Star 0 Fork 6

ExceptionX / BulletScreenEngine

forked from hhhh / BulletScreenEngine 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

BulletScreenEngine

Version 1.2 NPM MIT

English Version | wiki | Demo

高性能弹幕引擎。同屏弹幕1000+

简介

一个高性能弹幕引擎,简单易用。支持CSS3、Canvas 2D、WebGL渲染方式。支持顶部、底部、逆向弹幕渲染。使用Canvas 2D渲染方式可流程渲染同屏1000条弹幕(可达1600条,与电脑配置有关)。

安装和使用

安装

你可以直接点击这里下载最新发行版本,也可以用以下命令安装NPM包。

> npm install bullet-screen-engine

使用

安装完成后,在Html页面引入。

压缩版:

<script src="bulletScreenEngine.all.min.js"></script>

调试版:

<script src="bulletScreenEngine.all.js"></script>

添加一个 id 为 BulletScreensDiv 的固定大小的 div 标签用于显示弹幕,并插入以下 JavaScript 代码。

var bulletScreenEngine = new BulletScreenEngine(document.getElementById('BulletScreensDiv'));
var _startTime = 5000;
for (var i = 0; i < 10000; i++) {
    bulletScreenEngine.addBulletScreen({
        text: "这是一个长长长长长长长长长长长长长长长长长长长长长长长长的测试(^_^)",
        color: 'white',
        borderCorol: 'black',
        startTime: _startTime
    });
    _startTime += parseInt(Math.random() * 300);
}
bulletScreenEngine.play();

用浏览器打开网页即可显示弹幕。

详细使用说明请查看 wiki

联系作者

如果有任何问题请写下 issues
E-mail:scottxu@scottxublog.com

版权声明

这个项目是一个开源项目,遵循MIT开源协议。要查看协议,请点击这里

MIT License Copyright (c) 2018-2019 Scott Xu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

高性能弹幕引擎。同屏弹幕1000+ A high-performance JavaScript bullet-screen (danmaku) engine. 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/icyyaww/BulletScreenEngine.git
git@gitee.com:icyyaww/BulletScreenEngine.git
icyyaww
BulletScreenEngine
BulletScreenEngine
master

搜索帮助