🎥 Make videos programmatically with React
Fix batched path keyframes and preserve curves during interpolation
Jonny Burger57f6364cebd4
diff --git a/packages/codemods/src/sequence-props/imports.ts b/packages/codemods/src/sequence-props/imports.tsindex 4293791044..a539646ea9 100644--- a/packages/codemods/src/sequence-props/imports.ts+++ b/packages/codemods/src/sequence-props/imports.ts@@ -104,7 +104,7 @@ export const ensureNamedImport = ({if (existingImport) {const importSpecifier = b.importSpecifier(b.identifier(importedName),- localName === importedName ? null : b.identifier(localName),+ b.identifier(localName),) as unknown as ImportSpecifier;existingImport.specifiers = [@@ -116,7 +116,7 @@ export const ensureNamedImport = ({const specifier = b.importSpecifier(b.identifier(importedName),- localName === importedName ? null : b.identifier(localName),+ b.identifier(localName),) as unknown as ImportSpecifier;const importDeclaration = b.importDeclaration([specifier as never],diff --git a/packages/docs/docs/paths/interpolate-paths.mdx b/packages/docs/docs/paths/interpolate-paths.mdxindex 6459baed7f..fb17efaa30 100644--- a/packages/docs/docs/paths/interpolate-paths.mdx+++ b/packages/docs/docs/paths/interpolate-paths.mdx@@ -53,7 +53,7 @@ A non-empty array of finite numbers in strictly increasing order. Each value corAn array of valid SVG path strings with the same length as `inputRange`. Paths may have different numbers of points. A single keyframe returns its path for every input.-When spring tails blend more than two paths at once, their subpaths must have matching move and close commands after normalization.+Interpolated paths must have matching move and close commands in their subpaths after normalization. When interpolating between a curve and a line, the curve gradually straightens into the line.### options?diff --git a/packages/paths/src/interpolate-paths.ts b/packages/paths/src/interpolate-paths.tsindex 664dab6f85..d6a21f6516 100644--- a/packages/paths/src/interpolate-paths.ts+++ b/packages/paths/src/interpolate-paths.ts@@ -7,7 +7,6 @@ import {getEndPosition} from './get-end-position';import type {ReducedInstruction} from './helpers/types';import {convertToSameInstructionType} from './interpolate-path/convert-to-same-instruction-type';import {extendInstruction} from './interpolate-path/extend-command';-import {interpolatePath} from './interpolate-path/interpolate-path';import {parsePath} from './parse-path';import {reduceInstructions} from './reduce-instructions';import {serializeInstructions} from './serialize-instructions';@@ -88,16 +87,6 @@ export const interpolatePaths = (const contributingPaths = outputRange.map((path, index) => ({path, weight: weights[index]})).filter(({weight}) => weight !== 0);- if (contributingPaths.length === 2) {- return normalizeInterpolatedPath(- interpolatePath(- contributingPaths[1].weight,- contributingPaths[0].path,- contributingPaths[1].path,- ),- );- }-const paths = contributingPaths.map(({path}) => {const commands = reduceInstructions(parsePath(path));if (commands.length === 0) {