Skip to content

Commit

Permalink
补充文档
Browse files Browse the repository at this point in the history
  • Loading branch information
August-Z authored Oct 2, 2018
1 parent ff4cfc7 commit 820cfe3
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,29 @@ $ npm install awesome-danmaku

## 使用

创建弹幕控制器
最简易的起步

```js
const danmaku = require('awesome-danmaku')
const DanmakuPlayer = danmaku.control.getInstanceControl({
const DanmakuControl = require('awesome-danmaku').control

const danmakuPlayer = DanmakuControl.getPlay('#app')

danmakuPlayer.play()
.insert('Hello')
.insert('Awesome Danmaku !')

danmakuPlayer.insert({
value: 'I feel good.'
})

```

使用一些配置项

```js
const DanmakuControl = require('awesome-danmaku').control

const DanmakuPlayer = DanmakuControl.getPlay({
el: '#app',
nodeClass: 'danmaku-item',
nodeMaxCount: 25,
Expand Down

0 comments on commit 820cfe3

Please sign in to comment.