novaparse
Version:
An EV Nova file parser for NovaJS
25 lines • 725 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const NovaResourceBase_1 = require("./NovaResourceBase");
const PICTParse_1 = require("./PICTParse");
class PNGError extends Error {
}
exports.PNGError = PNGError;
;
class PictResource extends NovaResourceBase_1.BaseResource {
constructor(resource, idSpace) {
super(resource, idSpace);
}
get png() {
var PICT;
try {
PICT = new PICTParse_1.PICTParse(this.data);
}
catch (e) {
throw new PNGError("PICT id " + this.id + " failed to parse: " + e.message);
}
return PICT.PNG;
}
}
exports.PictResource = PictResource;
//# sourceMappingURL=PictResource.js.map