INNER CODE UNIT · JavaScript

y

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

	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) {
	e.preventDefault();
});

function stickTouchStart(e) {
	setControlMode();
	callNativeApp('controlStart');

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…