本地处理
GLB 压缩器
待选择文件
Meshopt 网格压缩需要服务器接口。请通过 http/https 地址打开本页,不要直接打开 index.html。
原始
-
压缩后
-
节省
-
贴图体积
-
非贴图体积
-
贴图数
-
选择文件后会显示体积构成。
处理记录
- 等待 GLB 文件。
网页展示预览
Meshopt 输出面向 WebGL / Three.js 传输,压完会在这里直接加载。
Three.js 加载要点
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { MeshoptDecoder } from 'meshoptimizer/meshopt_decoder.module.js';
const loader = new GLTFLoader();
loader.setMeshoptDecoder(MeshoptDecoder);
loader.load('/models/model.compressed.glb', (gltf) => {
scene.add(gltf.scene);
});