1.0.1 • Published 1 year ago

@nostranger/gameloop v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

GameLoop

NPM Version

A super simple implementation of a game loop.

Usage

import { GameLoop } from '@nostranger/gameloop';

const gameLoop = new GameLoop({
  update(delta) {
    // Update data here
  },
  render() {
    // Draw graphics here
  },
});

// Start the game loop
gameLoop.start();

// Stop the game loop
gameLoop.stop();

// Check if the game loop is running
gameLoop.isActive; // bool
1.0.1

1 year ago

1.0.0

1 year ago