chandlerprall / Physijs

Physics plugin for Three.js
MIT License
2.77k stars 455 forks source link

wrong path for physijs_worker.js and ammo.js #280

Closed leonardopaiva closed 7 years ago

leonardopaiva commented 8 years ago

Hey, i`m new with threejs and this lib... i was trying to make a basic example and it took some time to realize this:

Physijs.scripts.worker = 'physijs_worker.js'; Physijs.scripts.ammo = 'ammo.js';

the path was wrong, and no error message. My suggestion is to console log an error message, this way will be more easy to identify the problem.

congratulations for this fantastic library

mmmovania commented 7 years ago

For the latest version of physijs, the path to ammo.js is relative to the physi_worker.js script file. If both ammo.js and physi_worker.js are inside js subfolder, u should set the paths like this Physijs.scripts.worker = "js/physijs_worker.js"; Physijs.scripts.ammo="ammo.js" For others who are finding it difficult, i am doing a simple collection of tutorials which will hopefully help. Url: https://github.com/mmmovania/Physijs_Tutorials

leonardopaiva commented 7 years ago

hey, thanks for the tutorials.