diff --git a/README.md b/README.md index 4ad5aa1..a1c678f 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,38 @@ -# icondumper2 (working title) -A JavaScript library (sorta) to read PS2 icons, and their related formats. - -## What it supports -* EMS Memory Adapter export files (.psu) -* PS3 virtual memory card export files (.psv) -* SharkPort export files (.sps) -* X-Port export files (.xps) -* PS2 icons (.ico, .icn) -* PS2D format (icon.sys) - -## What can it do -* Allow any file in a PSU's or SPS/XPS's virtual filesystem to be dumped. -* Warn of invalid icon.sys display names. -* Read and parse an EMS MA export file. -* Export the icon model, with all seperate shapes included to a JavaScript Object. -* Node.js compatible (CommonJS) exporting while still being compatible with other JavaScript implementations. -* Convert a 128x128x16 BGR5A1 bitmap to a RGB5A1 format. -* Convert an icon or a set of icons to glTF, with textures. - -## What it doesn't do -* (Re)build save files. -* Modify the original input files. -* Use any Node.js-exclusive features. - -## Client compatibility -(todo: write this) - -## Why "icondumper2"? -Because it replaced what *was* left of icondumper (1). +# icondumper2 (working title) +A JavaScript library (sorta) to read PS2 icons, and their related formats. + +## What it supports +* EMS Memory Adapter export files (.psu) +* PS3 virtual memory card export files (.psv) +* SharkPort export files (.sps) +* X-Port export files (.xps) +* PS2 icons (.ico, .icn) +* PS2D format (icon.sys) + +## What can it do +* Allow any file in a PSU's or SPS/XPS's virtual filesystem to be dumped. +* Warn of invalid icon.sys display names. +* Read and parse an EMS MA export file. +* Export the icon model, with all seperate shapes included to a JavaScript Object. +* Node.js compatible (CommonJS) exporting while still being compatible with other JavaScript implementations. +* Convert a 128x128x16 BGR5A1 bitmap to a RGB5A1 format. +* Convert an icon or a set of icons to glTF, with textures. + +## What it doesn't do +* (Re)build save files. +* Modify the original input files. +* Use any Node.js-exclusive features. + +## Client compatibility +(todo: write this) + +## Why "icondumper2"? +Because it replaced what *was* left of icondumper (1). + +## Included files +| File | Description | +| ---- | ----------------------------------------- | +| icon.js | The library itself. | +| index.js | Node.js example client. | +| gltf-exporter.js | Node.js client to export icons to glTF 2. | +| index.htm | HTML reference client. | diff --git a/icon.js b/icon.js index 5e950a6..0c9c2f1 100644 --- a/icon.js +++ b/icon.js @@ -590,13 +590,14 @@ function readSharkXPortSxpsFile(input) { return fsOut; } -/** If we have a module object, define module.exports with all public functions */ +/** Define (module.)exports with all public functions */ +exports = { + readers: {readIconFile, readPS2D, readEmsPsuFile, readPsvFile, readSharkXPortSxpsFile}, + helpers: {uncompressTexture, convertBGR5A1toRGB5A1}, + options: {setDebug, setStrictness}, + version: ICONJS_VERSION +}; + if(typeof module !== "undefined") { - // for C6JS - module.exports = { - readers: {readIconFile, readPS2D, readEmsPsuFile, readPsvFile, readSharkXPortSxpsFile}, - helpers: {uncompressTexture, convertBGR5A1toRGB5A1}, - options: {setDebug, setStrictness}, - version: ICONJS_VERSION - }; + module.exports = exports; } diff --git a/input.htm b/index.htm similarity index 98% rename from input.htm rename to index.htm index 6cc891b..985f7a5 100644 --- a/input.htm +++ b/index.htm @@ -19,6 +19,7 @@ #titlebox {width: 99%;position: absolute;} input[type="file"] {line-height: 2em;} #version {text-shadow: 1px 1px 2px black;} + a {color: #ccc;} - icondumper2 (unknown icon.js version) [C: Loading...] — © 2023 yellows111 + icondumper2 (unknown icon.js version) [C: Loading...] — © 2023 yellows111 - \ No newline at end of file +