점진적인 변화 easing
변화값을 낮추어 부드럽게 하는 계수
float x; float y; float easing = 0.05; void setup() { size(640, 360); noStroke(); } void draw() { background(51); float targetX = mouseX; float dx = targetX - x; x += dx * easing; float targetY = mouseY; float dy = targetY - y; y += dy * easing; ellipse(x, y, 66, 66); }
댓글 없음:
댓글 쓰기