xeogl icon indicating copy to clipboard operation
xeogl copied to clipboard

Can't destroy the scene in order to create it again. "scene is not defined".

Open SoulDesignerTom opened this issue 2 years ago • 0 comments

Describe the bug I'm trying to use xeogl for a website. The problem is that i have multiple scenes defined like:

var scene = new xeogl.Scene({ id: 'lcb', canvas: "lcbCanvas" });

Everything works very well - except i would like to make performance better and destroy scene every time it closes on click function. I'm trying to use something like:

scene.destroy() each time i'm closing view of the scene. But i've got an error: Uncaught ReferenceError: scene is not defined.

I was also trying to manually remove <canvas> from HTML DOM - but then when i wanna create scene again it sais that scene already exists: xeogl.js:27978 [ERROR] Scene 'lcb' already exists.

I was even trying to make variable var scene = global like scene = but it still doesn't work. It doesn't give an error again about scene is not defined but - i still cannot recreate it.

Expected behavior It should work: scene.destroy(); to eliminate scene.

SoulDesignerTom avatar May 01 '23 05:05 SoulDesignerTom