From 4a0dff5f9b80f4fe75691ad9bf5c819cf5e129eb Mon Sep 17 00:00:00 2001 From: David Date: Thu, 28 Feb 2019 14:27:10 +0100 Subject: [PATCH] Fix valentine preset. --- src/Reanimate/Examples.hs | 3 --- web/src/Presets.jsx | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Reanimate/Examples.hs b/src/Reanimate/Examples.hs index e8d01d0..2c1c9e8 100644 --- a/src/Reanimate/Examples.hs +++ b/src/Reanimate/Examples.hs @@ -641,7 +641,4 @@ valentine = o <- oscillate $ signal 0 1 n <- oscillate $ signalSCurve 2 0.9 1.1 emit $ scale n $ scale 2 $ withFillColor "white" $ withFillOpacity o txt - drawHeart = emit $ withFillColor "red" $ heartShape - hex n = if n < 0x10 then "0" ++ showHex (round n) "" - else showHex (round n) "" diff --git a/web/src/Presets.jsx b/web/src/Presets.jsx index acb5960..79111e5 100644 --- a/web/src/Presets.jsx +++ b/web/src/Presets.jsx @@ -191,8 +191,10 @@ animation = emit $ scale n $ scale 2 $ withFillColor "white" $ withFillOpacity o txt drawHeart = emit $ withFillColor "red" $ heartShape - hex n = if n < 0x10 then "0" ++ showHex (round n) "" - else showHex (round n) ""`; + +heartShape = + center $ rotateAroundCenter 225 $ mkPathString + "M0.0,40.0 v-40.0 h40.0a20.0 20.0 90.0 0 1 0.0,40.0a20.0 20.0 90.0 0 1 -40.0,0.0 Z"`; export default [ { name: "Examples"