Created
August 11, 2013 21:16
-
-
Save chribben/6206884 to your computer and use it in GitHub Desktop.
Reactive circle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Signal | |
import Mouse | |
cl = (clamp 100 200) <~ Mouse.x | |
reactiveCircle = (filled blue) <~ (circle <~ (toFloat <~ cl)) | |
main = lift (collage 300 300) (Signal.combine [reactiveCircle]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There must be a nicer way to express this #elm_noob