# @ctyun/barrage

> a Barrage library. non-dependence / high-performance / pureness。 高性能无依赖弹幕库

Latest version **2.0.2** (published 2021-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ctyun/barrage
pnpm add @ctyun/barrage
yarn add @ctyun/barrage
bun add @ctyun/barrage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2021-03-17 |
| First published | 2021-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 92.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lemon |
| Maintainers | lemon_cn |
| Keywords | danmu, barrage, library |

## Links

- npm: https://www.npmjs.com/package/@ctyun/barrage
- Repository: https://github.com/lemoncn/pure-barrage
- Homepage: https://github.com/lemoncn/pure-barrage#readme
- Issues: https://github.com/lemoncn/pure-barrage/issues
- npm.io page: https://npm.io/package/@ctyun/barrage

## Dependencies (1)

- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1

## Recent versions

- 2.0.2 (latest) — 2021-03-17
- 2.0.1 — 2021-03-17
- 2.0.0 — 2021-03-17

## README

# 弹幕库 by CSS3 

- 提供弹幕功能
- 对比canvas性能后，采用css3方案，支持移动H5
- 使用ts开发


# 使用说明

    const barrage = new Barrage({
        container: window.document.getElementById('danmu'),
        overTimeBase: 5000
    });


    barrage.emit('中文中文中文中文中文中文');


    setInterval(function() {
        barrage.emit('中文中文中文中文中文中文', {
            notice: true, // 加红加粗
            fontSize: '20px',  // 弹幕字号
            fontColor: '#ff0',  // 颜色
            speed: 'normal',  // 速度 fast | norma(default) | slow
            className: 'custom'  // 自定义class
        });
    }, 1000);


# 开发说明
开发：
npm run dev

打开 http://localhost:1234/

---
_Source: https://npm.io/package/@ctyun/barrage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
