ChristopherChudzicki / math3d

Legacy version: Use math3d-react repo instead
MIT License
12 stars 4 forks source link

Frame rate related patches #83

Open stardust66 opened 7 years ago

stardust66 commented 7 years ago

I just made some patches for frame rate related things. They are on this branch. Apply them with git apply and revert them with git apply -R. show-fps.patch displays the fps in the header bar, and restrict-fps.patch restricts the frame rate to about 20 fps with a setTimeout. It was suggested by Mr. Doob himself: https://stackoverflow.com/questions/11285065/limiting-framerate-in-three-js-to-increase-performance-requestanimationframe.

Cutting down the frame rate stops the overheating problem, and probably increases battery life too. Maybe it should be an option in the settings?

stardust66 commented 7 years ago

I guess it's kinda weird to use patches now that the changes are on a branch by themselves... I was playing around with git.

ChristopherChudzicki commented 7 years ago

Cool! I jus tried this out and successfully limited the fps. My computer still had some overheating, but that is probably highly hardware dependent. (Plus I had two screens going, one high res ...) Anyway, need to experiment more.

In your experience, limiting the fps has helped with battery?

I like the idea of allowing users to limit (and perhaps display) FPS, but we would need a better way to do this dynamically. (Ideally, I think, without editing the vendor files.)

Thanks for this! I'll experiment more without the extra monitor.