user4678593
user4678593

Reputation: 35

BabylonJS Execute Script from External File


I'm having a (simple) issue, but I have no idea how to fix it. Essentially, every tutorial I have come across for Babylon puts all of the Javascript code inside < script > tags in the main HTML page.

However, I would like to have all of my Javascript code inside a separate file. I have tried every way of loading it as I could think of, though I am a novice at Javascript (I am decent at C++, and I can see the similarities); yet I was unable to make it load. (It works fine when called from the HTML page itself).

Does anyone know what (if anything) I can do in order to be able to load my scripts from external files, and still get everything to work?

Thanks in advance!

Upvotes: 1

Views: 583

Answers (1)

David Rousset
David Rousset

Reputation: 141

2 options:

Enjoy and thanks for using Babylon.js! :)

David

Upvotes: 2

Related Questions