darlingjs-live-on-animation-frame

1.0.1 • Public • Published

darlingjs-live-on-animation-frame

update pipeline on animation frame

Change Log

Installation

npm i --save darlingjs-live-on-animation-frame

Usage

var darling = require('darlingjs');
var box2d = require('darlingjs-box2d');
var pixijs = require('darlingjs-pixijs');
var onAnimationFrame = require('darlingjs-live-on-animation-frame');
 
/**
 * Create world with pipeline:
 * - pysics: box2d
 * - and visualization: pixijs
 *
 * and make it lives on per frame of animation
 *
 */
 
darling
  .world('brand new world')
  .pipe(box2d())
  .pipe(pixijs())
  .live(onAnimationFrame({
    autostart: true
  }));
  

Package Sidebar

Install

npm i darlingjs-live-on-animation-frame

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • hyzhak