Open palvim opened 4 years ago
Ok, sure! Thank you... here's a demo trying to modify debug mode dynamically after 5sec: https://codepen.io/pAlvim/pen/abNeWBd (codepen)
`<!DOCTYPE html>
""//cdn.rawgit.com/donmccurdy/aframe-extras/v3.12.4/dist/aframe-extras.min.js"> <script src="https://unpkg.com/aframe-physics-extras/dist/aframe-physics-extras.min.js"
Is that a typo? Shouldn't that second line say Aframe Physics System? hmm...
Maybe try updating to the latest Aframe 1.0.4 if you can.
What is the event that is supposed to trigger the debug attribute to toggle from true to false? What event are you listening for?
I don't understand what you are doing with the set timeout in the body, simulate issue?
This is an example of what a set time out looks like. "var load = setTimeout(function() { document.getElementById("redirect").src="js/load.js";
}, 5000);"
Another example:
var myVar;
function myFunction() { myVar = setTimeout(alertFunc, 3000); }
function alertFunc() { alert("Hello!"); }
https://www.w3schools.com/jsref/met_win_settimeout.asp
I hope that is helpful.
If the setTimeout is meant to trigger your debug mode to change from true to false, then you need to emit an event in the setTimeout(function) and it could be where you might set the attribute of the debug to false, inside the setTimeout I mean.
Thank you very much! I had other reason that ended up landing me to divide my page in two. So I keep one of them with debug=true. But I'll check your suggestions when possible and post here. Thanks again.
I recommend sending a minimum code example of the problem, like using glitch or codepen, then other people can run the demo and try to figure out what the source of the problem is.