Skip to content

Commit

Permalink
remove dup code
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital committed Apr 22, 2024
1 parent c0f94ef commit d212bd6
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions packages/manifest/src/pixiManifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<PixiManifestOptions>
{
const defaultOptions = {
Expand Down

0 comments on commit d212bd6

Please sign in to comment.