Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cursor = {
- pos: {x: 0, y: 0},
- vel: {x:.1, y: .1},
- mode: "vsine",
- g: -.05,
- a: 1,
- follower: ""
- };
- //mouse animation
- var cursorupdate = setInterval(function() {
- if (cursor.pos.x > 100 || cursor.pos.x < 0) {
- cursor.vel.x = -cursor.vel.x;
- }
- if (cursor.pos.y > 100 || cursor.pos.y < 0) {
- cursor.vel.y = -cursor.vel.y;
- }
- cursor.pos.x += cursor.vel.x;
- cursor.pos.y += cursor.vel.y;
- MPP.client.sendArray([{m:'m', x: cursor.pos.x, y: cursor.pos.y}])}, 50)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement