createSmoothSvgPath()
Part of the @remotion/media-utils
package of helper functions.
This function takes points, usually generated from visualizeAudioWaveform()
or visualizeAudio()
, and adds SVG C
(curve) statements inbetween them to create a smooth path.
Example
tsx
import {createSmoothSvgPath } from '@remotion/media-utils';importReact from 'react';constpoints = [{x : 0,y : 0},{x : 100,y : 100},{x : 200,y : 50},{x : 300,y : 150},];constpath =createSmoothSvgPath ({points });
See a practical example here.