nitro-renderer/src/pixi-proxy/PixiApplicationProxy.ts

19 lines
433 B
TypeScript
Raw Normal View History

2022-10-30 00:02:19 -04:00
import { Application, IApplicationOptions } from '@pixi/app';
2021-07-30 14:47:36 -04:00
export class PixiApplicationProxy extends Application
2022-10-30 00:02:19 -04:00
{
private static INSTANCE: Application = null;
constructor(options?: IApplicationOptions)
{
super(options);
2022-11-02 18:44:30 -04:00
if(!PixiApplicationProxy.INSTANCE) PixiApplicationProxy.INSTANCE = this;
2022-10-30 00:02:19 -04:00
}
public static get instance(): Application
{
return this.INSTANCE || null;
}
}