Live demo: gltf/index.html
Renders a glTF 3D model with .basis
texture files, transcoded into one of the following compressed texture formats:
The glTF model in this demo uses a hypothetical GOOGLE_texture_basis
extension. That extension is defined for the sake of example only - the glTF format will officially embed Basis files within a KTX2 wrapper, through a new extension that is currently in development.
Live demo: `ktx2_encode_test/index.html'
This demo shows how to use the compressor from JavaScript. To use it, select a .PNG file then hit the “Encode!” button. The compressor will dynamically generate a .ktx2 file in memory which will then be immediately transcoded and displayed. Hit the “Download!” button to locally download the generated .ktx2 file.
To view the compressor‘s textual debug output, open your browser’s developer debug console (under Developer Tools in Chrome) and enable the Debug checkbox before hitting the “Encode!” button. Multithreading is not currently supported when the compressor is compiled to WebAssembly, so compression will be slower than using the stand-alone command line tool.
You can locally host the files under the “webgl” folder. One way is to use Python to setup a local webserver in the ‘webgl’ directory:
cd webgl python3 -m http.server 8000