Does anyone know How to Add external js in cocos creator project ?
Plz be specific.
DOM and Native related (eg NodeJS’s IO) will not work.
I try to integrate Janus.js file in my project.
I have not tried that library before.
Basically for pure js libraries, i exposed them to
module.exports = yourLibraryClass
Then load them in Cocos Creator with
const YourObj = require(’‘yourLibraryClassFileName’’);
Afterwards, you can run it as in browser or nodejs.