1.0.1 • Published 3 months ago

@nostranger/gameloop v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months 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

3 months ago

1.0.0

3 months ago