nitro-renderer/src/pixi-proxy/PixiApplicationProxy.ts
2022-11-02 18:44:30 -04:00

19 lines
433 B
TypeScript

import { Application, IApplicationOptions } from '@pixi/app';
export class PixiApplicationProxy extends Application
{
private static INSTANCE: Application = null;
constructor(options?: IApplicationOptions)
{
super(options);
if(!PixiApplicationProxy.INSTANCE) PixiApplicationProxy.INSTANCE = this;
}
public static get instance(): Application
{
return this.INSTANCE || null;
}
}