javascript - Any way to link JS library in external JS file? -
it may confusing mean have code in main .html file:
<!doctype html> <html> <head> <link type="text/css" href="css/fpsgame.css" rel="stylesheet"> <script src="js/fpsgame.js"></script> <script src="js/lib/three.min.js"></script> <script src="js/lib/jquery.js"></script> </head> <body> <div id="container"></div> </body> </html>
and want create in 3d (set scene, set camera, create cube) in fpsgame.js , keep script away .html file. however, have if want use three.js methods or methods library inside fpsgame.js file?
in other words, how include three.js library fpsgame.js file, not in .html file?
Comments
Post a Comment