draggable translate with easing (like google maps).. possible?
in
Programming Questions
•
1 year ago
Hi, I'm having trouble understanding how or if it's possible to get an easing effect with translate when the mouse is released. So is this possible? Am I moving in the right direction? My goal is to ease a bunch of different shapes together after the user releases the mouse, similar to the interaction on google maps. Any feedback would be greatly appreciated. I am new to processing and programming in general.
- void setup(){
smooth();
size(800, 500);
}
void draw(){
background(0, 0, 0);
smooth();
strokeWeight(1);
fill(0, 255, 255)
stroke(255, 102, 0);
beginShape();
vertex(200, 200);
vertex(250, 250);
vertex(200, 300);
vertex(150, 250);
endShape();
}
void mouseDragged(){
translate(mouseX-pmouseX, mouseY-pmouseY)
}
void mouseReleased(){
//animate translation movement.. possible?
}
1