request-animation-stream

0.1.1 • Public • Published

request-animation-stream

Build Status npm install

streaming interface to requestAnimationFrame

usage

var requestAnimationStream = require('request-animation-stream')

dataSource.pipe(requestAnimationStream()).pipe(viewLayer)

// as dataSource streams, only the latest data (if any) will be emitted on
// animation frame.

API

requestAnimationStream(_flush, _alwaysEmit) -> DuplexStream

  • _flush is an optional argument that determines if any buffered data will be emitted if the stream is ended before the next frame.

  • _alwaysEmit is an optional argument that determines if the stream will emit every frame, even if no new data (most recent data will be emitted. If no data has been captured, undefined will be emitted).

license

MIT

Package Sidebar

Install

npm i request-animation-stream

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jarofghosts