jhuang
September 24, 2019, 3:16pm
1
I run into a file-open example in the playground (someone else created); but the script cannot load due to an error related to .parentNode. Line 40:35 - Cannot read property ‘parentNode’ of null.
https://playground.babylonjs.com/#5JBSHD#20
Can someone help take a look at it to see how to work around it? Thanks!
This is not a Babylon.js question
var maintitle = document.getElementById("mainTitle");
There is no mainTitle html element in the PG so it cannot work. This PG was a hack into the old playground html structure
jhuang
September 24, 2019, 5:58pm
3
Understand. Thanks for the quick response.
labris
September 24, 2019, 8:47pm
4
In order to make this example working you need:
Download .zip from the Playground.
Put index.html into some folder on Webserver.
Create in the index.html the div element with id=“mainTitle”.
Put to the style .navbar {position: absolute;}
Now you can see at the top over canvas the button which allows to input .babylon files into the scene.