chandlerprall / Physijs

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

Uncaught TypeError: class constructors must be invoked with 'new' when trying to create Physijs Scene #329

Open NabeelUppel opened 3 years ago

NabeelUppel commented 3 years ago

I keep getting this issue when I try to create a scene using scene =new Physijs.Scene() The console throw an issue on line 391 of physi.js

jas-singh-code commented 3 years ago

I keep getting this issue when I try to create a scene using scene =new Physijs.Scene() The console throw an issue on line 391 of physi.js

I have the same issue! for me it says line 512. Any solutions yet?!

aaronrobertson222 commented 3 years ago

I keep getting this issue when I try to create a scene using scene =new Physijs.Scene() The console throw an issue on line 391 of physi.js

I know this is 29 days old but check your Three.js version. Physijs hasn't been updated in a while and only works with older versions of Three as there have been changes to parts of Three.js. The Physijs examples are made with three@0.73.0 so try using that version. All though I will say the latest version of Three I was able to get the Physijs example running with was three@0.119.0.

Biswayan375 commented 2 years ago

Thanks @aaronrobertson222 . Here is the direct link to Three.js 0.119.0 https://unpkg.com/browse/three@0.119.0/