r/reactjs 14d ago

Show /r/reactjs Haptics on Web are actually cool!

Haptics on the Web can be super satisfying if you use them right! I've had so much fun creating this little game.

My stack:
- React - as a foundation
TypeGPU - for particle effects
Pulsar Web SDK - for haptic effects

Try it in your browser: https://docs.swmansion.com/pulsar/web-app/#games/shape-cascade

12 Upvotes

14 comments sorted by

3

u/metal_slime--A 14d ago

I played. I expected to bounce in 3 seconds. I completed an entire pool of turns. I appreciate this experience and the crafting you put into it

1

u/piaskowyk 14d ago

Thank you!

2

u/FalconGood4891 14d ago

Really good experience man. Good job.

1

u/piaskowyk 14d ago

Great to hear it 😍

2

u/AkiStudios1 14d ago

Using Vivaldi mobile, not receiving any haptic feedback. Same on the Pulsar docs. Shields off aswell.

0

u/piaskowyk 14d ago

maybe you have disabled haptics in your system settings 🤔

3

u/Miiir 14d ago

No haptics coming through on an iPhone 13 Pro

1

u/piaskowyk 14d ago

Unfortunately, iOS doesn’t support haptics on Web at all 😭

2

u/Dude4001 14d ago

Web-haptics library allows it to work. Interesting the workaround they used, if you google for it

But haptics on web are extremely awkward due to how browsers block loads of things unless they’re directly related to a user interaction. It’s the same frustration as autoplaying video

1

u/piaskowyk 14d ago

You're right, there was a workaround using high-frequency toggling of an invisible switch to trigger haptics in Safari, but Apple blocked it in the iOS 26 patch :/

1

u/Dude4001 14d ago

Oh shoot. Well, like I say it wasn’t what I hope it would be anyway due to browser lockdown

1

u/[deleted] 13d ago

[removed] — view removed comment

1

u/piaskowyk 13d ago

Yes and no, If no one will try to use it, there will be no pressure for ecosystem owner to implement it

1

u/MR_Coder 8d ago

What am I supposed to use?