mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-10 15:42:21 +00:00
Deploying to gh-pages from @ reanimate/reanimate@d0263d15aa 🚀
This commit is contained in:
parent
e0d4e31361
commit
70a0c88cbf
1 changed files with 1 additions and 1 deletions
|
|
@ -10,4 +10,4 @@ const snippets = [{"title": "Hello World","url": "https://reanimate.clozecards.c
|
|||
,{"title": "Camera","url": "https://reanimate.clozecards.com/JlWlOpJvDds/150.svg","code": "animation :: Animation\nanimation = docEnv $ mapA (withFillOpacity 1) $ scene $ do\n cam <- newObject Camera\n\n txt <- newObject $ center $ latex \"Fixed (non-cam)\"\n oModifyS txt $ do\n oTopY .= screenTop \n oZIndex .= 2\n\n circle <- newObject $ withFillColor \"blue\" $ mkCircle 1\n cameraAttach cam circle\n circleRight <- oRead circle oRightX\n\n box <- newObject $ withFillColor \"green\" $ mkRect 2 2\n cameraAttach cam box\n oModify box $ oLeftX .~ circleRight\n boxCenter <- oRead box oCenterXY\n\n small <- newObject $ center $ latex \"This text is very small\"\n cameraAttach cam small\n oModifyS small $ do\n oCenterXY .= boxCenter\n oScale .= 0.1\n \n oShow txt\n oShow small\n oShow circle\n oShow box\n\n wait 1\n\n cameraFocus cam boxCenter\n waitOn $ do\n fork $ cameraPan cam 3 boxCenter\n fork $ cameraZoom cam 3 15\n \n wait 2\n cameraZoom cam 3 1\n cameraPan cam 1 (V2 0 0)\n"}
|
||||
,{"title": "Fonts","url": "https://reanimate.clozecards.com/PvwohDtNPN9/150.svg","code": "fonts :: [(T.Text, TexConfig)]\nfonts =\n [ (\"Computer Modern\", defaultCfg)\n , (\"Calligra\", calligra)\n , (\"Noto\", noto)\n , (\"Helvetica\", helvet)\n , (\"Liberine\", libertine) ]\n\nanimation :: Animation\nanimation = env $\n scene $ do\n forM_ fonts $ \\(name, cfg) -> do\n play $ showCfg name cfg\n & setDuration 2\n & applyE (overBeginning 0.3 fadeInE)\n & applyE (overEnding 0.3 fadeOutE)\n\ndefaultCfg = TexConfig LaTeX [] []\n\nshowCfg :: T.Text -> TexConfig -> Animation\nshowCfg name cfg = scene $ do\n let title = scale 2 $ center $\n latexCfg cfg name\n line1 = center $ latexCfg cfg\n \"Pack My Box\"\n line2 = center $ latexCfg cfg\n \"With Five Dozen\"\n line3 = center $ latexCfg cfg\n \"Liquour Jugs\"\n\n header <- oNew title\n oModify header $\n oTopY .~ screenTop\n oShow header\n\n l1 <- oNew line1\n l1 `oBelow` header\n oShow l1\n\n l2 <- oNew line2\n l2 `oBelow` l1\n oShow l2\n\n l3 <- oNew line3\n l3 `oBelow` l2\n oShow l3\n wait 1\n\noBelow a b = do\n aBot <- oRead b oBottomY\n oModifyS a $ do\n oMarginTop .= 0\n oTopY .= aBot\n\nenv =\n addStatic (mkBackground \"white\") .\n mapA (withStrokeWidth 0)\n\n"}
|
||||
];
|
||||
const playgroundVersion = "2022-06-07 (a1d94)";
|
||||
const playgroundVersion = "2022-06-12 (d0263)";
|
||||
|
|
|
|||
Loading…
Reference in a new issue