Skip to content

Converting a texture image into ProtonSDK (rttex) standard texture.

License

Notifications You must be signed in to change notification settings

StileDevs/RTPackJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTPackJS

Converting a texture image into ProtonSDK standard texture.

Requirements

  • Node.js v14+

Installing

npm

npm install rtpackjs

or using yarn

yarn add rtpackjs

Example

const { RTTEX } = require("rtpackjs");
const { writeFileSync, readFileSync } = require("fs");

const sample = readFileSync("./test/image.rttex");

(async () => {
  const decoded = await RTTEX.decode(sample);
  writeFileSync("./test/image.png", decoded);

  const encoded = await RTTEX.encode(decoded);
  writeFileSync("./test/new_image.rttex", encoded);
})();

(async () => {
  const rttex = new RTTEX(sample);

  console.log(rttex);
  console.log(rttex.parseRTPACK());
  console.log(rttex.parseRTTXTR());
})();

Credits

About

Converting a texture image into ProtonSDK (rttex) standard texture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published