Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.06 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.06 KB

ktx2-encoder

Latest NPM release License

This is a simple tool to convert images to KTX2(.ktx2) format. Ported from BinomialLLC/basis_universal.

Quick Start

Install:

npm install --save ktx2-encoder

Import:

import { encodeToKTX2, encodeKTX2Cube } from 'ktx2-encoder';

Usage:

// encode a 2D image
encodeToKTX2(data /** ArrayBuffer of png */, options);
// encode a cube map
encodeKTX2Cube([data, ...] /** ArrayBuffer of png */, options);

See options API documentation for more details.

Tool

  1. Start server
npm run dev
  1. Open the page,default is http://localhost:5174/

  2. Use it! Select your images and encode it to ktx2lock