clumsy-graphics
Version:
a tool for rapidly developing animations where frames are described using svg elements à la react 🙃
22 lines (21 loc) • 944 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderAnimationModuleFrame = void 0;
const getAnimationModule_1 = require("../helpers/getAnimationModule");
const getAnimationModuleBundle_1 = require("../helpers/getAnimationModuleBundle");
const renderAnimationFrame_1 = require("../helpers/renderAnimationFrame");
async function renderAnimationModuleFrame(api) {
const { animationModulePath, frameFileOutputPath, frameIndex } = api;
const { animationModuleBundle } = await (0, getAnimationModuleBundle_1.getAnimationModuleBundle)({
animationModulePath,
});
const animationModule = await (0, getAnimationModule_1.getAnimationModule)({
animationModuleBundle,
});
await (0, renderAnimationFrame_1.renderAnimationFrame)({
frameFileOutputPath,
frameIndex,
animationModule,
});
}
exports.renderAnimationModuleFrame = renderAnimationModuleFrame;