WICG / proposals

A home for well-formed proposed incubations for the web platform. All proposals welcome.
https://wicg.io/
Other
234 stars 16 forks source link

HapticsDevice API #34

Open bmathwig opened 3 years ago

bmathwig commented 3 years ago

Introduction

In today's device ecosystem, there are several types of haptic-enabled surfaces:

While solutions such as navigator.vibrate() and GamepadHapticActuator aim to expose a limited set of these haptic capabilities to the web, web developers today do not have the ability to harness the majority of these surfaces as they do on native platforms. This prevents them from building tactile experiences that physically engage users, help them understand when critical activities have succeeded or failed, or immerse them by simulating virtual textures/actions.

Goals

  1. Provide web developers with access to more haptic-enabled devices and features during user interaction
  2. Give developers a mechanism to leverage both pre-defined and custom haptic waveforms on hardware/platforms that support them
  3. Define a flexible enough API surface to enable support for extensions in the future (see Potential Extensions)

Featured Use Case

A new generation of gaming controllers are built on buffered haptics and Linear Resonance Actuators (LRAs). Notable devices are the Nintendo Switch JoyCon, Playstation's DualSense, and the HTC Vive Wands. Using the existing haptics APIs for Gamepad, there is no way to fully take advantage of the haptic capabilities of these devices. With this new Haptics API, it would provide an extensible interface to allow developers to create rich XR and gaming experiences on the web.

Read the complete Explainer

Feedback

Please provide all feedback below.

I welcome feedback in this thread, but encourage you to file bugs against HapticsDevice API Explainer.

yoavweiss commented 6 months ago

Is this still something that y'all are interested in championing?

/cc @scottlow @nondebug @sagoston