0.1.3 • Published 2 years ago

loop-fns v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

loop-fns

A lightweight solution for looping with great performance and control.

Get started

Install

yarn add loop-fns
# or
npm install --save loop-fns

Use

import { loopFrames } from 'loop-fns'

const props = loopFrames((props) => {
  // your graphics update logic...

  // you can also control the loop within the callback
  if (props.currentFrame === 10) {
    props.stop()
  }
}, 30) // limit to 30fps

props.start()
0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago