https://github.com/stiledevs/rtpackjs
Converting a texture image into ProtonSDK (rttex) standard texture.
https://github.com/stiledevs/rtpackjs
Last synced: 12 months ago
JSON representation
Converting a texture image into ProtonSDK (rttex) standard texture.
- Host: GitHub
- URL: https://github.com/stiledevs/rtpackjs
- Owner: StileDevs
- License: mit
- Created: 2023-01-05T18:33:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-26T01:54:15.000Z (about 3 years ago)
- Last Synced: 2025-07-19T11:33:22.039Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 356 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```js
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
- [ProtonSDK](https://github.com/SethRobinson/proton/)
- [ZTzTopia (RTTEXConverterJS)](https://github.com/ZTzTopia/RTTEXConverterJS)
- [GuckTubeYT (RTTEXConverter)](https://github.com/GuckTubeYT/RTTEXConverter)