Hello Hype friends!
I am a few weeks away from publishing a new book series on Apple Books (an interactive music sight reading series). I'm trying to tune the performance of the app because (despite tons of optimizations) the animation is fairly heavy and it's affecting the performance on some devices.
In the Apple Books support docs "Tips for Performance in Books with JavaScript" article (attached), it states "Use CSS 3D transforms instead of setting top/bottom/left/right position. This creates smoother transitions because they are hardware accelerated, but should be reserved for high-priority elements."
So, I'm wondering if anyone knows more about this? Can I trigger CSS 3D transforms from a custom javascript function instead of from built-in Hype positioning? Does this sound right that doing so might give me a hardware accelerated performance boost? Or is there another way to achieve hardware accelerated animations?
For context: I'm dragging a group of layered svg's horizontally across the screen in order to simulate scrolling sheet music. I'm trying to make the sheet music scroll as smoothly as possible. On iPhone (in particular), the scrolling is choppy and chugging. I'm looking for any tips on how to increase animation smoothness and performance, and in particular I'm wondering if CSS 3D transforms is a way to do it?
I'd be happy to share the project if that would be helpful. Any information would be greatly appreciated! Thanks so much