javascript - Where is the mouse handling code in notch's minecraft js code? -



javascript - Where is the mouse handling code in notch's minecraft js code? -

when @ notch's minecraft demo here - can drag on viewport trackpad , have perspective shift.

when @ david nolen's clojurescript version of demo here - not occur. (but impressive).

my question is: how handling input events? (is there special js trick?)

for illustration - when @ this code - see:

document.addeventlistener('touchstart', this.ontouch.bind(this), false); document.addeventlistener('touchmove', this.ontouch.bind(this), false); document.addeventlistener('touchend', this.ontouchend.bind(this), false);

edit: have questioned behaviour , said can't reproduce using mouse. fair plenty - can't reproduce mouse clicks either. recorded a video of me dragging viewport using trackpad.

javascript javascript-events keypress addeventlistener touchstart

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -