Skip to content

williammanco/khronos-texture-container

Repository files navigation

khronos-texture-container

Ported from babylon.khronosTextureContainer - Babylon.js KTXLoader - Three.js

Install

yarn add khronos-texture-container

Example

import KhronosTextureContainer from 'khronos-texture-container'

const ktx = new KhronosTextureContainer( buffer, 1 );

console.log({
  mipmaps: ktx.mipmaps( loadMipmaps ),
  width: ktx.pixelWidth,
  height: ktx.pixelHeight,
  format: ktx.glInternalFormat,
  isCubemap: ktx.numberOfFaces === 6,
  mipmapCount: ktx.numberOfMipmapLevels
});

Build

yarn build

License

MIT

About

porting of babylon.khronosTextureContainer babylon.js and KTXLoader three.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published