Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by Joncom

Is it just me or are the bindTouch, touchStart, and touchEnd functions in "input.js" not used at all?

9 years ago by AndrewMast

Those are used in plugins and mobile device buttons. (At least, that is what I use 'em for)

-Andrew

9 years ago by Joncom

I think even if you removed the above mentioned code, mobile touch buttons would continue to work. Because touchstart, touchend, and touchmove events still get bound in the initMouse function.

9 years ago by AndrewMast

Yes, it binds touch to the canvas, but not to a specific element.

The function bindTouch binds touch to a certain element. (And uses touchStart and touchEnd to do that)

For example, you have an external div that acts as a button. You would run ig.input.bindtouch("#div", "jump") to link it up to an action.

-Andrew
Page 1 of 1
« first « previous next › last »