摘要 |
In one embodiment, a method includes sending information to display an image on a screen. A scroll range for the image may be determined based on dimensions of the image. An origin position and an initial tilt of a gyroscope may also be determined for the image. Tilt measurements associated with the presentation of the image may be received as the gyroscope detects changes in tilt. A progress parameter may be determined based on at least the scroll range, the origin position, and the initial tilt. A scrolling presentation of the image may then be rendered based on the progress parameter. The scrolling presentation of the image may be smoothed by applying an RK4 solver to the tilt measurements to eliminate jitter due to hand tremors. A virtual spring effect may also be applied to give the scrolling presentation a bouncy effect as the edge of the image is reached. |