Skip to main content


Typestring | null

URL to Meshoptimizer decoder js path.

It adds an ability to decode 3D models with EXT_meshopt_compression enabled.
Decoder will be loaded on View3D's initialization, so you should set decoder path before initialization.
It's null by default, which means it won't handle such models.
Quick fix is to use the CDN below.

Similar to Draco, meshopt can compress the geometry data of the 3D model.
The table below compares the before and after compression of the example model below.

ModelBefore CompressionAfter Compression (Used gltfpack's -tc -cc flag)
Vintage Pocket Watch5.95MB1.37MB (-76.97%)

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


src: "/egjs-view3d/model/meshopt/watch.glb",
meshoptPath: "/egjs-view3d/lib/meshopt_decoder.js"