KSEGOXF4C7LGLZQY372M7XMN77GRRJCNXDDEAEHY4RWMHPCTKCGQC
CUYB5CWV4TSF5O356V5RBNDXIIGQBS65AUKEWJOJMAP63ZFLTBYAC
KL5DR7IYWMHT3TSL5ADXKR6AQ2D2O2MAXNYQEEISGDDHQBA4H3EAC
SLRU4GGACOZ6NUQVAPZHE7G7NJXMUM2GKE6C3L6GNULR24WTYSLQC
x: f64, y: f64,
x: f64,
y: f64,
x: f32, y: f32,
x: f32,
y: f32,
Scroll { scroll: f64 },
Scroll { scroll: Vector2 },
fn mouse_scroll(amount: &f64) { Mouse::scroll(*amount as f32);
fn mouse_scroll(amount: &f64) {
Mouse::scroll(*amount as f32);
fn mouse_scroll(amount: &Vector2) { Mouse::scrollh(amount.x); Mouse::scroll(amount.y);
fn mouse_scroll(amount: &Vector2) {
Mouse::scrollh(amount.x);
Mouse::scroll(amount.y);
const sign = Math.sign(starttouch.y - position.y);
const signX = Math.sign(position.x - starttouch.x); const signY = Math.sign(starttouch.y - position.y);
const signX = Math.sign(position.x - starttouch.x);
const signY = Math.sign(starttouch.y - position.y);
const scroll = sign * (state.scrollSpeed / 20);
const scrollMod = state.scrollSpeed / 20;
state.ws?.send(JSON.stringify({ scroll }));
state.ws?.send( JSON.stringify({ scroll: { x: signX * scrollMod, y: signY * scrollMod, }, }) );
state.ws?.send(
JSON.stringify({
scroll: {
x: signX * scrollMod,
y: signY * scrollMod,
},
})
);
- add horizontal scrolling