🎥 Make videos programmatically with React
remove rotate
JonnyBurgerb096d1cd52f3
diff --git a/packages/template-prompt-to-video/cli/timeline.ts b/packages/template-prompt-to-video/cli/timeline.tsindex b6fe21f465..a17210eae1 100644--- a/packages/template-prompt-to-video/cli/timeline.ts+++ b/packages/template-prompt-to-video/cli/timeline.ts@@ -136,22 +136,6 @@ export const getBgAnimations = (durationMs: number, zoomIn: boolean) => {endMs,});- // eslint-disable-next-line @remotion/deterministic-randomness- const randomDir = Math.random() > 0.5 ? 1 : -1;- // eslint-disable-next-line @remotion/deterministic-randomness- const randomDeg = Math.random() * 10 * randomDir;- // eslint-disable-next-line @remotion/deterministic-randomness- const startAtZero = Math.random() > 0.5;-- // rotate- animations.push({- type: "rotate",- from: startAtZero ? 0 : randomDeg,- to: startAtZero ? randomDeg : 0,- startMs,- endMs,- });-return animations;};@@ -163,22 +147,6 @@ export const getTextAnimations = () => {const startMs = 0;const endMs = durationMs;- // eslint-disable-next-line @remotion/deterministic-randomness- const randomDir = Math.random() > 0.5 ? 1 : -1;- // eslint-disable-next-line @remotion/deterministic-randomness- const randomDeg = Math.random() * 10 * randomDir;- // eslint-disable-next-line @remotion/deterministic-randomness- const dontRotate = Math.random() > 0.5;-- // rotate- animations.push({- type: "rotate",- from: dontRotate ? 0 : randomDeg,- to: 0,- startMs,- endMs,- });-// start scale from 0.5 to 0.7// eslint-disable-next-line @remotion/deterministic-randomnessconst startScale = Math.random() * 0.2 + 0.5;diff --git a/packages/template-prompt-to-video/public/content/history-of-venus/timeline.json b/packages/template-prompt-to-video/public/content/history-of-venus/timeline.jsonindex 95bc2d04c2..1bea8d3482 100644--- a/packages/template-prompt-to-video/public/content/history-of-venus/timeline.json+++ b/packages/template-prompt-to-video/public/content/history-of-venus/timeline.json@@ -13,13 +13,6 @@"to": 1,"startMs": 0,"endMs": 7616- },- {- "type": "rotate",- "from": 0,- "to": -7.105360115918952,- "startMs": 0,- "endMs": 7616}]},@@ -36,13 +29,6 @@"to": 1.5,"startMs": 0,"endMs": 4319- },- {- "type": "rotate",- "from": 0,- "to": -4.835479712748861,- "startMs": 0,- "endMs": 4319}]},@@ -59,13 +45,6 @@"to": 1,"startMs": 0,"endMs": 6827- },- {- "type": "rotate",- "from": 1.9870856892182087,- "to": 0,- "startMs": 0,- "endMs": 6827}]},@@ -82,13 +61,6 @@"to": 1.5,"startMs": 0,"endMs": 5991- },- {- "type": "rotate",- "from": 0,- "to": -8.6385189197096,- "startMs": 0,- "endMs": 5991}]},@@ -105,13 +77,6 @@"to": 1,"startMs": 0,"endMs": 4133- },- {- "type": "rotate",- "from": 1.0522832008779737,- "to": 0,- "startMs": 0,- "endMs": 4133}]},@@ -128,13 +93,6 @@"to": 1.5,"startMs": 0,"endMs": 5201- },- {- "type": "rotate",- "from": 0,- "to": 1.3607085888199189,- "startMs": 0,- "endMs": 5201}]},@@ -151,13 +109,6 @@"to": 1,"startMs": 0,"endMs": 6409- },- {- "type": "rotate",- "from": -4.804644959713991,- "to": 0,- "startMs": 0,- "endMs": 6409}]},@@ -174,13 +125,6 @@"to": 1.5,"startMs": 0,"endMs": 13560- },- {- "type": "rotate",- "from": 0,- "to": -2.2489889673202015,- "startMs": 0,- "endMs": 13560}]}@@ -192,13 +136,6 @@"text": "Once upon a","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -221,13 +158,6 @@"text": "time, long","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5070892202427698,@@ -243,13 +173,6 @@"text": "before","position": "center","animations": [- {- "type": "rotate",- "from": 7.41129280579405,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.650247613480069,@@ -272,13 +195,6 @@"text": "telescopes","position": "center","animations": [- {- "type": "rotate",- "from": -0.11120221155174304,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -294,13 +210,6 @@"text": "watched the","position": "center","animations": [- {- "type": "rotate",- "from": 9.750771800621902,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -316,13 +225,6 @@"text": "sky, people","position": "center","animations": [- {- "type": "rotate",- "from": 8.39953751401852,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5312906191856691,@@ -338,13 +240,6 @@"text": "looked up and","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6984326431081123,@@ -367,13 +262,6 @@"text": "saw a bright","position": "center","animations": [- {- "type": "rotate",- "from": 4.810947315043355,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6445892502264121,@@ -396,13 +284,6 @@"text": "star, not","position": "center","animations": [- {- "type": "rotate",- "from": 0.7876225703042095,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -425,13 +306,6 @@"text": "knowing it was","position": "center","animations": [- {- "type": "rotate",- "from": -7.638214320691771,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -454,13 +328,6 @@"text": "Venus.","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -476,13 +343,6 @@"text": "The ancient","position": "center","animations": [- {- "type": "rotate",- "from": -9.327898518604613,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -505,13 +365,6 @@"text": "Romans named","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.662161653933625,@@ -534,13 +387,6 @@"text": "it after their","position": "center","animations": [- {- "type": "rotate",- "from": 4.508359665555006,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -556,13 +402,6 @@"text": "goddess of","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6388131110354789,@@ -578,13 +417,6 @@"text": "love because","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6323294044608418,@@ -600,13 +432,6 @@"text": "of its","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -622,13 +447,6 @@"text": "beautiful","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.689881743853058,@@ -651,13 +469,6 @@"text": "glow.","position": "center","animations": [- {- "type": "rotate",- "from": -9.201159551524198,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5843134627873369,@@ -673,13 +484,6 @@"text": "Incredibly,","position": "center","animations": [- {- "type": "rotate",- "from": -2.16017933512608,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -695,13 +499,6 @@"text": "there were","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6822711271671517,@@ -724,13 +521,6 @@"text": "times it was","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6171702148398952,@@ -753,13 +543,6 @@"text": "called both","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -782,13 +565,6 @@"text": "the 'Morning","position": "center","animations": [- {- "type": "rotate",- "from": 2.8532779795346332,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6213784824708739,@@ -804,13 +580,6 @@"text": "Star' and the","position": "center","animations": [- {- "type": "rotate",- "from": -4.941277294991979,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -826,13 +595,6 @@"text": "'Evening","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.679307191316065,@@ -855,13 +617,6 @@"text": "Star'—no one","position": "center","animations": [- {- "type": "rotate",- "from": 4.788781402097829,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6175949484127287,@@ -884,13 +639,6 @@"text": "realized they","position": "center","animations": [- {- "type": "rotate",- "from": 8.934363232174972,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -913,13 +661,6 @@"text": "were the same","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -935,13 +676,6 @@"text": "planet!","position": "center","animations": [- {- "type": "rotate",- "from": -1.2693799782520299,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -964,13 +698,6 @@"text": "Unlike any","position": "center","animations": [- {- "type": "rotate",- "from": -5.637661922079329,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.59875153690998,@@ -993,13 +720,6 @@"text": "other planet,","position": "center","animations": [- {- "type": "rotate",- "from": 3.533298688930447,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5666186805089255,@@ -1022,13 +742,6 @@"text": "Venus spins","position": "center","animations": [- {- "type": "rotate",- "from": -3.630883509152363,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6654676119000248,@@ -1051,13 +764,6 @@"text": "backwards, so","position": "center","animations": [- {- "type": "rotate",- "from": -9.736131114877832,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6171542494318256,@@ -1073,13 +779,6 @@"text": "the Sun rises","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6799068445538758,@@ -1102,13 +801,6 @@"text": "in the west","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6524040045014661,@@ -1131,13 +823,6 @@"text": "and sets in","position": "center","animations": [- {- "type": "rotate",- "from": -3.137604031495914,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6973740497614885,@@ -1160,13 +845,6 @@"text": "the east.","position": "center","animations": [- {- "type": "rotate",- "from": -9.091707303457586,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1182,13 +860,6 @@"text": "Its days are","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5017647501826319,@@ -1204,13 +875,6 @@"text": "longer than","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5972452883935493,@@ -1233,13 +897,6 @@"text": "its years,","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.564986619802243,@@ -1262,13 +919,6 @@"text": "making time","position": "center","animations": [- {- "type": "rotate",- "from": 2.489366052844666,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6018507711057028,@@ -1284,13 +934,6 @@"text": "seem strange","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5782847024126105,@@ -1306,13 +949,6 @@"text": "up there.","position": "center","animations": [- {- "type": "rotate",- "from": -4.190740069548097,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5055966053795952,@@ -1335,13 +971,6 @@"text": "Volcanoes","position": "center","animations": [- {- "type": "rotate",- "from": -4.914984260179916,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5629222453413919,@@ -1357,13 +986,6 @@"text": "cover much of","position": "center","animations": [- {- "type": "rotate",- "from": 6.033671475696686,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5699858221834716,@@ -1379,13 +1001,6 @@"text": "its surface,","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5950691148336467,@@ -1401,13 +1016,6 @@"text": "but thick","position": "center","animations": [- {- "type": "rotate",- "from": -6.155938430802468,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5566802724360221,@@ -1423,13 +1031,6 @@"text": "clouds of","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5366881194737613,@@ -1445,13 +1046,6 @@"text": "toxic gas hide","position": "center","animations": [- {- "type": "rotate",- "from": 0.6156000954485374,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1467,13 +1061,6 @@"text": "them from our","position": "center","animations": [- {- "type": "rotate",- "from": -0.2956705455966857,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6484750077540622,@@ -1496,13 +1083,6 @@"text": "view.","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5735095017110776,@@ -1525,13 +1105,6 @@"text": "Although it is","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1554,13 +1127,6 @@"text": "Earth's twin","position": "center","animations": [- {- "type": "rotate",- "from": -9.088208117785825,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6985425271710941,@@ -1576,13 +1142,6 @@"text": "in size, Venus","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6887989441787467,@@ -1598,13 +1157,6 @@"text": "is the hottest","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6311379480437896,@@ -1620,13 +1172,6 @@"text": "planet, with","position": "center","animations": [- {- "type": "rotate",- "from": 3.0880349550652064,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5681166169682664,@@ -1649,13 +1194,6 @@"text": "surface","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.654541893694066,@@ -1678,13 +1216,6 @@"text": "temperatures","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1700,13 +1231,6 @@"text": "high enough to","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6818260316184099,@@ -1722,13 +1246,6 @@"text": "melt lead.","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5424967449824123,@@ -1744,13 +1261,6 @@"text": "Despite its","position": "center","animations": [- {- "type": "rotate",- "from": -7.735823281290651,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5271325069222614,@@ -1766,13 +1276,6 @@"text": "harsh","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1788,13 +1291,6 @@"text": "environment,","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1810,13 +1306,6 @@"text": "it continues","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6036401812144718,@@ -1839,13 +1328,6 @@"text": "to spark our","position": "center","animations": [- {- "type": "rotate",- "from": -3.853160721805775,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1861,13 +1343,6 @@"text": "imagination,","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1890,13 +1365,6 @@"text": "reminding us","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1912,13 +1380,6 @@"text": "that mysteries","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -1934,13 +1395,6 @@"text": "often hide in","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6491396876752396,@@ -1963,13 +1417,6 @@"text": "plain sight.","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6418804091035437,@@ -1992,13 +1439,6 @@"text": "People dream","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5264743831317681,@@ -2014,13 +1454,6 @@"text": "that one day,","position": "center","animations": [- {- "type": "rotate",- "from": -7.039075133181622,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -2036,13 +1469,6 @@"text": "we might find","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.5898792305191535,@@ -2058,13 +1484,6 @@"text": "a way to","position": "center","animations": [- {- "type": "rotate",- "from": 1.6760108455025668,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6063143077570282,@@ -2087,13 +1506,6 @@"text": "explore its","position": "center","animations": [- {- "type": "rotate",- "from": 0.19277359187750642,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6772011243839006,@@ -2116,13 +1528,6 @@"text": "hidden secrets","position": "center","animations": [- {- "type": "rotate",- "from": -3.0010986713851064,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 1,@@ -2138,13 +1543,6 @@"text": "up close.","position": "center","animations": [- {- "type": "rotate",- "from": 0,- "to": 0,- "startMs": 0,- "endMs": 300- },{"type": "scale","from": 0.6598653425552847,@@ -2205,4 +1603,4 @@}],"shortTitle": "History of Venus"-}\ No newline at end of file+}diff --git a/packages/template-prompt-to-video/src/lib/types.ts b/packages/template-prompt-to-video/src/lib/types.tsindex 394f9f7162..ad0c9c423a 100644--- a/packages/template-prompt-to-video/src/lib/types.ts+++ b/packages/template-prompt-to-video/src/lib/types.ts@@ -13,7 +13,7 @@ const TimelineElementSchema = z.object({});const ElementAnimationSchema = TimelineElementSchema.extend({- type: z.union([z.literal("scale"), z.literal("rotate")]),+ type: z.literal("scale"),from: z.number(),to: z.number(),});