flypup / duel-of-the-devs

Duel of the Devs Web Game. Continuation of GitHub Game Off 2012 entry.
http://minimonks.com
2 stars 1 forks source link

Support IE10 / Windows 8 touch events/enabled devices #8

Open robwalch opened 11 years ago

robwalch commented 11 years ago

http://jessefreeman.com/articles/from-webkit-to-windows-8-touch-events/

var msTouchEnabled = window.navigator.msPointerEnabled;

canvas.addEventListener('MSPointerDown', onTouchStart, false); canvas.addEventListener("MSPointerMove", onTouchMove, false); canvas.addEventListener('MSPointerUp', onTouchEnd, false);

.pointerType: MSPOINTER_TYPE_MOUSE 4 MSPOINTER_TYPE_PEN 3 MSPOINTER_TYPE_TOUCH 2

TODO: Windows Store integration winJS Windows.UI.ViewManagment http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx

See Jesse Freeman's execution:

https://github.com/gamecook/super-jetroid-starter-kit/blob/master/lib/bootstrap/platforms/win8.js