🎥 Make videos programmatically with React
Update get-frame-padded-index.ts
Jonny Burgeraadbf32b23cd
diff --git a/packages/renderer/src/get-frame-padded-index.ts b/packages/renderer/src/get-frame-padded-index.tsindex 9a6bd8520f..7a6753a1f3 100644--- a/packages/renderer/src/get-frame-padded-index.ts+++ b/packages/renderer/src/get-frame-padded-index.ts@@ -30,18 +30,20 @@ export const getFrameOutputFileName = ({countType: CountType;lastFrame: number;totalFrames: number;- type: 'element' | 'composed';+ type: 'layer' | 'composed';}) => {const filePadLength = getFilePadLength({lastFrame, countType, totalFrames});+ const prefix = type === 'layer' ? 'layer-' : 'element-';+if (countType === 'actual-frames') {const paddedIndex = padIndex({filePadLength, num: frame});- return `${type}-${paddedIndex}.${imageFormat}`;+ return `${prefix}-${paddedIndex}.${imageFormat}`;}if (countType === 'from-zero') {const paddedIndex = padIndex({filePadLength, num: index});- return `${type}-${paddedIndex}.${imageFormat}`;+ return `${prefix}-${paddedIndex}.${imageFormat}`;}throw new TypeError('Unknown count type');