During today's studio we played with code that allowed for user interaction through the use of mouse variables. This first test track the circle's movement across the page but it was dragged back by whenever the mouse was clicked;
The further to the right of the screen you clicked the faster it was dragged back.
I then put in the same code but for the y values as well so its base movement was diagonally down at 45 degrees;
So relative to where you clicked the circle's path was adjusted.
...yeah...
This next series focussed on giving the user even less control. The circle was now attracted to the mouse instead of repelled by it and the x and y coordinates had a random value reassigned to them every cycle relative to their last position. The results were that when the user tried to drag it around the screen sometimes it resisted.
Lastly this one was more a play on how colour can make an interaction more exciting. This simple circle followed the mouse around the screen when it was dragged and left a little ghostly trail behind it where it went. The faster the drag the longer the tail got;
It was kinda cute...
No comments:
Post a Comment