Move to Renderer V2

This commit is contained in:
duckietm
2024-04-03 09:27:56 +02:00
parent 110c3ad393
commit b3134ce50b
4080 changed files with 115593 additions and 66375 deletions
+19
View File
@@ -0,0 +1,19 @@
import { IImageResult } from '@nitrots/api';
import { TextureUtils } from '@nitrots/utils';
import { Texture } from 'pixi.js';
export class ImageResult implements IImageResult
{
public id: number = 0;
public data: Texture = null;
public image: HTMLImageElement = null;
public async getImage(): Promise<HTMLImageElement>
{
if(this.image) return this.image;
if(!this.data) return null;
return await TextureUtils.generateImage(this.data);
}
}