Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images do not update correctly in animation context #71

Open
robgithub opened this issue Jun 27, 2015 · 1 comment
Open

Images do not update correctly in animation context #71

robgithub opened this issue Jun 27, 2015 · 1 comment

Comments

@robgithub
Copy link

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.

@Meiguro
Copy link

Meiguro commented Jul 10, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants