github spaansba/ForesightJS V3.3.0
V3.3.0 - Full Touch Device Support! 📱

latest releases: V3.3.2, V3.3.1
2 months ago

V3.3.0 js.foresight

This version introduces first-party touch device support for mobile and pen interactions. While desktop systems use multiple concurrent prediction strategies (mouse trajectory, keyboard navigation, scroll detection), touch devices operate with a single configurable strategy:

  • onTouchStart (default) - Fires callbacks immediately when users begin touching an element, providing instant feedback before the touch interaction completes. (Conservative while saving bandwidth)
  • Viewport - Triggers callbacks when elements enter the user's viewport. (Aggressive but offers a snappier experience)

The strategy can be configured while initializing the ForesightManager as seen below:

ForesightManager.initialize({
  touchDeviceStrategy: "viewport" // viewport, onTouchStart, none
})

Foresight also automatically switches between pen, mouse, and touch mode. Even mid-session.


Features

Changes

  • Now removes all handlers when there are no active elements anymore.
  • Removed trajectoryHitData from ForesightElementData since it is not needed anymore for calculations.

Others

V1.3.1 js.foresight-devtools

Changes

  • Elements in the element tab will turn purple while in touch device mode.
  • Log tab now supports the new deviceStrategyChanged event.
  • Settings tab allows for real-time altering of the touchDeviceStrategy

Docs:

Don't miss a new ForesightJS release

NewReleases is sending notifications on new releases.