I'm currently attempting to re-create the same effect that iOS utilizes on their parallax wallpapers utilizing this module — https://github.com/joshmtucker/OrientationEvents
I'm running into some issues where it appears as though I can only cause motion to happen along one axis at a time, similar to the example given in the github repo.
This is the script I have atm:
sketch = Framer.Importer.load("imported/[email protected]")
module = require "OrientationEvents"
screenHeight = Framer.Device.screen.height
screenWidth = Framer.Device.screen.width
module.smoothOrientation = .35
Utils.interval .1, ->
gamma = module.orientation.gamma
beta = module.orientation.beta
midX: Utils.modulate(gamma, [-8, 8], [50, 575], true)
midy: Utils.modulate(beta, [-8, 8], [175, 575], true)
curve: "spring(450, 110, 0)"
Anyone have any idea what I might be missing? Thanks! I'm getting the feeling I'm messing up the utils.modulate stuff, which I'm still trying to understand completely.