06-16-2018 04:01
06-16-2018 04:01
Hello,
I have a clock face with simple animations :
GUI
......
<g opacity="0"> <section width="100%" height="15%" > <section width="35%" height="100%"> <image class="icons cals"/> <text id="cals" class="entry"/> </section> <section x="67%" width="35%" height="100%"> <image class="icons floors"/> <text id="floors" class="entry"/> </section> </section> <animate class="hide_stats_animation" attributeName="opacity" begin="enable" from="1" to="0" dur="0.5" final="keep" /> <animate class="show_stats_animation" attributeName="opacity" begin="enable" from="0" to="1" dur="0.5" final="keep" /> </g>
.....
Java script
clock.granularity = "seconds";
let hide_stats_animation = document.getElementsByClassName("hide_stats_animation");
let show_stats_animation = document.getElementsByClassName("show_stats_animation");
....
changeClockButton.onactivate = function(evt) { if(stats_hidded) { show_stats_animation.forEach(function(anim) { anim.animate("enable"); }); } else{ hide_stats_animation.forEach(function(anim) { anim.animate("enable"); }); } stats_hidded = !stats_hidded; }
The code works great on the emulator but animations are slow on the fitbit versa.
Any idea ? Thanks
06-18-2018 02:07
06-18-2018 02:07