Skip to content

Instantly share code, notes, and snippets.

@barneycarroll
Created January 5, 2018 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barneycarroll/77049a9d3800161ec27e48e894cd64eb to your computer and use it in GitHub Desktop.
Save barneycarroll/77049a9d3800161ec27e48e894cd64eb to your computer and use it in GitHub Desktop.
import on from 'on.js'

async function royalAirForce(){
  await on(requestAnimationFrame)

  renderX()
  
  await on(requestAnimationFrame)

  renderY()

  await on(requestAnimationFrame)

  renderZ()
  
  await on(requestAnimationFrame)
}
export default (ƒ, ...args) =>
new Promise(done =>
ƒ(done, ...args)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment