visgl / loaders.gl

Loaders for big data visualization. Website:

Home Page:https://loaders.gl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

set setMeshoptDecoder when using gltfloader?

IDONKN opened this issue · comments

commented

import { MeshoptDecoder } from './meshopt_decoder.module.js';

...

var loader = new GLTFLoader();
loader.setMeshoptDecoder(MeshoptDecoder);
loader.load('pirate.glb', function (gltf) { scene.add(gltf.scene); });

There are no such functions (loader.load(), loader.setMeshoptDecoder() in loaders.gl. It looks like you are using THREE.js and perhaps you want to ask there?

Meshopt should be supported out of the box.

import (load} from '@loaders.gl/core';
import {GLTFLoader} from '@loaders.gl/gltf';
const gltf = load(url, GLTFLoader);
commented

Got it, thank you for your help~