Advertisement
AEAEAEAEarray

dvd animation

Sep 8th, 2021
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var cursor = {
  2.     pos: {x: 0, y: 0},
  3.     vel: {x:.1, y: .1},
  4.     mode: "vsine",
  5.     g: -.05,
  6.     a: 1,
  7.     follower: ""
  8. };
  9.  
  10. //mouse animation
  11. var cursorupdate = setInterval(function() {
  12.     if (cursor.pos.x > 100 || cursor.pos.x < 0) {
  13.                 cursor.vel.x = -cursor.vel.x;
  14.             }
  15.             if (cursor.pos.y > 100 || cursor.pos.y < 0) {
  16.                 cursor.vel.y = -cursor.vel.y;
  17.             }
  18.             cursor.pos.x += cursor.vel.x;
  19.             cursor.pos.y += cursor.vel.y;
  20. MPP.client.sendArray([{m:'m', x: cursor.pos.x, y: cursor.pos.y}])}, 50)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement