clojurebridge-berlin / study-group-curriculum

The home of the Clojure Berlin study group
3 stars 1 forks source link

[Curriculum] Week 3 - User Interaction #4

Closed vsmart closed 7 years ago

vsmart commented 7 years ago

Learning goal

The topic of week 3 is to use Quil's user interaction functions to make a simple animation that the user can interact with. For example this could use the mouse-x and mouse-y, or the key event input functions.

Todo in preparation

Robsteranium commented 7 years ago

IIRC once mouse-{x,y} enter the sketch the animation can get pretty wild and confusing (thanks trigonometry)! I wonder if this lesson should also explain e.g. printf debugging (so you can see what the mouse position actually is etc)...

Realtin commented 7 years ago

here an example: https://github.com/Realtin/clojure-bridge that was my project when I was an attendee. A rectangle that follows the mouse and changes color and size accordingly + has lines attached to the edges of the screen and the edges of the rectangle

lislis commented 7 years ago

@Realtin that it AWESOME!

vsmart commented 7 years ago

very cool! @Realtin do you want to open a pr to push it to the repo?

Realtin commented 7 years ago

will do!

vsmart commented 7 years ago

We have an example for Week 3, added in #11.