Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add(greener => new UIState {
- on(mouse clicked) --> new UIState {
- implicit val twin = Linear(1 second)
- val init = mouse.position.copy
- val alpha = Cell(0.0) ~> 1
- val rect = Rectangle(init, init+(30,30))
- draw(rect fill Color(green, alpha))
- on (mouse released) --> new UIState {
- implicit val twin = Linear(1 second)
- draw(rect fill Color(green, Cell(!alpha) ~> 0))
- on (twin finished) --> greener()
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement