react-danmu

1.0.0 • Public • Published

react-danmu


React Danmu Component

NPM version build status Test coverage gemnasium deps npm download

Screenshots

Development

npm install
npm start

Example

http://localhost:3020/examples/

online example: http://imyelo.github.io/react-danmu/

install

react-danmu

Usage

var Danmu = require('react-danmu');
var React = require('react');
var messages = [{
  content: '666666'
}]
React.render(<Danmu messages={ messages } />, container);

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.

Package Sidebar

Install

npm i react-danmu

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • yelo