I have an HTML5 application using 3 canvases, two of which contain a WebGL 3D scene rendered using Three.js
These three canvases are located inside a custom slidder that only displays one canvas at the time in full window size. The problem I have is that even if I load the three views during initialization, there is something that is not loaded in the non-visible webgl canvas until I slide to it, then it is loaded and displayed. When I say loaded I mean something in the render because the scene and all the methods work correctly from the start.
I detected this because during the first slide to this div, it takes some time and the controls get frizzed during this time, the user doesn't really know if he clicked properly because the active state of the "slide next" button is not activated until the end of this unknown loading. The slide animations are also skipped probably because this loading take more time than the slidding. Once it has been displayed once, the behavior is the correct one and it slides quickly from one view to the next one.
Is there an option in the render or maybe the browser to force this loading to occur even if the canvas is off screen? Ideally only during initialization because I dont want the GPU to render things that are not displayed, just preload them.