Do near-final touches, should of done this last commit but oh well.

Actually made C6JS C6JS and not node-specific. Didn't know there was a difference.
This commit is contained in:
yellows111 2023-11-28 12:52:34 +01:00
parent 4e27befc6f
commit 95172cf285
3 changed files with 51 additions and 41 deletions

View File

@ -28,3 +28,11 @@ A JavaScript library (sorta) to read PS2 icons, and their related formats.
## 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. |

View File

@ -590,13 +590,14 @@ function readSharkXPortSxpsFile(input) {
return fsOut;
}
/** If we have a module object, define module.exports with all public functions */
if(typeof module !== "undefined") {
// for C6JS
module.exports = {
/** 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") {
module.exports = exports;
}

View File

@ -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;}
</style>
<meta data-comment="WebGL Shader: Icon">
<script type="text/plain" id="shader-icon-v">
@ -631,9 +632,9 @@
}
//todo: More than one model shape rendering, other 2 icons (technically done? NMW though), Animation parsing, animation tweening
</script>
<span id="version">icondumper2 <span id="iconjsVersion">(unknown icon.js version)</span> [C: <span id="clientVersion">Loading...</span>] &mdash; &copy; <span id="currentYear">2023</span> yellows111</span>
<span id="version">icondumper2 <a href="./documentation" id="iconjsVersion">(unknown icon.js version)</a> [C: <span id="clientVersion">Loading...</span>] &mdash; &copy; <span id="currentYear">2023</span> yellows111</span>
<script>
document.getElementById("iconjsVersion").textContent = ICONJS_VERSION;
document.getElementById("iconjsVersion").textContent = exports.version;
document.getElementById("clientVersion").textContent = "0.6.5";
document.getElementById("currentYear").textContent = (new Date()).getFullYear().toString();
</script>