QuirkyCort / gears

Generic Educational Robotics Simulator
Other
65 stars 41 forks source link

Pause/stop Babylon rendering when Simulator invisible to save battery #75

Closed germanicianus closed 3 years ago

germanicianus commented 3 years ago

This is really important for mobile devices like tablets used in schools for education. ~ 40 % of my CPU/iGPU are used when just the block view is visible and I do nothing. When I used gears on my phone, ~ 10 % of my battery were drain in a very short time. gears_cpu_usage_when_sim_invisible

QuirkyCort commented 3 years ago

Modified it so that the 3D rendering will only run if the simulator tab is opened, or if the user's program is running.

germanicianus commented 3 years ago

Works -> Close issue. Implemented with https://github.com/QuirkyCort/gears/commit/cf1ae84c1338b441f9b724980bf68834ce66c44a.