donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.43k stars 150 forks source link

Add power-of-two options to textureCompress() #1221

Closed donmccurdy closed 11 months ago

donmccurdy commented 11 months ago

Example:

import { textureCompress } from '@gltf-transform/functions';
import sharp from 'sharp';

await document.transform(
    textureCompress({encoder: sharp, resize: 'nearest-pot'})
);