ktxPath
URL to KTX2 transcoder location.
Transcoder will be loaded with the given location if the glTF model has the KHR_texture_basisu extension.
By default, KTX2 transcoder will be loaded from unpkg CDN.
https://unpkg.com/three@0.134.0/examples/js/libs/basis/
Using Basis Universal supercompression can decrease model's texture file sizes.
The table below compares the before and after compression of the example model below.
| Model | Before Compression | After Compression (Used gltfpack's -tc -cc flag) | 
|---|---|---|
| Korean Fire Extinguisher 01 | 5.71MB | 4.13MB (-27.67%) | 
caution
Note that SceneViewer AR session can't handle models with KHR_texture_basisu enabled.
Example
- JSON
 - JavaScript
 - React
 - Angular
 - Vue@2
 - Vue@3
 - Svelte
 
{
    src: "/egjs-view3d/model/meshopt/extinguisher.glb",
    ktxPath: "/egjs-view3d/lib/basis/"
}