1.0.0 • Published 7 years ago

pull-pixi-tick v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

pull-pixi-tick

A pull-stream "Through" that will throttle the source until the next tick of a pixi.js ticker.

install

yarn add pull-pixi-tick

usage

const pull = require('pull-stream')
const tickThrough = require('pull-pixi-tick').through
const tickSource = require('pull-pixi-tick').source
const {Application} = require('pixi.js')

const {view, ticker} = new Application()
document.body.appendChild(view)

pull(
    pull.count(1000),
    tickThrough(ticker),
    pull.log()
);

pull(
    tickSource(ticker),
    pull.log()
)