Basis Universal GPU Texture Codec.
This is a React Native wrapper around the Basis Universal library.
For documentation on the Basis Universal library, see the official documentation.
yarn add @callstack/react-native-basis-universal
import {
initializeBasis,
BasisEncoder,
KTX2File,
BasisFile,
} from '@callstack/react-native-basis-universal';
initializeBasis();
const basisFile = new BasisFile(new Uint8Array(image));
const width = basisFile.getImageWidth(0, 0);
const height = basisFile.getImageHeight(0, 0);
const images = basisFile.getNumImages();
const levels = basisFile.getNumLevels(0);
const has_alpha = basisFile.getHasAlpha();
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library