Skip to main content

ktxPath

Typestring
DefaultUNPKG CDN

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.

ModelBefore CompressionAfter Compression (Used gltfpack's -tc -cc flag)
Korean Fire Extinguisher 015.71MB4.13MB (-27.67%)
caution

Note that SceneViewer AR session can't handle models with KHR_texture_basisu enabled.

Example

{
src: "/egjs-view3d/model/meshopt/extinguisher.glb",
ktxPath: "/egjs-view3d/lib/basis/"
}