I’m here to address an issue related to synthetic events and their cross-browser compatibility.
in this particular case, i noticed that the pointerType event property in Safari is simply undefined, yet it’s present within the same scenario in Chrome.
this property has been accessible in native Safari PointerEvent for a while and perhaps it would be possible to extend the info for simulated events as well.
ps: I’m aware of possible workarounds for recognising the event source, yet I think it’s best to avoid them and have consistent information availability from within the babylon.
EDIT: @amoebachant sry, I just saw your comment on GitHub and it’s the same I wrote here
Summary
Safari registers a mousemove and not a pointermove event thus it’s missing the pointerType property. We should remove this piece of code from tools.ts/public static GetPointerPrefix(engine: AbstractEngine): string or do the “bad os” checking only on old Safari versions because Safari already supports pointermove.
// Special Fallback MacOS Safari...
if (
engine._badDesktopOS &&
!engine._badOS &&
// And not ipad pros who claim to be macs...
!(document && "ontouchend" in document)
) {
eventPrefix = "mouse";
}