mdx-m3-viewer
Version:
A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.
17 lines • 542 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const searches_1 = require("../../common/searches");
/**
* Detects if the given object is a TGA source.
*/
function isTga(bytes) {
if (bytes instanceof ArrayBuffer) {
bytes = new Uint8Array(bytes);
}
if (bytes instanceof Uint8Array && (0, searches_1.isStringInBytes)(bytes, 'TRUEVISION-XFILE.\0', bytes.length - 18)) {
return true;
}
return false;
}
exports.default = isTga;
//# sourceMappingURL=isformat.js.map