makeHeart()
Part of the @remotion/shapes
package.
Generates an SVG path for a heart.
Example
make-heart.tsts
import {makeHeart } from '@remotion/shapes';const {path ,width ,height ,transformOrigin ,instructions } =makeHeart ({size : 100,});console .log (path ); // M 100 120 C 40 110 20 70 60 60 C 90 40 110 40 140 60 C 180 70 160 110 100 120 Zconsole .log (width ); // 200console .log (height ); // 160console .log (transformOrigin ); // "100 80"console .log (instructions ); // Instruction[]
Arguments
size
number
The size of the heart.
Return type
The function returns an object with the following properties:
path
: The SVG path stringwidth
: The width of the heartheight
: The height of the hearttransformOrigin
: The transform origin of the heartinstructions
: An array of path instructions