Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nostrangerdev/gameloop
A super simple implementation of a game loop
https://github.com/nostrangerdev/gameloop
Last synced: 6 days ago
JSON representation
A super simple implementation of a game loop
- Host: GitHub
- URL: https://github.com/nostrangerdev/gameloop
- Owner: nostrangerdev
- License: mit
- Created: 2024-03-02T18:53:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-02T19:39:55.000Z (10 months ago)
- Last Synced: 2024-12-08T01:14:41.256Z (27 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GameLoop
![NPM Version](https://img.shields.io/npm/v/%40nostranger%2Fgameloop)
A super simple implementation of a game loop.
## Usage
```js
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
```