Blender to Playground - Realtime Link

Yeah it’s a known issue due to lack of code cleaning on my side :stuck_out_tongue_closed_eyes:
It happens only if you hit “Run” twice in the Playground, because I’m using setTimeout which is never reset. After Running the Playground again, there is still the routine (pure JS from the previous session) running, on a disposed Scene.


By the way, there are tons of such bugs you can trigger by using setInterval or setTimeout in the Playground. I had proposed an edit of these functions within the Playground in this topic but as @RaananW said, it’s better not to tweet native API. Best is to do clean code :stuck_out_tongue_closed_eyes: . I was missing a clean using scene.onDisposeObservable. Here is a fixed Playground


For sure there is something to be done here. I thought about it multiple times while helping people here on the forum, sometimes you just want to send them a Playground directly linked to one of their assets hosted on their server, and BOOM you hit CORS policy and cannot load… ^^

3 Likes