@majesticfudgie/txd-reader
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

README COMING SOOOON

Here's a quick demo of how to read all the textures from a TXD file and save a PNG to disk per texture:

const inputFile = "txd/bballcpark1.txd";

const filePath = path.join(__dirname, "..", inputFile);
const rawData = fs.readFileSync(filePath);

const reader = new TXDReader(rawData);

for (let textureName of reader.textureList) {
	const png = reader.getPNG(textureName);
	if (png) {
		fs.writeFileSync(`out/${textureName}.png`, png);
	}
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.32latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.32
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @majesticfudgie/txd-reader

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

107 kB

Total Files

67

Last publish

Collaborators

  • majesticfudgie