INNER CODE UNIT · JavaScript

y

CopterExpress/clover · apps/ios/cleverrc/main.js:70

	y = Math.min(2, y);

	stickPointer.style.left = (x * 50) + '%';
	stickPointer.style.top = (y * 50) + '%';

	x -= 1;
	y = 1 - y;

	if (target.matches('.stick-left')) {
		controlMessage.z = Math.round((y + 1) * 500);
		controlMessage.r = Math.round(x * 1000);
	} else if (target.matches('.stick-right')) {
		controlMessage.x = Math.round(y * 1000);
		controlMessage.y = Math.round(x * 1000);
	}
}

body.addEventListener('touchmove', function (e) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…