Index of every page on this site: llms.txt
All skills
jyasuu avatar

/remotion-best-practices

@d3e2684
Run it yourself

Best practices for Remotion - Video creation in React

  • 32 files
  • 76.1 KB
  • Updated 10 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/jyasuu/cheat-sheet/remotion-best-practices

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

rulescharts.md

≈438 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Charts in Remotion

You can create bar charts in Remotion by using regular React code - HTML and SVG is allowed, as well as D3.js.

No animations not powered by useCurrentFrame()

Disable all animations by third party libraries.
They will cause flickering during rendering.
Instead, drive all animations from useCurrentFrame().

Bar Chart Animations

See Bar Chart Example for a basic example implmentation.

Staggered Bars

You can animate the height of the bars and stagger them like this:

const STAGGER_DELAY = 5;
const frame = useCurrentFrame();
const {fps} = useVideoConfig();

const bars = data.map((item, i) => {
  const delay = i * STAGGER_DELAY;
  const height = spring({
    frame,
    fps,
    delay,
    config: {damping: 200},
  });
  return <div style={{height: height * item.value}} />;
});

Pie Chart Animation

Animate segments using stroke-dashoffset, starting from 12 o'clock.

const frame = useCurrentFrame();
const {fps} = useVideoConfig();

const progress = interpolate(frame, [0, 100], [0, 1]);

const circumference = 2 * Math.PI * radius;
const segmentLength = (value / total) * circumference;
const offset = interpolate(progress, [0, 1], [segmentLength, 0]);

<circle r={radius} cx={center} cy={center} fill="none" stroke={color} strokeWidth={strokeWidth} strokeDasharray={`${segmentLength} ${circumference}`} strokeDashoffset={offset} transform={`rotate(-90 ${center} ${center})`} />;

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at d3e2684. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 10 months ago
metadata
{
  "tags": "remotion, video, react, animation, composition"
}

README badge

README badge for jyasuu/cheat-sheet/remotion-best-practices