Clean up Threejs WebGl contexts

后端 未结 3 1806
忘掉有多难
忘掉有多难 2021-02-05 06:03

I have a problem while cleaning up my WebGl-Scenes. I\'m using Three.js with a WebGlRenderer. In my application I have to change the views quite often and therefore need to rend

3条回答
  •  别那么骄傲
    2021-02-05 06:39

    You should create and use only one WebGlRenderer. In my SPA (single page application) I had weird problem with camera/scene in THREE.js after few redirects. It was because WebGlRenderer was created every time when one particular page was rendered. There was no error in console log (only the warning you wrote). Bug appeared as change in camera position and problems with rendering.

提交回复
热议问题