mdx-m3-viewer
Version:
A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.
18 lines (14 loc) • 467 B
text/typescript
import ModelViewer from '../../viewer';
import Texture from './texture';
export default {
load(viewer: ModelViewer) {
let webgl = viewer.webgl;
// Optionally used when decoding mipmaps.
if (!webgl.ensureExtension('WEBGL_compressed_texture_s3tc')) {
console.warn('DDS: No compressed textures support! This might reduce performance.');
}
return true;
},
extensions: [['.dds', 'arrayBuffer']],
resource: Texture,
};