@revideo/create 0.5.11-alpha.1102 → 0.5.11-alpha.1103

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.
Files changed (184) hide show
  1. package/examples/README.md +43 -0
  2. package/examples/avatar-with-background/package.json +27 -0
  3. package/examples/avatar-with-background/src/project.meta +31 -0
  4. package/examples/avatar-with-background/src/project.ts +6 -0
  5. package/examples/avatar-with-background/src/render.ts +14 -0
  6. package/examples/avatar-with-background/src/revideo.d.ts +1 -0
  7. package/examples/avatar-with-background/src/scenes/example.meta +5 -0
  8. package/examples/avatar-with-background/src/scenes/example.tsx +28 -0
  9. package/examples/avatar-with-background/tsconfig.json +9 -0
  10. package/examples/avatar-with-background/vite.config.ts +8 -0
  11. package/examples/default/package.json +22 -0
  12. package/examples/default/src/project.tsx +56 -0
  13. package/examples/default/src/render.ts +15 -0
  14. package/examples/default/tsconfig.json +10 -0
  15. package/examples/github-stars-celebration/package-lock.json +3833 -0
  16. package/examples/github-stars-celebration/package.json +24 -0
  17. package/examples/github-stars-celebration/src/global.css +1 -0
  18. package/examples/github-stars-celebration/src/project.meta +28 -0
  19. package/examples/github-stars-celebration/src/project.ts +8 -0
  20. package/examples/github-stars-celebration/src/render.ts +15 -0
  21. package/examples/github-stars-celebration/src/revideo.d.ts +1 -0
  22. package/examples/github-stars-celebration/src/scenes/example.meta +5 -0
  23. package/examples/github-stars-celebration/src/scenes/example.tsx +51 -0
  24. package/examples/github-stars-celebration/tsconfig.json +9 -0
  25. package/examples/github-stars-celebration/vite.config.ts +8 -0
  26. package/examples/google-cloud-run-parallelized/README.md +127 -0
  27. package/examples/google-cloud-run-parallelized/render-orchestrator/Dockerfile +56 -0
  28. package/examples/google-cloud-run-parallelized/render-orchestrator/package.json +22 -0
  29. package/examples/google-cloud-run-parallelized/render-orchestrator/src/index.ts +72 -0
  30. package/examples/google-cloud-run-parallelized/render-orchestrator/src/revideo.d.ts +1 -0
  31. package/examples/google-cloud-run-parallelized/render-orchestrator/tsconfig.json +10 -0
  32. package/examples/google-cloud-run-parallelized/render-worker/.gcloudignore +17 -0
  33. package/examples/google-cloud-run-parallelized/render-worker/.puppeteerrc.cjs +9 -0
  34. package/examples/google-cloud-run-parallelized/render-worker/package.json +30 -0
  35. package/examples/google-cloud-run-parallelized/render-worker/src/index.ts +45 -0
  36. package/examples/google-cloud-run-parallelized/render-worker/src/project.meta +31 -0
  37. package/examples/google-cloud-run-parallelized/render-worker/src/project.ts +6 -0
  38. package/examples/google-cloud-run-parallelized/render-worker/src/render.ts +14 -0
  39. package/examples/google-cloud-run-parallelized/render-worker/src/revideo.d.ts +1 -0
  40. package/examples/google-cloud-run-parallelized/render-worker/src/scenes/example.tsx +30 -0
  41. package/examples/google-cloud-run-parallelized/render-worker/tsconfig.json +13 -0
  42. package/examples/google-cloud-run-parallelized/render-worker/vite.config.ts +9 -0
  43. package/examples/logo.svg +6 -0
  44. package/examples/logo_dark.svg +6 -0
  45. package/examples/marketing-templates/README.md +10 -0
  46. package/examples/marketing-templates/marketing-template/package.json +24 -0
  47. package/examples/marketing-templates/marketing-template/src/globals.css +0 -0
  48. package/examples/marketing-templates/marketing-template/src/project.meta +28 -0
  49. package/examples/marketing-templates/marketing-template/src/project.ts +9 -0
  50. package/examples/marketing-templates/marketing-template/src/render.ts +15 -0
  51. package/examples/marketing-templates/marketing-template/src/revideo.d.ts +1 -0
  52. package/examples/marketing-templates/marketing-template/src/scenes/example.meta +5 -0
  53. package/examples/marketing-templates/marketing-template/src/scenes/example.tsx +67 -0
  54. package/examples/marketing-templates/marketing-template/tsconfig.json +9 -0
  55. package/examples/marketing-templates/marketing-template/vite.config.ts +9 -0
  56. package/examples/marketing-templates/multiple-videos-in-one/package.json +24 -0
  57. package/examples/marketing-templates/multiple-videos-in-one/src/project.meta +28 -0
  58. package/examples/marketing-templates/multiple-videos-in-one/src/project.ts +9 -0
  59. package/examples/marketing-templates/multiple-videos-in-one/src/render.ts +15 -0
  60. package/examples/marketing-templates/multiple-videos-in-one/src/revideo.d.ts +1 -0
  61. package/examples/marketing-templates/multiple-videos-in-one/src/scenes/example.meta +5 -0
  62. package/examples/marketing-templates/multiple-videos-in-one/src/scenes/example.tsx +122 -0
  63. package/examples/marketing-templates/multiple-videos-in-one/tsconfig.json +9 -0
  64. package/examples/marketing-templates/multiple-videos-in-one/vite.config.ts +9 -0
  65. package/examples/minimal-drag-drop/README.md +29 -0
  66. package/examples/minimal-drag-drop/next/app/api/render/route.ts +22 -0
  67. package/examples/minimal-drag-drop/next/app/globals.css +3 -0
  68. package/examples/minimal-drag-drop/next/app/layout.tsx +25 -0
  69. package/examples/minimal-drag-drop/next/app/page.tsx +277 -0
  70. package/examples/minimal-drag-drop/next/next-env.d.ts +5 -0
  71. package/examples/minimal-drag-drop/next/next.config.mjs +4 -0
  72. package/examples/minimal-drag-drop/next/package-lock.json +5577 -0
  73. package/examples/minimal-drag-drop/next/package.json +35 -0
  74. package/examples/minimal-drag-drop/next/postcss.config.js +6 -0
  75. package/examples/minimal-drag-drop/next/public/favicon.ico +0 -0
  76. package/examples/minimal-drag-drop/next/public/next.svg +1 -0
  77. package/examples/minimal-drag-drop/next/public/vercel.svg +1 -0
  78. package/examples/minimal-drag-drop/next/tailwind.config.ts +30 -0
  79. package/examples/minimal-drag-drop/next/tsconfig.json +26 -0
  80. package/examples/minimal-drag-drop/next/utils/parse.ts +35 -0
  81. package/examples/minimal-drag-drop/revideo/package-lock.json +3771 -0
  82. package/examples/minimal-drag-drop/revideo/package.json +24 -0
  83. package/examples/minimal-drag-drop/revideo/src/global.css +1 -0
  84. package/examples/minimal-drag-drop/revideo/src/project.meta +28 -0
  85. package/examples/minimal-drag-drop/revideo/src/project.ts +9 -0
  86. package/examples/minimal-drag-drop/revideo/src/render.ts +15 -0
  87. package/examples/minimal-drag-drop/revideo/src/revideo.d.ts +1 -0
  88. package/examples/minimal-drag-drop/revideo/src/scenes/example.meta +5 -0
  89. package/examples/minimal-drag-drop/revideo/src/scenes/example.tsx +44 -0
  90. package/examples/minimal-drag-drop/revideo/tsconfig.json +9 -0
  91. package/examples/minimal-drag-drop/revideo/vite.config.ts +6 -0
  92. package/examples/parallelized-aws-lambda/.dockerignore +3 -0
  93. package/examples/parallelized-aws-lambda/Dockerfile +21 -0
  94. package/examples/parallelized-aws-lambda/Dockerfile.base +64 -0
  95. package/examples/parallelized-aws-lambda/README.md +197 -0
  96. package/examples/parallelized-aws-lambda/revideo-project/.puppeteerrc.cjs +9 -0
  97. package/examples/parallelized-aws-lambda/revideo-project/package-lock.json +4133 -0
  98. package/examples/parallelized-aws-lambda/revideo-project/package.json +28 -0
  99. package/examples/parallelized-aws-lambda/revideo-project/src/lambda.ts +157 -0
  100. package/examples/parallelized-aws-lambda/revideo-project/src/project.meta +28 -0
  101. package/examples/parallelized-aws-lambda/revideo-project/src/project.ts +7 -0
  102. package/examples/parallelized-aws-lambda/revideo-project/src/render.ts +17 -0
  103. package/examples/parallelized-aws-lambda/revideo-project/src/revideo.d.ts +1 -0
  104. package/examples/parallelized-aws-lambda/revideo-project/src/scenes/example.meta +5 -0
  105. package/examples/parallelized-aws-lambda/revideo-project/src/scenes/example.tsx +30 -0
  106. package/examples/parallelized-aws-lambda/revideo-project/tsconfig.json +10 -0
  107. package/examples/parallelized-aws-lambda/revideo-project/vite.config.ts +9 -0
  108. package/examples/reddit-post-video/README.md +84 -0
  109. package/examples/reddit-post-video/package-lock.json +2941 -0
  110. package/examples/reddit-post-video/package.json +27 -0
  111. package/examples/reddit-post-video/src/global.css +1 -0
  112. package/examples/reddit-post-video/src/metadata.json +576 -0
  113. package/examples/reddit-post-video/src/project.meta +31 -0
  114. package/examples/reddit-post-video/src/project.ts +9 -0
  115. package/examples/reddit-post-video/src/render.ts +157 -0
  116. package/examples/reddit-post-video/src/revideo.d.ts +1 -0
  117. package/examples/reddit-post-video/src/scenes/example.meta +5 -0
  118. package/examples/reddit-post-video/src/scenes/example.tsx +74 -0
  119. package/examples/reddit-post-video/tsconfig.json +9 -0
  120. package/examples/reddit-post-video/vite.config.ts +6 -0
  121. package/examples/rive-explanation-video/README.md +9 -0
  122. package/examples/rive-explanation-video/package.json +25 -0
  123. package/examples/rive-explanation-video/src/global.css +1 -0
  124. package/examples/rive-explanation-video/src/project.meta +31 -0
  125. package/examples/rive-explanation-video/src/project.ts +8 -0
  126. package/examples/rive-explanation-video/src/render.ts +15 -0
  127. package/examples/rive-explanation-video/src/revideo.d.ts +1 -0
  128. package/examples/rive-explanation-video/src/scenes/example.meta +5 -0
  129. package/examples/rive-explanation-video/src/scenes/example.tsx +218 -0
  130. package/examples/rive-explanation-video/tsconfig.json +9 -0
  131. package/examples/rive-explanation-video/vite.config.ts +8 -0
  132. package/examples/saas-template/.prettierrc +9 -0
  133. package/examples/saas-template/README.md +28 -0
  134. package/examples/saas-template/app/actions.tsx +114 -0
  135. package/examples/saas-template/app/api/render/route.ts +23 -0
  136. package/examples/saas-template/app/globals.css +3 -0
  137. package/examples/saas-template/app/layout.tsx +25 -0
  138. package/examples/saas-template/app/page.tsx +204 -0
  139. package/examples/saas-template/next.config.mjs +4 -0
  140. package/examples/saas-template/package.json +39 -0
  141. package/examples/saas-template/postcss.config.js +6 -0
  142. package/examples/saas-template/revideo/global.css +1 -0
  143. package/examples/saas-template/revideo/project.ts +9 -0
  144. package/examples/saas-template/revideo/scene.tsx +179 -0
  145. package/examples/saas-template/tailwind.config.ts +30 -0
  146. package/examples/saas-template/tsconfig.json +27 -0
  147. package/examples/saas-template/utils/parse.ts +35 -0
  148. package/examples/stitching-videos/README.md +7 -0
  149. package/examples/stitching-videos/package.json +23 -0
  150. package/examples/stitching-videos/src/project.meta +28 -0
  151. package/examples/stitching-videos/src/project.ts +20 -0
  152. package/examples/stitching-videos/src/render.ts +27 -0
  153. package/examples/stitching-videos/src/revideo.d.ts +1 -0
  154. package/examples/stitching-videos/src/scenes/example.tsx +30 -0
  155. package/examples/stitching-videos/tsconfig.json +9 -0
  156. package/examples/stitching-videos/vite.config.ts +8 -0
  157. package/examples/three-js-example/README.md +8 -0
  158. package/examples/three-js-example/package-lock.json +2753 -0
  159. package/examples/three-js-example/package.json +25 -0
  160. package/examples/three-js-example/src/components/Three.ts +166 -0
  161. package/examples/three-js-example/src/global.css +1 -0
  162. package/examples/three-js-example/src/project.meta +31 -0
  163. package/examples/three-js-example/src/project.ts +8 -0
  164. package/examples/three-js-example/src/render.ts +15 -0
  165. package/examples/three-js-example/src/revideo.d.ts +1 -0
  166. package/examples/three-js-example/src/scenes/basic3D.meta +5 -0
  167. package/examples/three-js-example/src/scenes/basic3D.tsx +89 -0
  168. package/examples/three-js-example/tsconfig.json +9 -0
  169. package/examples/three-js-example/vite.config.ts +6 -0
  170. package/examples/youtube-shorts/README.md +65 -0
  171. package/examples/youtube-shorts/package-lock.json +3881 -0
  172. package/examples/youtube-shorts/package.json +30 -0
  173. package/examples/youtube-shorts/src/get-assets.ts +34 -0
  174. package/examples/youtube-shorts/src/global.css +3 -0
  175. package/examples/youtube-shorts/src/metadata.json +635 -0
  176. package/examples/youtube-shorts/src/project.meta +28 -0
  177. package/examples/youtube-shorts/src/project.ts +9 -0
  178. package/examples/youtube-shorts/src/render.ts +12 -0
  179. package/examples/youtube-shorts/src/revideo.d.ts +1 -0
  180. package/examples/youtube-shorts/src/scenes/example.tsx +224 -0
  181. package/examples/youtube-shorts/src/utils.ts +123 -0
  182. package/examples/youtube-shorts/tsconfig.json +9 -0
  183. package/examples/youtube-shorts/vite.config.ts +8 -0
  184. package/package.json +9 -9
@@ -0,0 +1,9 @@
1
+ import {defineConfig} from 'vite';
2
+ import motionCanvas from '@revideo/vite-plugin';
3
+
4
+
5
+ export default defineConfig({
6
+ plugins: [
7
+ motionCanvas(),
8
+ ],
9
+ });
@@ -0,0 +1,6 @@
1
+ <svg width="1498" height="363" viewBox="0 0 1498 363" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M444.3 294V134.7H489.9L492 186.6L483 176.7C485.4 168.1 489.3 160.4 494.7 153.6C500.3 146.8 506.8 141.4 514.2 137.4C521.6 133.4 529.5 131.4 537.9 131.4C541.5 131.4 544.8 131.7 547.8 132.3C551 132.9 553.9 133.6 556.5 134.4L543.3 187.5C541.1 186.1 538.1 185 534.3 184.2C530.7 183.2 526.9 182.7 522.9 182.7C518.5 182.7 514.4 183.5 510.6 185.1C506.8 186.5 503.6 188.6 501 191.4C498.4 194.2 496.3 197.5 494.7 201.3C493.3 205.1 492.6 209.4 492.6 214.2V294H444.3ZM637.985 297C620.385 297 605.085 293.5 592.085 286.5C579.085 279.3 568.985 269.6 561.785 257.4C554.585 245 550.985 230.9 550.985 215.1C550.985 202.9 552.985 191.7 556.985 181.5C560.985 171.3 566.585 162.5 573.785 155.1C580.985 147.5 589.485 141.7 599.285 137.7C609.285 133.5 620.185 131.4 631.985 131.4C643.185 131.4 653.385 133.4 662.585 137.4C671.985 141.4 680.085 147 686.885 154.2C693.685 161.4 698.885 169.9 702.485 179.7C706.085 189.5 707.685 200.2 707.285 211.8L706.985 224.7H580.085L573.185 197.7H667.985L662.885 203.4V197.4C662.485 192.4 660.885 188 658.085 184.2C655.485 180.2 651.985 177.1 647.585 174.9C643.185 172.7 638.185 171.6 632.585 171.6C624.785 171.6 618.085 173.2 612.485 176.4C607.085 179.4 602.985 183.9 600.185 189.9C597.385 195.7 595.985 202.9 595.985 211.5C595.985 220.3 597.785 228 601.385 234.6C605.185 241 610.585 246 617.585 249.6C624.785 253.2 633.285 255 643.085 255C649.885 255 655.885 254 661.085 252C666.485 250 672.285 246.6 678.485 241.8L700.985 273.6C694.785 279 688.185 283.4 681.185 286.8C674.185 290.2 666.985 292.7 659.585 294.3C652.385 296.1 645.185 297 637.985 297ZM771.837 294L705.237 134.7H758.337L797.937 253.8L786.237 255L827.037 134.7H879.537L809.637 294H771.837ZM895.277 294V134.7H943.277V294H895.277ZM919.277 103.2C910.277 103.2 903.177 101.1 897.977 96.9C892.977 92.5 890.477 86.3 890.477 78.3C890.477 71.1 893.077 65.2 898.277 60.6C903.477 56 910.477 53.7 919.277 53.7C928.277 53.7 935.277 55.9 940.277 60.3C945.277 64.5 947.777 70.5 947.777 78.3C947.777 85.7 945.177 91.7 939.977 96.3C934.977 100.9 928.077 103.2 919.277 103.2ZM1036.68 297.3C1022.88 297.3 1010.58 293.8 999.778 286.8C989.178 279.6 980.778 269.8 974.578 257.4C968.378 244.8 965.278 230.5 965.278 214.5C965.278 198.5 968.378 184.3 974.578 171.9C980.778 159.3 989.278 149.4 1000.08 142.2C1010.88 135 1023.28 131.4 1037.28 131.4C1044.48 131.4 1051.38 132.5 1057.98 134.7C1064.58 136.9 1070.58 139.9 1075.98 143.7C1081.38 147.5 1085.78 151.9 1089.18 156.9C1092.58 161.7 1094.58 166.7 1095.18 171.9L1083.78 174.6V72H1132.08V294H1087.38L1084.68 257.7L1094.28 259.2C1093.68 264.2 1091.68 269 1088.28 273.6C1085.08 278.2 1080.88 282.3 1075.68 285.9C1070.48 289.3 1064.48 292 1057.68 294C1051.08 296.2 1044.08 297.3 1036.68 297.3ZM1048.98 257.4C1056.38 257.4 1062.78 255.6 1068.18 252C1073.58 248.4 1077.68 243.4 1080.48 237C1083.48 230.6 1084.98 223.1 1084.98 214.5C1084.98 205.7 1083.48 198.1 1080.48 191.7C1077.68 185.3 1073.58 180.3 1068.18 176.7C1062.78 173.1 1056.38 171.3 1048.98 171.3C1041.58 171.3 1035.18 173.1 1029.78 176.7C1024.58 180.3 1020.48 185.3 1017.48 191.7C1014.48 198.1 1012.98 205.7 1012.98 214.5C1012.98 223.1 1014.48 230.6 1017.48 237C1020.48 243.4 1024.58 248.4 1029.78 252C1035.18 255.6 1041.58 257.4 1048.98 257.4ZM1236.57 297C1218.97 297 1203.67 293.5 1190.67 286.5C1177.67 279.3 1167.57 269.6 1160.37 257.4C1153.17 245 1149.57 230.9 1149.57 215.1C1149.57 202.9 1151.57 191.7 1155.57 181.5C1159.57 171.3 1165.17 162.5 1172.37 155.1C1179.57 147.5 1188.07 141.7 1197.87 137.7C1207.87 133.5 1218.77 131.4 1230.57 131.4C1241.77 131.4 1251.97 133.4 1261.17 137.4C1270.57 141.4 1278.67 147 1285.47 154.2C1292.27 161.4 1297.47 169.9 1301.07 179.7C1304.67 189.5 1306.27 200.2 1305.87 211.8L1305.57 224.7H1178.67L1171.77 197.7H1266.57L1261.47 203.4V197.4C1261.07 192.4 1259.47 188 1256.67 184.2C1254.07 180.2 1250.57 177.1 1246.17 174.9C1241.77 172.7 1236.77 171.6 1231.17 171.6C1223.37 171.6 1216.67 173.2 1211.07 176.4C1205.67 179.4 1201.57 183.9 1198.77 189.9C1195.97 195.7 1194.57 202.9 1194.57 211.5C1194.57 220.3 1196.37 228 1199.97 234.6C1203.77 241 1209.17 246 1216.17 249.6C1223.37 253.2 1231.87 255 1241.67 255C1248.47 255 1254.47 254 1259.67 252C1265.07 250 1270.87 246.6 1277.07 241.8L1299.57 273.6C1293.37 279 1286.77 283.4 1279.77 286.8C1272.77 290.2 1265.57 292.7 1258.17 294.3C1250.97 296.1 1243.77 297 1236.57 297ZM1399.45 297C1382.85 297 1368.05 293.4 1355.05 286.2C1342.25 279 1332.05 269.2 1324.45 256.8C1317.05 244.4 1313.35 230.2 1313.35 214.2C1313.35 198.2 1317.05 184 1324.45 171.6C1332.05 159.2 1342.25 149.4 1355.05 142.2C1368.05 135 1382.85 131.4 1399.45 131.4C1416.05 131.4 1430.75 135 1443.55 142.2C1456.55 149.4 1466.75 159.2 1474.15 171.6C1481.55 184 1485.25 198.2 1485.25 214.2C1485.25 230.2 1481.55 244.4 1474.15 256.8C1466.75 269.2 1456.55 279 1443.55 286.2C1430.75 293.4 1416.05 297 1399.45 297ZM1399.45 255.6C1406.65 255.6 1413.05 253.8 1418.65 250.2C1424.25 246.6 1428.65 241.7 1431.85 235.5C1435.05 229.3 1436.55 222.2 1436.35 214.2C1436.55 206.2 1435.05 199.1 1431.85 192.9C1428.65 186.5 1424.25 181.5 1418.65 177.9C1413.05 174.3 1406.65 172.5 1399.45 172.5C1392.25 172.5 1385.75 174.3 1379.95 177.9C1374.35 181.5 1369.95 186.5 1366.75 192.9C1363.55 199.1 1362.05 206.2 1362.25 214.2C1362.05 222.2 1363.55 229.3 1366.75 235.5C1369.95 241.7 1374.35 246.6 1379.95 250.2C1385.75 253.8 1392.25 255.6 1399.45 255.6Z" fill="#101010"/>
3
+ <rect y="74" width="180" height="59.7841" rx="9.34127" fill="#101010"/>
4
+ <path d="M70 163.341C70 158.182 74.1822 154 79.3413 154H240.659C245.818 154 250 158.182 250 163.341V204.659C250 209.818 245.818 214 240.659 214H79.3413C74.1822 214 70 209.818 70 204.659V163.341Z" fill="#101010"/>
5
+ <rect x="140" y="234" width="180" height="60.2381" rx="9.34127" fill="#101010"/>
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="1498" height="363" viewBox="0 0 1498 363" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M444.3 294V134.7H489.9L492 186.6L483 176.7C485.4 168.1 489.3 160.4 494.7 153.6C500.3 146.8 506.8 141.4 514.2 137.4C521.6 133.4 529.5 131.4 537.9 131.4C541.5 131.4 544.8 131.7 547.8 132.3C551 132.9 553.9 133.6 556.5 134.4L543.3 187.5C541.1 186.1 538.1 185 534.3 184.2C530.7 183.2 526.9 182.7 522.9 182.7C518.5 182.7 514.4 183.5 510.6 185.1C506.8 186.5 503.6 188.6 501 191.4C498.4 194.2 496.3 197.5 494.7 201.3C493.3 205.1 492.6 209.4 492.6 214.2V294H444.3ZM637.985 297C620.385 297 605.085 293.5 592.085 286.5C579.085 279.3 568.985 269.6 561.785 257.4C554.585 245 550.985 230.9 550.985 215.1C550.985 202.9 552.985 191.7 556.985 181.5C560.985 171.3 566.585 162.5 573.785 155.1C580.985 147.5 589.485 141.7 599.285 137.7C609.285 133.5 620.185 131.4 631.985 131.4C643.185 131.4 653.385 133.4 662.585 137.4C671.985 141.4 680.085 147 686.885 154.2C693.685 161.4 698.885 169.9 702.485 179.7C706.085 189.5 707.685 200.2 707.285 211.8L706.985 224.7H580.085L573.185 197.7H667.985L662.885 203.4V197.4C662.485 192.4 660.885 188 658.085 184.2C655.485 180.2 651.985 177.1 647.585 174.9C643.185 172.7 638.185 171.6 632.585 171.6C624.785 171.6 618.085 173.2 612.485 176.4C607.085 179.4 602.985 183.9 600.185 189.9C597.385 195.7 595.985 202.9 595.985 211.5C595.985 220.3 597.785 228 601.385 234.6C605.185 241 610.585 246 617.585 249.6C624.785 253.2 633.285 255 643.085 255C649.885 255 655.885 254 661.085 252C666.485 250 672.285 246.6 678.485 241.8L700.985 273.6C694.785 279 688.185 283.4 681.185 286.8C674.185 290.2 666.985 292.7 659.585 294.3C652.385 296.1 645.185 297 637.985 297ZM771.837 294L705.237 134.7H758.337L797.937 253.8L786.237 255L827.037 134.7H879.537L809.637 294H771.837ZM895.277 294V134.7H943.277V294H895.277ZM919.277 103.2C910.277 103.2 903.177 101.1 897.977 96.9C892.977 92.5 890.477 86.3 890.477 78.3C890.477 71.1 893.077 65.2 898.277 60.6C903.477 56 910.477 53.7 919.277 53.7C928.277 53.7 935.277 55.9 940.277 60.3C945.277 64.5 947.777 70.5 947.777 78.3C947.777 85.7 945.177 91.7 939.977 96.3C934.977 100.9 928.077 103.2 919.277 103.2ZM1036.68 297.3C1022.88 297.3 1010.58 293.8 999.778 286.8C989.178 279.6 980.778 269.8 974.578 257.4C968.378 244.8 965.278 230.5 965.278 214.5C965.278 198.5 968.378 184.3 974.578 171.9C980.778 159.3 989.278 149.4 1000.08 142.2C1010.88 135 1023.28 131.4 1037.28 131.4C1044.48 131.4 1051.38 132.5 1057.98 134.7C1064.58 136.9 1070.58 139.9 1075.98 143.7C1081.38 147.5 1085.78 151.9 1089.18 156.9C1092.58 161.7 1094.58 166.7 1095.18 171.9L1083.78 174.6V72H1132.08V294H1087.38L1084.68 257.7L1094.28 259.2C1093.68 264.2 1091.68 269 1088.28 273.6C1085.08 278.2 1080.88 282.3 1075.68 285.9C1070.48 289.3 1064.48 292 1057.68 294C1051.08 296.2 1044.08 297.3 1036.68 297.3ZM1048.98 257.4C1056.38 257.4 1062.78 255.6 1068.18 252C1073.58 248.4 1077.68 243.4 1080.48 237C1083.48 230.6 1084.98 223.1 1084.98 214.5C1084.98 205.7 1083.48 198.1 1080.48 191.7C1077.68 185.3 1073.58 180.3 1068.18 176.7C1062.78 173.1 1056.38 171.3 1048.98 171.3C1041.58 171.3 1035.18 173.1 1029.78 176.7C1024.58 180.3 1020.48 185.3 1017.48 191.7C1014.48 198.1 1012.98 205.7 1012.98 214.5C1012.98 223.1 1014.48 230.6 1017.48 237C1020.48 243.4 1024.58 248.4 1029.78 252C1035.18 255.6 1041.58 257.4 1048.98 257.4ZM1236.57 297C1218.97 297 1203.67 293.5 1190.67 286.5C1177.67 279.3 1167.57 269.6 1160.37 257.4C1153.17 245 1149.57 230.9 1149.57 215.1C1149.57 202.9 1151.57 191.7 1155.57 181.5C1159.57 171.3 1165.17 162.5 1172.37 155.1C1179.57 147.5 1188.07 141.7 1197.87 137.7C1207.87 133.5 1218.77 131.4 1230.57 131.4C1241.77 131.4 1251.97 133.4 1261.17 137.4C1270.57 141.4 1278.67 147 1285.47 154.2C1292.27 161.4 1297.47 169.9 1301.07 179.7C1304.67 189.5 1306.27 200.2 1305.87 211.8L1305.57 224.7H1178.67L1171.77 197.7H1266.57L1261.47 203.4V197.4C1261.07 192.4 1259.47 188 1256.67 184.2C1254.07 180.2 1250.57 177.1 1246.17 174.9C1241.77 172.7 1236.77 171.6 1231.17 171.6C1223.37 171.6 1216.67 173.2 1211.07 176.4C1205.67 179.4 1201.57 183.9 1198.77 189.9C1195.97 195.7 1194.57 202.9 1194.57 211.5C1194.57 220.3 1196.37 228 1199.97 234.6C1203.77 241 1209.17 246 1216.17 249.6C1223.37 253.2 1231.87 255 1241.67 255C1248.47 255 1254.47 254 1259.67 252C1265.07 250 1270.87 246.6 1277.07 241.8L1299.57 273.6C1293.37 279 1286.77 283.4 1279.77 286.8C1272.77 290.2 1265.57 292.7 1258.17 294.3C1250.97 296.1 1243.77 297 1236.57 297ZM1399.45 297C1382.85 297 1368.05 293.4 1355.05 286.2C1342.25 279 1332.05 269.2 1324.45 256.8C1317.05 244.4 1313.35 230.2 1313.35 214.2C1313.35 198.2 1317.05 184 1324.45 171.6C1332.05 159.2 1342.25 149.4 1355.05 142.2C1368.05 135 1382.85 131.4 1399.45 131.4C1416.05 131.4 1430.75 135 1443.55 142.2C1456.55 149.4 1466.75 159.2 1474.15 171.6C1481.55 184 1485.25 198.2 1485.25 214.2C1485.25 230.2 1481.55 244.4 1474.15 256.8C1466.75 269.2 1456.55 279 1443.55 286.2C1430.75 293.4 1416.05 297 1399.45 297ZM1399.45 255.6C1406.65 255.6 1413.05 253.8 1418.65 250.2C1424.25 246.6 1428.65 241.7 1431.85 235.5C1435.05 229.3 1436.55 222.2 1436.35 214.2C1436.55 206.2 1435.05 199.1 1431.85 192.9C1428.65 186.5 1424.25 181.5 1418.65 177.9C1413.05 174.3 1406.65 172.5 1399.45 172.5C1392.25 172.5 1385.75 174.3 1379.95 177.9C1374.35 181.5 1369.95 186.5 1366.75 192.9C1363.55 199.1 1362.05 206.2 1362.25 214.2C1362.05 222.2 1363.55 229.3 1366.75 235.5C1369.95 241.7 1374.35 246.6 1379.95 250.2C1385.75 253.8 1392.25 255.6 1399.45 255.6Z" fill="#F5F5F5"/>
3
+ <rect y="74" width="180" height="59.7841" rx="9.34127" fill="#F5F5F5"/>
4
+ <path d="M70 163.341C70 158.182 74.1822 154 79.3413 154H240.659C245.818 154 250 158.182 250 163.341V204.659C250 209.818 245.818 214 240.659 214H79.3413C74.1822 214 70 209.818 70 204.659V163.341Z" fill="#F5F5F5"/>
5
+ <rect x="140" y="234" width="180" height="60.2381" rx="9.34127" fill="#F5F5F5"/>
6
+ </svg>
@@ -0,0 +1,10 @@
1
+ # Marketing Templates
2
+
3
+ This project contains the implementation of a template for a social media post advertising Black Friday discounts. The implementation can be found in `/marketing-template`.
4
+
5
+ https://github.com/redotvideo/examples/assets/122226645/e0b8ef10-737e-4ea7-8a1e-cc2edca676eb
6
+
7
+ The folder `multiple-videos-in-one` contains the following variation:
8
+
9
+ https://github.com/redotvideo/examples/assets/122226645/52b5c42d-ffd3-4bb4-bb08-bfb5c8283e03
10
+
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "veed-template",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "scripts": {
6
+ "start": "vite",
7
+ "serve": "vite",
8
+ "build": "tsc && vite build",
9
+ "render": "tsc && node dist/render.js"
10
+ },
11
+ "dependencies": {
12
+ "@revideo/core": "0.5.10",
13
+ "@revideo/2d": "0.5.10",
14
+ "@revideo/renderer": "0.5.10",
15
+ "@revideo/vite-plugin": "0.5.10",
16
+ "@revideo/ffmpeg": "0.5.10"
17
+ },
18
+ "devDependencies": {
19
+ "@revideo/ui": "0.5.10",
20
+ "@revideo/cli": "0.5.10",
21
+ "typescript": "5.5.4",
22
+ "vite": "^4.5"
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": 0,
3
+ "shared": {
4
+ "background": null,
5
+ "range": [
6
+ 0,
7
+ null
8
+ ],
9
+ "size": {
10
+ "x": 1920,
11
+ "y": 1080
12
+ },
13
+ "audioOffset": 0
14
+ },
15
+ "preview": {
16
+ "fps": 30,
17
+ "resolutionScale": 1
18
+ },
19
+ "rendering": {
20
+ "fps": 30,
21
+ "resolutionScale": 1,
22
+ "colorSpace": "srgb",
23
+ "exporter": {
24
+ "name": "@revideo/core/wasm",
25
+ "options": {}
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,9 @@
1
+ import {makeProject} from '@revideo/core';
2
+
3
+ import example from './scenes/example?scene';
4
+
5
+
6
+ export default makeProject({
7
+ scenes: [example],
8
+ variables: { backgroundColor: "#FDCFE5", texts: ["gift cards", "discounts", "+ more!!"]} // ["gift cards", "discounts", "+ more!!"] ["events", "special offers", "and more..."]
9
+ });
@@ -0,0 +1,15 @@
1
+ import {renderVideo} from '@revideo/renderer';
2
+
3
+ async function render() {
4
+ console.log('Rendering video...');
5
+
6
+ // This is the main function that renders the video
7
+ const file = await renderVideo({
8
+ projectFile: "./src/project.ts",
9
+ settings: {logProgress: true},
10
+ });
11
+
12
+ console.log(`Rendered video to ${file}`);
13
+ }
14
+
15
+ render();
@@ -0,0 +1 @@
1
+ /// <reference types="@revideo/core/project" />
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": 0,
3
+ "timeEvents": [],
4
+ "seed": 2008807484
5
+ }
@@ -0,0 +1,67 @@
1
+ import {Grid, Img, Rect, Txt, View2D, makeScene2D} from '@revideo/2d';
2
+ import {all, chain, useScene, createRef, waitFor} from '@revideo/core';
3
+
4
+ export default makeScene2D(function* (view) {
5
+ const logoRef = createRef<Img>();
6
+ const grid = createRef<Grid>();
7
+ const headingRef = createRef<Txt>()
8
+
9
+
10
+ view.add(
11
+ <>
12
+ <Rect
13
+ fill={useScene().variables.get("backgroundColor", "#E2FF31")()}
14
+ size={['100%', '100%']}
15
+ />
16
+ </>
17
+ );
18
+
19
+ view.add(
20
+ <Grid
21
+ ref={grid}
22
+ width={'100%'}
23
+ height={'100%'}
24
+ stroke={'#999'}
25
+ end={0}
26
+ spacing={150}
27
+ />,
28
+ );
29
+
30
+ yield* all(
31
+ grid().end(0.5, 0.5).to(1, 0.5).wait(0.1),
32
+ grid().start(0.5, 0.5).to(0, 0.5).wait(0.1),
33
+ );
34
+
35
+ view.add(<Txt fontSize={1} fontWeight={600} ref={headingRef} position={[-700, -100]} opacity={0.2} textWrap={true} width={"1%"} textAlign={"left"} fontFamily={"Sans-Serif"}>BLACK FRIDAY</Txt>)
36
+ yield* all(headingRef().fontSize(180, 0.5), headingRef().opacity(1, 0.5));
37
+
38
+ const txtRef = createRef<Txt>();
39
+ const subtitle = <Txt fontSize={60} ref={txtRef} fill={useScene().variables.get("backgroundColor", useScene().variables.get("backgroundColor", "#E2FF31")())()} zIndex={1} fontFamily={"Sans-Serif"}>Up to 95% off</Txt>
40
+
41
+ const textBoxRef = createRef<Txt>();
42
+
43
+ view.add(<Rect left={[headingRef().left().x, 180]} ref={textBoxRef} width={txtRef().width()+60} height={100} zIndex={0} fill={"black"}/>);
44
+ view.add(<Txt position={textBoxRef().position} width={textBoxRef().width()} paddingLeft={20} textAlign={"left"} fontSize={60} ref={txtRef} fill={useScene().variables.get("backgroundColor", "#E2FF31")()} zIndex={1} fontFamily={"Sans-Serif"}></Txt>)
45
+
46
+ yield* txtRef().text("Up to 95% off", 1)
47
+ yield* addItems(view, useScene().variables.get("texts", ["events", "gift cards", "and more..."])());
48
+
49
+ yield* waitFor(1);
50
+ });
51
+
52
+ function* addItems(view: View2D, texts: string[]){
53
+ let yPos = 0;
54
+ for(let i=0; i< texts.length; i++){
55
+ const txtRef1 = createRef<Txt>();
56
+ const subtitle1 = <Txt fontSize={90} ref={txtRef1} fill={useScene().variables.get("backgroundColor", "#E2FF31")()} zIndex={1} fontFamily={"Sans-Serif"}>{texts[i]}</Txt>
57
+
58
+ const textBoxRef1 = createRef<Txt>();
59
+
60
+ view.add(<Rect left={[100, yPos]} lineWidth={2} radius={30} stroke={"black"} ref={textBoxRef1} width={txtRef1().width()+150} height={100} zIndex={0} padding={70} fill={"white"}/>);
61
+ view.add(<Txt position={textBoxRef1().position} width={textBoxRef1().width()} textAlign={"center"} fontSize={90} fill={"black"} zIndex={1} fontFamily={"Sans-Serif"}>{texts[i]}</Txt>)
62
+ yPos = textBoxRef1().y() + textBoxRef1().height()-10;
63
+ yield* waitFor(0.5);
64
+
65
+ }
66
+
67
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@revideo/2d/tsconfig.project.json",
3
+ "include": ["src"],
4
+ "compilerOptions": {
5
+ "noEmit": false,
6
+ "outDir": "dist",
7
+ "module": "CommonJS"
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ import {defineConfig} from 'vite';
2
+ import motionCanvas from '@revideo/vite-plugin';
3
+
4
+
5
+ export default defineConfig({
6
+ plugins: [
7
+ motionCanvas(),
8
+ ],
9
+ });
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "veed-template",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "scripts": {
6
+ "start": "vite",
7
+ "serve": "vite",
8
+ "build": "tsc && vite build",
9
+ "render": "tsc && node dist/render.js"
10
+ },
11
+ "dependencies": {
12
+ "@revideo/core": "0.5.10",
13
+ "@revideo/2d": "0.5.10",
14
+ "@revideo/renderer": "0.5.10",
15
+ "@revideo/vite-plugin": "0.5.10",
16
+ "@revideo/ffmpeg": "0.5.10"
17
+ },
18
+ "devDependencies": {
19
+ "@revideo/ui": "0.5.10",
20
+ "@revideo/cli": "0.5.10",
21
+ "typescript": "5.5.4",
22
+ "vite": "^4.5"
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": 0,
3
+ "shared": {
4
+ "background": "rgb(255,255,255)",
5
+ "range": [
6
+ 0,
7
+ null
8
+ ],
9
+ "size": {
10
+ "x": 1920,
11
+ "y": 1080
12
+ },
13
+ "audioOffset": 0
14
+ },
15
+ "preview": {
16
+ "fps": 30,
17
+ "resolutionScale": 1
18
+ },
19
+ "rendering": {
20
+ "fps": 30,
21
+ "resolutionScale": 1,
22
+ "colorSpace": "srgb",
23
+ "exporter": {
24
+ "name": "@revideo/core/wasm",
25
+ "options": {}
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,9 @@
1
+ import {makeProject} from '@revideo/core';
2
+
3
+ import example from './scenes/example?scene';
4
+
5
+
6
+ export default makeProject({
7
+ scenes: [example],
8
+ variables: { backgroundColor: "#FDCFE5", texts: ["gift cards", "discounts", "+ more!!"]} // ["gift cards", "discounts", "+ more!!"] ["events", "special offers", "and more..."]
9
+ });
@@ -0,0 +1,15 @@
1
+ import {renderVideo} from '@revideo/renderer';
2
+
3
+ async function render() {
4
+ console.log('Rendering video...');
5
+
6
+ // This is the main function that renders the video
7
+ const file = await renderVideo({
8
+ projectFile: './src/project.ts',
9
+ settings: {logProgress: true},
10
+ });
11
+
12
+ console.log(`Rendered video to ${file}`);
13
+ }
14
+
15
+ render();
@@ -0,0 +1 @@
1
+ /// <reference types="@revideo/core/project" />
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": 0,
3
+ "timeEvents": [],
4
+ "seed": 2008807484
5
+ }
@@ -0,0 +1,122 @@
1
+ import {Grid, Img, Rect, Txt, View2D, makeScene2D} from '@revideo/2d';
2
+ import {all, chain, useScene, createRef, waitFor, Reference} from '@revideo/core';
3
+
4
+ export default makeScene2D(function* (view) {
5
+
6
+
7
+ const backgroundRef = createRef<Rect>();
8
+
9
+ yield view.add(
10
+ <>
11
+ <Rect
12
+ fill={"#9accf2"}
13
+ position={[useScene().getSize().x*0.25-1920*0.5, useScene().getSize().y*0.25-1080*0.5]}
14
+ size={['40%', '40%']}
15
+ ref={backgroundRef}
16
+ />
17
+ </>
18
+ );
19
+
20
+ yield* video(view, backgroundRef, "#9accf2", ["gift cards", "discounts", "+ more!!"]);
21
+
22
+ const topRight = createRef<Rect>();
23
+ const bottomLeft = createRef<Rect>();
24
+ const bottomRight = createRef<Rect>();
25
+
26
+
27
+ view.add(
28
+ <>
29
+ <Rect
30
+ fill={"#FDCFE5"}
31
+ position={[useScene().getSize().x*0.25-1920*0.5, useScene().getSize().y*0.25-1080*0.5]}
32
+ size={['40%', '40%']}
33
+ ref={topRight}
34
+ zIndex={-1}
35
+ />
36
+ <Rect
37
+ fill={"#FDB827"}
38
+ position={[useScene().getSize().x*0.25-1920*0.5, useScene().getSize().y*0.25-1080*0.5]}
39
+ size={['40%', '40%']}
40
+ ref={bottomLeft}
41
+ zIndex={-1}
42
+ />
43
+ <Rect
44
+ fill={"#8BF8A7"}
45
+ position={[useScene().getSize().x*0.25-1920*0.5, useScene().getSize().y*0.25-1080*0.5]}
46
+ size={['40%', '40%']}
47
+ ref={bottomRight}
48
+ zIndex={-1}
49
+ />
50
+
51
+ </>
52
+ );
53
+
54
+ yield* all(
55
+ bottomLeft().y(useScene().getSize().y*0.75-1080*0.5, 1),
56
+ topRight().x(useScene().getSize().x*0.75-1920*0.5, 1),
57
+ bottomRight().position([useScene().getSize().x*0.75-1920*0.5, useScene().getSize().y*0.75-1080*0.5], 1)
58
+ );
59
+
60
+ yield* all(
61
+ video(view, bottomLeft, "#FDB827", ["gift cards", "discounts", "+ more!!"]),
62
+ video(view, topRight, "#FDCFE5", ["gift cards", "discounts", "+ more!!"]),
63
+ video(view, bottomRight, "#8BF8A7", ["gift cards", "discounts", "+ more!!"]),
64
+ )
65
+
66
+ });
67
+
68
+ function* video(view: View2D, backgroundRef: Reference<Rect>, backgroundColor: string, texts: string[]){
69
+ const grid = createRef<Grid>();
70
+ const headingRef = createRef<Txt>()
71
+
72
+
73
+ backgroundRef().add(
74
+ <Grid
75
+ ref={grid}
76
+ width={backgroundRef().width()}
77
+ height={backgroundRef().height()}
78
+ stroke={'#999'}
79
+ end={0}
80
+ spacing={150*0.4}
81
+ />,
82
+ );
83
+
84
+ yield* all(
85
+ grid().end(0.5, 0.5).to(1, 0.5).wait(0.1),
86
+ grid().start(0.5, 0.5).to(0, 0.5).wait(0.1),
87
+ );
88
+
89
+ backgroundRef().add(<Txt fontSize={1*0.40} fontWeight={600} ref={headingRef} position={[-backgroundRef().width()*0.3645, -backgroundRef().width()*0.05208]} opacity={0.2} textWrap={true} width={"1%"} textAlign={"left"} fontFamily={"Sans-Serif"}>BLACK FRIDAY</Txt>)
90
+ yield* all(headingRef().fontSize(180*0.40, 0.5), headingRef().opacity(1, 0.5));
91
+
92
+ const txtRef = createRef<Txt>();
93
+ const subtitle = <Txt fontSize={60*0.40} ref={txtRef} fill={backgroundColor} zIndex={1} fontFamily={"Sans-Serif"}>Up to 95% off</Txt>
94
+
95
+ const textBoxRef = createRef<Txt>();
96
+
97
+ backgroundRef().add(<Rect left={[headingRef().left().x, 180*0.40]} ref={textBoxRef} width={txtRef().width()+60*0.40} height={40} zIndex={0} fill={"black"}/>);
98
+ backgroundRef().add(<Txt position={textBoxRef().position} width={textBoxRef().width()} paddingLeft={5} textAlign={"left"} fontSize={60*0.40} ref={txtRef} fill={backgroundColor} zIndex={1} fontFamily={"Sans-Serif"}></Txt>)
99
+
100
+ yield* txtRef().text("Up to 95% off", 1)
101
+ yield* addItems(backgroundRef, backgroundColor, texts);
102
+
103
+ yield* waitFor(1);
104
+
105
+ }
106
+
107
+ function* addItems(background: Reference<Rect>, backgroundColor: string, texts: string[]){
108
+ let yPos = 0;
109
+ for(let i=0; i< texts.length; i++){
110
+ const txtRef1 = createRef<Txt>();
111
+ const subtitle1 = <Txt fontSize={90*0.40} ref={txtRef1} fill={backgroundColor} zIndex={1} fontFamily={"Sans-Serif"}>{texts[i]}</Txt>
112
+
113
+ const textBoxRef1 = createRef<Txt>();
114
+
115
+ background().add(<Rect left={[50, yPos]} height={30*0.40} lineWidth={2} radius={30*0.40} stroke={"black"} ref={textBoxRef1} width={txtRef1().width()+150*0.40} zIndex={0} padding={70*0.40} fill={"white"}/>);
116
+ background().add(<Txt position={textBoxRef1().position} width={textBoxRef1().width()} textAlign={"center"} fontSize={90*0.40} fill={"black"} zIndex={1} fontFamily={"Sans-Serif"}>{texts[i]}</Txt>)
117
+ yPos = textBoxRef1().y() + textBoxRef1().height()-2.5;
118
+ yield* waitFor(0.5);
119
+
120
+ }
121
+
122
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@revideo/2d/tsconfig.project.json",
3
+ "include": ["src"],
4
+ "compilerOptions": {
5
+ "noEmit": false,
6
+ "outDir": "dist",
7
+ "module": "CommonJS"
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ import {defineConfig} from 'vite';
2
+ import motionCanvas from '@revideo/vite-plugin';
3
+
4
+
5
+ export default defineConfig({
6
+ plugins: [
7
+ motionCanvas(),
8
+ ],
9
+ });
@@ -0,0 +1,29 @@
1
+ # Minimal Drag-and-Drop Example
2
+
3
+ This is an adapted version of the [Revideo](https://github.com/redotvideo/revideo) [NextJS SaaS template](https://github.com/redotvideo/examples/saas-template), demonstrating how you can build drag-and-drop editing functionality with Revideo.
4
+
5
+ https://github.com/user-attachments/assets/347cea86-a849-4938-9143-892134bc3276
6
+
7
+ ## Getting Started
8
+
9
+ First, install the dependencies both in the next/ and the revideo/ directories:
10
+
11
+ ```bash
12
+ (cd next && npm install) &&
13
+ (cd revideo && npm install)
14
+ ```
15
+
16
+ Then, serve the Revideo project using the CLI:
17
+
18
+ ```bash
19
+ (cd revideo && npx revideo serve)
20
+ ```
21
+
22
+ Now you can start your NextJS app using the following command:
23
+
24
+ ```bash
25
+ (cd next && npm run dev)
26
+ ```
27
+
28
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
29
+ result. Happy developing!
@@ -0,0 +1,22 @@
1
+ const RENDER_URL = 'http://localhost:4000/render';
2
+
3
+ async function getResponse(body: string) {
4
+ return await fetch(RENDER_URL, {
5
+ method: 'POST',
6
+ headers: {
7
+ 'Content-Type': 'application/json',
8
+ },
9
+ body,
10
+ });
11
+ }
12
+
13
+ export async function POST(request: Request) {
14
+ const body = await request.json();
15
+
16
+ const response = await getResponse(JSON.stringify(body));
17
+ if (!response.ok) {
18
+ return new Response('Failed to render', {status: 500});
19
+ }
20
+
21
+ return new Response(response.body, {status: 200});
22
+ }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,25 @@
1
+ import type {Metadata} from 'next';
2
+ import {Inter} from 'next/font/google';
3
+ import './globals.css';
4
+
5
+ const inter = Inter({subsets: ['latin']});
6
+
7
+ export const metadata: Metadata = {
8
+ title: 'Create Next App',
9
+ description: 'Generated by create next app',
10
+ };
11
+
12
+ export default function RootLayout({
13
+ children,
14
+ }: Readonly<{
15
+ children: React.ReactNode;
16
+ }>) {
17
+ return (
18
+ <html lang="en">
19
+ <head>
20
+ <link rel="stylesheet" href="http://localhost:4000/player/project.css" />
21
+ </head>
22
+ <body className={inter.className}>{children}</body>
23
+ </html>
24
+ );
25
+ }