Skip to content

Commit

Permalink
Update sketch.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nmsderp authored Mar 30, 2024
1 parent c3afa18 commit 33d2c03
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions editor_new/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ function basicMoveBack() {
}
function sineMove() {
// Update the y position using sine wave movement
y = 175 + amplitude * sin(angle);
y = 175 + amplitude * Math.sin(angle);

// Increment the angle to create the oscillating motion
angle += frequency;

// Set a timeout to call the function again after the delay
setTimeout(sineMove, 350);
}

function gotomouse() {
Expand Down

0 comments on commit 33d2c03

Please sign in to comment.