You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Images that are referenced in animation queue (setting the image to a new image) are shown blank, unless they were previously referenced.
So initiating the animation with "up" shows "ballsub3" then each step in the animation queue that does not use "ballsub3" shows blank, as soon as the animation switches the image back to "ballsub3" the image shows correctly.
So if the image "ballsub3" is changed to "ballsub1" then when the "ballsub1" shows in the animation it is shown correctly but blank otherwise. If no image changes are made in the animation queue, animation runs as expected.
Nice find! The issue is that the app is out of memory, since it tries to load all images which are fullscreen. I've fixed it by naively unloading the least used image. It seems to work fine with your app.
Just a note, you'll notice your ball jitters with this fix. In order to get rid of the jitter, call the next callback in your animation callback functions at the very end, after the image is set.
Images that are referenced in animation queue (setting the image to a new image) are shown blank, unless they were previously referenced.
So initiating the animation with "up" shows "ballsub3" then each step in the animation queue that does not use "ballsub3" shows blank, as soon as the animation switches the image back to "ballsub3" the image shows correctly.
So if the image "ballsub3" is changed to "ballsub1" then when the "ballsub1" shows in the animation it is shown correctly but blank otherwise. If no image changes are made in the animation queue, animation runs as expected.
Demonstrated in this code
https://github.com/robgithub/PebbleMagic8Ball
Noted at dev forums
http://forums.getpebble.com/discussion/25981/swapping-images-in-animations-with-pebble-js-something-weird-happens#latest
p.s. Best to see on Pebble Time device or Aplite as Basalt will often not even cause the console.log('up pressed'); command to execute.
The text was updated successfully, but these errors were encountered: