Skip to content

Commit

Permalink
add to provide ApplicationOptions on constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed May 22, 2018
1 parent 110ca9d commit 8770cd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "pixi-engine",
"version": "0.1.6",
"version": "0.1.7",
"description": "Engine-like utilities for developing games with PixiJS",
"main": "lib/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/Application.ts
Expand Up @@ -4,7 +4,7 @@ import ClockTimer from "@gamestdio/timer";
export class Application extends PIXI.Application {
public static clock: ClockTimer = new ClockTimer();

constructor () {
constructor (opts?: PIXI.ApplicationOptions) {
super();

PIXI.ticker.shared.add(() => Application.clock.tick());
Expand All @@ -25,9 +25,9 @@ export class Application extends PIXI.Application {
}

protected static instance: Application;
static getInstance () {
static getInstance (opts?: PIXI.ApplicationOptions) {
if (!this.instance) {
this.instance = new Application();
this.instance = new Application(opts);
}
return this.instance;
}
Expand Down

0 comments on commit 8770cd1

Please sign in to comment.