@nostranger/gameloop
v1.0.1
Published
A super simple implementation of a game loop
Downloads
5
Maintainers
Readme
GameLoop
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