i'm trying to reload the scene on AFrame, i have a scene with a robot and i need to load back to original state of the scene when users click a button.
What i already tried is:
var sceneElement = document.querySelector("a-scene");
sceneElement.reload();
And:
location.reload()
The first one raise an error on browser console showing that reload() method is not a function but documentation on AFrame supports it. I don't know if i'm using this function right.
Uncaught TypeError: sceneElement.reload is not a function
at HTMLDocument.eval (websim.js:64)
at HTMLButtonElement.eval (editor.js:23)
at HTMLButtonElement.dispatch (jquery.js:4953)
at HTMLButtonElement.elemData.handle (jquery.js:4758)
The last code from below reloads the entire page and this is not what i need.
Thank you! :)