@shapediver/sdk.sdtf-v1
Version:
Official sdTF SDK for TypeScript
28 lines • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SdtfConstructor = void 0;
const SdtfBinarySdtf_1 = require("../binary_sdtf/SdtfBinarySdtf");
const SdtfComponentFactoryWrapper_1 = require("../structure/SdtfComponentFactoryWrapper");
const SdtfWriteableComponentFactory_1 = require("./SdtfWriteableComponentFactory");
const SdtfWriteableComponentPostProcessor_1 = require("./SdtfWriteableComponentPostProcessor");
const SdtfWriter_1 = require("./SdtfWriter");
class SdtfConstructor {
constructor(integration) {
this.binarySdtf = new SdtfBinarySdtf_1.SdtfBinarySdtf();
this.factory = new SdtfComponentFactoryWrapper_1.SdtfComponentFactoryWrapper();
this.postProcessor = new SdtfWriteableComponentPostProcessor_1.SdtfWriteableComponentPostProcessor(integration);
}
createBinarySdtf(asset) {
const writeableList = this.postProcessor.optimize(asset);
const componentList = this.factory.createFromWriteable(writeableList);
return this.binarySdtf.constructBinarySdtf(componentList);
}
getFactory() {
return new SdtfWriteableComponentFactory_1.SdtfWriteableComponentFactory();
}
getWriter() {
return new SdtfWriter_1.SdtfWriter(this.getFactory());
}
}
exports.SdtfConstructor = SdtfConstructor;
//# sourceMappingURL=SdtfConstructor.js.map