create-rendiv 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/template/package.json.tmpl +3 -3
- package/package.json +2 -2
- package/dist/template/template/package.json.tmpl +0 -26
- package/dist/template/template/src/MyVideo.tsx +0 -34
- package/dist/template/template/src/index.tsx +0 -16
- package/dist/template/template/tsconfig.json +0 -13
- package/dist/template/template/vite.config.ts +0 -6
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"compositions": "rendiv compositions src/index.tsx"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@rendiv/core": "^0.
|
|
14
|
-
"@rendiv/player": "^0.
|
|
15
|
-
"@rendiv/cli": "^0.
|
|
13
|
+
"@rendiv/core": "^0.2.0",
|
|
14
|
+
"@rendiv/player": "^0.2.0",
|
|
15
|
+
"@rendiv/cli": "^0.2.0",
|
|
16
16
|
"react": "^19.0.0",
|
|
17
17
|
"react-dom": "^19.0.0"
|
|
18
18
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rendiv",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Create a new Rendiv video project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@rendiv/tsconfig": "0.0.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "tsc && cp -r src/template dist/template",
|
|
23
|
+
"build": "tsc && rm -rf dist/template && cp -r src/template dist/template",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
25
|
"clean": "rm -rf dist"
|
|
26
26
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{PROJECT_NAME}}",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"preview": "vite dev",
|
|
7
|
-
"studio": "rendiv studio src/index.tsx",
|
|
8
|
-
"render": "rendiv render src/index.tsx MyVideo out/my-video.mp4",
|
|
9
|
-
"still": "rendiv still src/index.tsx MyVideo out/still.png",
|
|
10
|
-
"compositions": "rendiv compositions src/index.tsx"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@rendiv/core": "^0.2.0",
|
|
14
|
-
"@rendiv/player": "^0.2.0",
|
|
15
|
-
"@rendiv/cli": "^0.2.0",
|
|
16
|
-
"react": "^19.0.0",
|
|
17
|
-
"react-dom": "^19.0.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/react": "^19.0.0",
|
|
21
|
-
"@types/react-dom": "^19.0.0",
|
|
22
|
-
"@vitejs/plugin-react": "^4.3.0",
|
|
23
|
-
"vite": "^6.0.0",
|
|
24
|
-
"typescript": "^5.7.0"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useFrame, useCompositionConfig, Fill, interpolate, spring } from '@rendiv/core';
|
|
3
|
-
|
|
4
|
-
export const MyVideo: React.FC = () => {
|
|
5
|
-
const frame = useFrame();
|
|
6
|
-
const { fps, durationInFrames } = useCompositionConfig();
|
|
7
|
-
|
|
8
|
-
const opacity = interpolate(frame, [0, 30], [0, 1]);
|
|
9
|
-
const scale = spring({ frame, fps, config: { damping: 12 } });
|
|
10
|
-
const progress = frame / durationInFrames;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<Fill
|
|
14
|
-
style={{
|
|
15
|
-
background: `linear-gradient(135deg, #0f0f0f ${(1 - progress) * 100}%, #1a1a2e 100%)`,
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
justifyContent: 'center',
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
<h1
|
|
22
|
-
style={{
|
|
23
|
-
color: 'white',
|
|
24
|
-
fontSize: 80,
|
|
25
|
-
fontFamily: 'system-ui, sans-serif',
|
|
26
|
-
opacity,
|
|
27
|
-
transform: `scale(${scale})`,
|
|
28
|
-
}}
|
|
29
|
-
>
|
|
30
|
-
Hello, Rendiv!
|
|
31
|
-
</h1>
|
|
32
|
-
</Fill>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { setRootComponent, Composition } from '@rendiv/core';
|
|
3
|
-
import { MyVideo } from './MyVideo';
|
|
4
|
-
|
|
5
|
-
const Root: React.FC = () => (
|
|
6
|
-
<Composition
|
|
7
|
-
id="MyVideo"
|
|
8
|
-
component={MyVideo}
|
|
9
|
-
durationInFrames={150}
|
|
10
|
-
fps={30}
|
|
11
|
-
width={1920}
|
|
12
|
-
height={1080}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
setRootComponent(Root);
|