|
@@ -20,15 +20,15 @@ The folder contains two files required for transcoding `.basis` or `.ktx2` textu
|
|
* `basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder.
|
|
* `basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder.
|
|
* `basis_transcoder.wasm` — WebAssembly transcoder.
|
|
* `basis_transcoder.wasm` — WebAssembly transcoder.
|
|
|
|
|
|
-Both are dependencies of `THREE.KTX2Loader` and `THREE.BasisTextureLoader`:
|
|
|
|
|
|
+Both are dependencies of `KTX2Loader`:
|
|
|
|
|
|
```js
|
|
```js
|
|
-var ktx2Loader = new THREE.KTX2Loader();
|
|
|
|
|
|
+const ktx2Loader = new KTX2Loader();
|
|
ktx2Loader.setTranscoderPath( 'examples/jsm/libs/basis/' );
|
|
ktx2Loader.setTranscoderPath( 'examples/jsm/libs/basis/' );
|
|
ktx2Loader.detectSupport( renderer );
|
|
ktx2Loader.detectSupport( renderer );
|
|
ktx2Loader.load( 'diffuse.ktx2', function ( texture ) {
|
|
ktx2Loader.load( 'diffuse.ktx2', function ( texture ) {
|
|
|
|
|
|
- var material = new THREE.MeshStandardMaterial( { map: texture } );
|
|
|
|
|
|
+ const material = new THREE.MeshStandardMaterial( { map: texture } );
|
|
|
|
|
|
}, function () {
|
|
}, function () {
|
|
|
|
|