Verge3D active even if window loses focus

Home Forums General Questions Verge3D active even if window loses focus

This topic contains 2 replies, has 2 voices, and was last updated by Avatar d3pixel 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17831
    Avatar
    d3pixel
    Newbie

    Hi

    I just noticed that my GPU was running flat out even though the Verge3D browser tab was not in focus or the active application.

    Shouldn’t it automatically disable the renderer when the browser or tab loses focus to save battery power on mobile devices?

    Thanks

    #17832
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi,

    You can detect if a tab is visible using onblur/onfocus events, and stop or resume the rendering accordingly. To make this work, add the following lines to the runCode function of your application js file:

    See more on using JavaScript here
    https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #17847
    Avatar
    d3pixel
    Newbie

    Thanks for the quick answer Yuri

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.