react-danmu
React Danmu Component
Screenshots
Development
npm install
npm start
Example
http://localhost:3020/examples/
online example: http://imyelo.github.io/react-danmu/
install
Usage
var Danmu = ;var React = ;var messages = content: '666666'React;
API
props of
name | type | default | description |
---|---|---|---|
width | Number | 640 | width of screen (px) |
height | Number | 480 | height of screen (px) |
messages | Array(Object) | messages list |
props of
name | type | default | description |
---|---|---|---|
content | String | ||
speed | Number | 1 | |
y | Number | 0 | offset y |
size | Number | 1 | |
color | String | '#fff' | hex |
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
react-danmu is released under the MIT license.