mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-14 01:22:20 +00:00
Wibbles.
This commit is contained in:
parent
e94e340d18
commit
d1d1906250
3 changed files with 10 additions and 4 deletions
|
|
@ -782,7 +782,9 @@ gooEffect = mkAnimation 5 $ do
|
|||
& compositeIn .~ pure SourceGraphic
|
||||
& compositeIn2 .~ pure (SourceRef "goo")
|
||||
& compositeOperator .~ CompositeAtop
|
||||
] & filterHeight .~ pure (Percent 3)
|
||||
] & filterWidth .~ pure (Percent 3)
|
||||
& filterX .~ pure (Percent (-1))
|
||||
& filterHeight .~ pure (Percent 3)
|
||||
& filterY .~ pure (Percent (-1))
|
||||
emit $ translate 0 (-radius*2) $ withFillColor "red" $ mkGroup
|
||||
[ translate (s*(-radius)) 0 circ
|
||||
|
|
@ -799,7 +801,7 @@ gooEffect = mkAnimation 5 $ do
|
|||
where
|
||||
sharpness = 60
|
||||
dev = 10
|
||||
radius = 25
|
||||
radius = 30
|
||||
circ = CircleTree $ defaultSvg
|
||||
& circleCenter .~ (Num 0, Num 0)
|
||||
& circleRadius .~ Num radius
|
||||
|
|
|
|||
|
|
@ -53,11 +53,13 @@ renderFormat :: Format -> Animation -> FilePath -> IO ()
|
|||
renderFormat format ani target = do
|
||||
putStrLn $ "Starting render of animation: " ++ show (round (duration ani)) ++ "s"
|
||||
ffmpeg <- requireExecutable "ffmpeg"
|
||||
generateFrames ani 320 fps $ \template ->
|
||||
generateFrames ani 640 fps $ \template ->
|
||||
withTempFile "txt" $ \progress -> writeFile progress "" >>
|
||||
case format of
|
||||
RenderMp4 ->
|
||||
runCmd ffmpeg ["-r", show fps, "-i", template, "-y"
|
||||
, "-c:v", "libx264", "-vf", "fps="++show fps
|
||||
, "-progress", progress
|
||||
, "-pix_fmt", "yuv420p", target]
|
||||
RenderGif -> withTempFile "png" $ \palette -> do
|
||||
runCmd ffmpeg ["-i", template, "-y"
|
||||
|
|
@ -66,12 +68,14 @@ renderFormat format ani target = do
|
|||
, palette ]
|
||||
runCmd ffmpeg ["-i", template, "-y"
|
||||
,"-i", palette
|
||||
,"-progress", progress
|
||||
,"-filter_complex"
|
||||
,"fps="++show fps++",scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse"
|
||||
,"-t", show (duration ani)
|
||||
, target]
|
||||
RenderWebm ->
|
||||
runCmd ffmpeg ["-r", show fps, "-i", template, "-y"
|
||||
,"-progress", progress
|
||||
, "-c:v", "libvpx-vp9", "-vf", "fps="++show fps
|
||||
, target]
|
||||
RenderBlank -> return ()
|
||||
|
|
|
|||
Loading…
Reference in a new issue