Skip to content

Commit 9c80072

Browse files
committed
fix
1 parent 1ae6094 commit 9c80072

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2270
-1657
lines changed

.ami/skills/remotion-best-practices/rules/3d.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ const { width, height } = useVideoConfig();
4040
<sphereGeometry args={[1, 32, 32]} />
4141
<meshStandardMaterial color="red" />
4242
</mesh>
43-
</ThreeCanvas>
43+
</ThreeCanvas>;
4444
```
4545

4646
## No animations not driven by `useCurrentFrame()`
4747

4848
Shaders, models etc MUST NOT animate by themselves.
4949
No animations are allowed unless they are driven by `useCurrentFrame()`.
50-
Otherwise, it will cause flickering during rendering.
50+
Otherwise, it will cause flickering during rendering.
5151

5252
Using `useFrame()` from `@react-three/fiber` is forbidden.
5353

@@ -62,7 +62,7 @@ const rotationY = frame * 0.02;
6262
<mesh rotation={[0, rotationY, 0]}>
6363
<boxGeometry args={[2, 2, 2]} />
6464
<meshStandardMaterial color="#4a9eff" />
65-
</mesh>
65+
</mesh>;
6666
```
6767

6868
## Using `<Sequence>` inside `<ThreeCanvas>`
@@ -82,5 +82,5 @@ const { width, height } = useVideoConfig();
8282
<meshStandardMaterial color="#4a9eff" />
8383
</mesh>
8484
</Sequence>
85-
</ThreeCanvas>
86-
```
85+
</ThreeCanvas>;
86+
```

.ami/skills/remotion-best-practices/rules/animations.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ export const FadeIn = () => {
1616
const { fps } = useVideoConfig();
1717

1818
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
19-
extrapolateRight: 'clamp',
19+
extrapolateRight: "clamp",
2020
});
21-
22-
return (
23-
<div style={{ opacity }}>Hello World!</div>
24-
);
21+
22+
return <div style={{ opacity }}>Hello World!</div>;
2523
};
2624
```
2725

2826
CSS transitions or animations are FORBIDDEN - they will not render correctly.
29-
Tailwind animation class names are FORBIDDEN - they will not render correctly.
27+
Tailwind animation class names are FORBIDDEN - they will not render correctly.

.ami/skills/remotion-best-practices/rules/assets.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Place assets in the `public/` folder at your project root.
1616
You MUST use `staticFile()` to reference files from the `public/` folder:
1717

1818
```tsx
19-
import {Img, staticFile} from 'remotion';
19+
import { Img, staticFile } from "remotion";
2020

2121
export const MyComposition = () => {
22-
return <Img src={staticFile('logo.png')} />;
22+
return <Img src={staticFile("logo.png")} />;
2323
};
2424
```
2525

@@ -30,35 +30,35 @@ The function returns an encoded URL that works correctly when deploying to subdi
3030
**Images:**
3131

3232
```tsx
33-
import {Img, staticFile} from 'remotion';
33+
import { Img, staticFile } from "remotion";
3434

35-
<Img src={staticFile('photo.png')} />;
35+
<Img src={staticFile("photo.png")} />;
3636
```
3737

3838
**Videos:**
3939

4040
```tsx
41-
import {Video} from '@remotion/media';
42-
import {staticFile} from 'remotion';
41+
import { Video } from "@remotion/media";
42+
import { staticFile } from "remotion";
4343

44-
<Video src={staticFile('clip.mp4')} />;
44+
<Video src={staticFile("clip.mp4")} />;
4545
```
4646

4747
**Audio:**
4848

4949
```tsx
50-
import {Audio} from '@remotion/media';
51-
import {staticFile} from 'remotion';
50+
import { Audio } from "@remotion/media";
51+
import { staticFile } from "remotion";
5252

53-
<Audio src={staticFile('music.mp3')} />;
53+
<Audio src={staticFile("music.mp3")} />;
5454
```
5555

5656
**Fonts:**
5757

5858
```tsx
59-
import {staticFile} from 'remotion';
59+
import { staticFile } from "remotion";
6060

61-
const fontFamily = new FontFace('MyFont', `url(${staticFile('font.woff2')})`);
61+
const fontFamily = new FontFace("MyFont", `url(${staticFile("font.woff2")})`);
6262
await fontFamily.load();
6363
document.fonts.add(fontFamily);
6464
```

0 commit comments

Comments
 (0)