Wanted to share something I did at work over new years, I wanted to do a snowglobe shake effect. I used a bunch of methods but out QA app was really making it chug so I went trough a lot of versions with different engines. They all run fine on android, ios etc, it’s just within our environment they didn’t run so I ended up using GSAP’s pay for physics extension which isn’t really a physics library , but a small collection of scripts to simulate acceleration for div tags.
[Click on the icon to trigger it if you’re on desktop]
Unfortunately the GSAP file won’t have the library because it’s pay for but the scripts attaching to it are still there
But yeah I wanted to share in case anyone is wondering how to work with physics libraries within hype.
I also incorporated Shake.JS and DeviceApi Normaliser. The second because i originally had a way to detect the angle of the tablet so the snow tilts with the tablet. But yeah, lag(just in our app).
For the record
Easiest to use: PhysicsJS
Most Flexible: PhysicsJS
Ran the fastest: GSAP
(but again pseudo physics, does not use canvas)