saharan / OimoPhysics

A cross-platform 3D physics engine
MIT License
863 stars 68 forks source link

Uncaught ReferenceError: HxOverrides is not defined #56

Closed pschroen closed 5 months ago

pschroen commented 1 year ago

Since v1.2.4 (e8dd122) the JavaScript module has been throwing this error with a missing global for HxOverrides.

Building the JavaScript module does generate the following:

class HxOverrides {
    static now() {
        return Date.now();
    }
}

However with your instructions to "Remove all lines before var oimo = oimo || {};", that HxOverrides class is removed, but the code is still referencing it.

The previous version was just using Date.now(), and the other JavaScript files in bin/js/ include the HxOverrides class.

So not sure if they're supposed to include HxOverrides or not. 🤷‍♂️

fy0 commented 1 year ago

I downgraded to 1.2.3 and works. However it is a good practice to provide a configurable "getNow()" interface.

saharan commented 5 months ago

Sorry, it should be fixed in the commit https://github.com/saharan/OimoPhysics/commit/c0c828a336c06380e90e92bb522f6344ce0f6cfa for the coming v1.2.5 !