Package Exports
- gibbon.js
- gibbon.js/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gibbon.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Gibbon
Note
This is a simple pixi.js Game Engine Framework to help make games quickly with pixi.js
It uses an object/component system (Not ECS) similar to Unity.
The project is in development and I update it as I toy with it. I added to npm for my own ease of use.
Using
Extend Game
Optionally override constructor and init() function.
export class MyGame extends Game {
constructor(app:PIXI.Application){
super(app);
}
override init(){
super.init();
/// this.start() could be called here.
/// Create and add Actor objects...
/// Add components to Actor objects...
}
}Init Pixi App and start game.
import * as PIXI from 'pixi.js';
import { MyGame } from './my-game';
const app = new PIXI.Application({
width: window.innerWidth,
height: window.innerHeight,
sharedLoader: true,
antialias: true,
resizeTo: window,
backgroundColor: 0xaaccff
});
document.body.appendChild(app.view);
const game = new MyGame(app);
game.init();
game.start();Development
Actors and Components
While it is possible to subclass Actors, it is better to subclass Components and add them to actors.