Skip to content

glb 模型压缩可以用 glTF Transform 的 CLI #3

Description

@yaun369

使用 glTF Transform 的 CLI,一行命令同时做 Draco 几何压缩 + WebP 贴图压缩,把 input.glb 压成可上线的 glb

npx @gltf-transform/cli optimize input.glb output.glb \
  --texture-compress webp --compress draco

本地实测一个混元 3D 生成的 80 MB 的线粒体原始模型可以压到 2 MB,肉眼几乎无损。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions