THREE.Math = undefined

Good day to everyone, for a long time I did not write reports, although several questions have already accumulated. When installing the library on the server using the command - npm install --save three-full, one problem arose: it became impossible to use THREE.Math because THREE.Math = undefined. Yes, I found information that everything was moved to THREE.MathUtils, but in the code, I think many developers already use THREE.Math, I had to make a crutch.

THREE.Math = { //Fix
degToRad: THREE.MathUtils.degToRad,
randInt: THREE.MathUtils.randInt,
randFloat: THREE.MathUtils.randFloat

Could you fix it.

  1. Not 100% related to the issue, but fyi from the three-full repo:
### Deprecation note:
I am glad to annonce since Three release his examples files under JSM folder, this repository should be avoided. The first goal of this repository was to provided an alternative solution during this migration. From now, please consider to use Three.module.js instead even if i maintain this repository for my personal usage. Thanks for all ! Itee...
  1. If you can’t update your code to use MathUtils instead of Math and you want your project to use only a specific version of three, remove ^ in front of the three package version in package.json ("three": "^0.116.1" will install a matching version, "three": "0.116.1" will install this version exclusively.) You can also install specific version you used when creating the project using:
    npm install -d three@VERSION (version numbers you can pick from release list on npm)
1 Like

Thanks! )))