@revideo/create 0.3.3-alpha.979 → 0.3.3-final.955
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/package.json +8 -8
- package/template-2d-ts/src/render.ts +2 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revideo/create",
|
|
3
|
-
"version": "0.3.3-
|
|
3
|
+
"version": "0.3.3-final.955+b769002",
|
|
4
4
|
"description": "Quickly scaffold revideo projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "revideo",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"url": "https://github.com/havenhq/revideo.git"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@revideo/2d": "^0.3.3-
|
|
24
|
-
"@revideo/core": "^0.3.3-
|
|
25
|
-
"@revideo/ffmpeg": "^0.3.3-
|
|
26
|
-
"@revideo/renderer": "^0.3.3-
|
|
27
|
-
"@revideo/ui": "^0.3.3-
|
|
28
|
-
"@revideo/vite-plugin": "^0.3.3-
|
|
23
|
+
"@revideo/2d": "^0.3.3-final.955+b769002",
|
|
24
|
+
"@revideo/core": "^0.3.3-final.955+b769002",
|
|
25
|
+
"@revideo/ffmpeg": "^0.3.3-final.955+b769002",
|
|
26
|
+
"@revideo/renderer": "^0.3.3-final.955+b769002",
|
|
27
|
+
"@revideo/ui": "^0.3.3-final.955+b769002",
|
|
28
|
+
"@revideo/vite-plugin": "^0.3.3-final.955+b769002"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"minimist": "^1.2.8",
|
|
32
32
|
"prompts": "^2.4.2"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "b769002f09e1a58f0b3795eedcc6ed1b625654b3"
|
|
35
35
|
}
|
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
import {renderVideo} from '@revideo/renderer';
|
|
2
2
|
|
|
3
|
-
const progressTracker = new Map<number, number>();
|
|
4
|
-
|
|
5
|
-
function trackProgress(id: number, progress: number) {
|
|
6
|
-
progressTracker.set(id, progress);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function printProgress() {
|
|
10
|
-
let line = '';
|
|
11
|
-
for (const [key, value] of progressTracker.entries()) {
|
|
12
|
-
line += `${key}: ${(value * 100).toFixed(0)}% `;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (line === '') {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
console.log(line);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
3
|
async function render() {
|
|
23
4
|
console.log('Rendering video...');
|
|
24
5
|
|
|
25
|
-
const interval = setInterval(() => {
|
|
26
|
-
printProgress();
|
|
27
|
-
}, 1000);
|
|
28
|
-
|
|
29
6
|
// This is the main function that renders the video
|
|
30
7
|
const file = await renderVideo(
|
|
31
8
|
'./vite.config.ts',
|
|
32
9
|
{fill: 'orange'},
|
|
33
|
-
|
|
10
|
+
() => {},
|
|
11
|
+
{logProgress: true},
|
|
34
12
|
);
|
|
35
13
|
|
|
36
|
-
clearInterval(interval);
|
|
37
|
-
|
|
38
14
|
console.log(`Rendered video to ${file}`);
|
|
39
15
|
}
|
|
40
16
|
|