Hello there,
I am quite inexperienced with JavaScript in Verge 3D, but have managed to create a custom JS function in the “appname”.js file and call it when needed with Puzzles. But I am struggling with calling a function from another .js-file.
I would like to call a function in separate .js, because I want to be able to expand the file as clearly as possible later.
Inside my Verge project folder there is a subfolder called “js” and in there is my “special.js” file. special.js only contains:
“function DoSpecialStuff() {
// add your code here, e.g. console.log(‘Hello, World!’);
console.log(‘Just added some JavaScript!’);
}”
In the index.html, I register the “special.js” via ”
<script src=”js/special.js” type=”text/javascript”></script>”
right before “</body>”
I read the whole documentation about this, but can’t get it to call “DoSpecialStuff” unfortunately.
How can I implement this with Puzzles? I would be very happy about any help.