From d212bd65c05fd2607d3ecec304a37429ee02db1f Mon Sep 17 00:00:00 2001 From: Mat Groves Date: Mon, 22 Apr 2024 14:11:14 +0100 Subject: [PATCH] remove dup code --- packages/manifest/src/pixiManifest.ts | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/packages/manifest/src/pixiManifest.ts b/packages/manifest/src/pixiManifest.ts index 9c668a5..b3f6d5c 100644 --- a/packages/manifest/src/pixiManifest.ts +++ b/packages/manifest/src/pixiManifest.ts @@ -63,36 +63,6 @@ export class AtlasView } } -// TODO EXPORT this out! But don't want to create a dependency on the atlas plugin just yet.. -export class AtlasView -{ - public rawAtlas: string; - - constructor(buffer: Buffer) - { - this.rawAtlas = buffer.toString(); - } - - getTextures(): string[] - { - const regex = /^.+?(?:\.png|\.jpg|\.jpeg|\.webp|\.avif)$/gm; - - const matches = this.rawAtlas.match(regex); - - return matches as string[]; - } - - replaceTexture(filename: string, newFilename: string) - { - this.rawAtlas = this.rawAtlas.replace(filename, newFilename); - } - - get buffer() - { - return Buffer.from(this.rawAtlas); - } -} - export function pixiManifest(_options: PixiManifestOptions = {}): AssetPipe { const defaultOptions = {