@loaders.gl/textures
Version:
Framework-independent loaders for compressed and super compressed (basis) textures
24 lines • 942 B
JavaScript
// loaders.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { VERSION } from "./lib/utils/version.js";
import { parseCompositeImageManifest, testCompositeImageManifestShape } from "./lib/composite-image/parse-composite-image.js";
export const TextureLoader = {
dataType: null,
batchType: null,
id: 'texture',
name: 'Texture',
module: 'textures',
version: VERSION,
extensions: [],
mimeTypes: [],
text: true,
worker: false,
testText: (text) => testCompositeImageManifestShape(text, 'image-texture'),
options: {
image: {}
},
parse: async (arrayBuffer, options, context) => await parseCompositeImageManifest(new TextDecoder().decode(arrayBuffer), 'image-texture', options, context),
parseText: async (text, options, context) => await parseCompositeImageManifest(text, 'image-texture', options, context)
};
//# sourceMappingURL=texture-loader.js.map