Skip to content

darlingjs/darlingjs-live-on-animation-frame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

darlingjs-live-on-animation-frame npm version Build Status

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
  }));
  

About

update pipeline on animation frame

Resources

License

Stars

Watchers

Forks

Packages

No packages published