I have found out how to load a PlayCanvas engine into my local server (through index.html in my public folder). I am having trouble importing the PlayCanvas engine into my src folder.
- I created a min.js file that has the PlayCanvas code and placed it in my src folder
- Created a new React component pasted the example code which is found in PC’s github.
- I get an error on my local server of which points to the PlayCanvas engine code.
Line 3: 'define' is not defined no-undef Line 4: 'define' is not defined no-undef Line 780: 'webkitAudioContext' is not defined no-undef Line 880: Unexpected use of 'self' no-restricted-globals Line 1125: 'Ammo' is not defined no-undef Line 1125: 'Ammo' is not defined no-undef Line 1125: 'Ammo' is not defined no-undef Line 1125: 'Ammo' is not defined no-undef
What am I doing wrong? I know that ammo is probably referencing ammo.js physics framework. I tried to copy and paste the ammo.js file into my src file and import it into the PlayCanvas engine file but my local server just crashes at that point.