Touching works without PEP on a desktop browser

I read here: Interacting With Scenes | Babylon.js Documentation that First of all a reminder that for touch events in Babylon.js PEP is required.

But this example:

    scene.onPointerObservable.add(
        (pointerInfo: BABYLON.PointerInfo) =>
        {
            switch (pointerInfo.type)
            {
                case BABYLON.PointerEventTypes.POINTERDOWN:
                    console.log("POINTER DOWN");
                    break;
                case BABYLON.PointerEventTypes.POINTERUP:
                    console.log("POINTER UP");
                    break;
            }
        });

works without PEP in desktop browser with “Toggle device toolbar” in Chrome:
image

I cannot to check it on a real mobile device. Will it work on a real mobile device without PEP? I just do not use PEP because I use TypeScript and RequireJS/AMD. PEP does not have @types.

Adding @PolygonalSun but I’m not sure PEP is needed anymore (it seems the Playground does not reference it)… If that’s the case, I guess we should update the doc (@PirateJC).

2 Likes

I think pep is still required on some browsers like safari not support pointer events fully and older browsers if you need them.

3 Likes