Babylon weapons demo issue

Heya, on the awesome weapons demo, the one linked to from babylonjs.com, pressing run causes the error “Cannot delete property 'scene' of #<Window>”. This happens both on version 5 and on version 4.2.
Babylon.js Playground

Removing line 5, which creates a global scene object, fixes the issue for both versions. :slightly_smiling_face: :beers:
https://www.babylonjs-playground.com/#I6V1ST#209

1 Like

Yup it is mostly how the PG code has been build so it would fail on subsequent runs.

Could you share where you took the demo link from ? so that we could update it ?

1 Like

It’s from babylonjs.com, the second demo link in the demos section at the bottom of the page. :slightly_smiling_face:

Perfect lets check with @PirateJC to update it :slight_smile:

1 Like

@Blake, thanks for finding this, reporting it, and fixing it!

I’ve fixed the link on the Babylon homepage!

Should be all good now!

Thanks!

3 Likes