MasterSplinter Posted September 15, 2015 Share Posted September 15, 2015 <snip> setInterval(nextSequence(), 5000);return scene;}var scene = createScene();engine.runRenderLoop(function () {scene.render();}); I'm looking at this little bit and thinking it should be looping through my create scene correct? Therefore, my setInterval should get called. If I set to a regular old javascript alert it works fine... but if i try and use it on a babylon animation it doesn't work at all... Am I misunderstanding something? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 16, 2015 Share Posted September 16, 2015 Hello Master we need more detail..what about creating a playground sample? Quote Link to comment Share on other sites More sharing options...
fenomas Posted September 16, 2015 Share Posted September 16, 2015 setInterval(nextSequence(), 5000); setInterval takes a function reference as an argument. Unless nextSequence is a function that returns a function, you need to change that to:setInterval(nextSequence, 5000); Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted September 16, 2015 Author Share Posted September 16, 2015 Ahh I'm a space cadet-- You guys are so helpful. I'm trying to finish this Simon Says game I started last month and then stopped lol setInterval takes a function reference as an argument. Unless nextSequence is a function that returns a function, you need to change that to:setInterval(nextSequence, 5000); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.