https://github.com/flo-bit/pixi-scaffold
basic pixi.js scaffold for quick testing/demoing
https://github.com/flo-bit/pixi-scaffold
javascript pixijs scaffold
Last synced: 8 months ago
JSON representation
basic pixi.js scaffold for quick testing/demoing
- Host: GitHub
- URL: https://github.com/flo-bit/pixi-scaffold
- Owner: flo-bit
- Created: 2023-01-13T22:15:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T17:00:37.000Z (over 3 years ago)
- Last Synced: 2025-10-04T23:42:09.303Z (8 months ago)
- Topics: javascript, pixijs, scaffold
- Language: JavaScript
- Homepage: https://flo-bit.github.io/pixi-scaffold/
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# PIXI scaffold
This is a scaffold for PIXI.js projects.
includes:
- automatic resizing of root container (fixed size) and canvas to window size
- keydown and keyup events
- setup and update functions
see [flo-bit.github.io/pixi-scaffold/](https://flo-bit.github.io/pixi-scaffold/) for a simple example.
## Usage
- import the `pixi-scaffold` module
```js
import PixiScaffold from "https://flo-bit.github.io/pixi-scaffold/pixi-scaffold.js";
```
- make a game class with a `setup` and `update` function
```js
class Game {
setup(app) {
// setup your game here
}
update(delta, total, app) {
// update your game here
}
}
```
- call `PixiScaffold.run` and pass an instance of your game class
```js
PixiScaffold.run(new Game());
```