A WebGL demo rendering a glTF 3D model with .basis
texture files transcoded into one of the following compressed texture format:
Note the glTF model is using a temperoray hypothetical extension at this moment. It should rely on a KTX2 wrapper when offically released.
Launuch an http server under webgl/gltf-demo/
. For example if you have node installed you can install http-server
globally and run
http-server
Go to localhost:8080
in your browser (which should supports WebAssembly and WebGL).
If you connect your mobile and PC (hosting the http server) to the same Wifi, you might be able to access the http server directly from the browser on your mobile.
For example:
$ http-server Starting up http-server, serving ./ Available on: http://127.0.0.1:8080 http://100.99.17.28:8080 Hit CTRL-C to stop the server
Go to 100.99.17.28:8080
in your mobile browser (which should supports WebAssembly and WebGL).
Or you can remote debugging your android devices
A prebuild of basis_transcoder.js
and basis_transcoder.wasm
is already included to run the demo. You only want to follow this part if you want to build the basis transcoder locally.
Install emscripten (tutorial) and cmake (download) if you haven't yet.
Run the following instructions under webgl/gltf-demo/wasm/build/
emcmake cmake ../ make