pc.EVENT_MOUSEUP vs 'mouseup'

Hi guys.

What is the difference between these commands?

this.app.mouse.on(‘mouseup’,…)
this.app.mouse.on(pc.EVENT_MOUSEUP, …);

this.app.touch.on(‘touchstart’, …);
this.app.touch.on(pc.EVENT_TOUCHSTART, …);

I’ve noticed that my old ipad2 IOS 9.3.5 doesn’t recognize mouse event but my android and my sister’s ipad mini do. I guess new devices can handle mouse event translating them to touch events and the old ones are not capable of doing it, am I right?

Well, it’s just a constant, so there is no difference for now, but you surely should use constant instead of raw event name.

image

Recognize problem is caused by something else. And you’re almost right about your device.

1 Like