-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: THREE.Math does not exist #517
Conversation
THREE.Math was renamed to THREE.MathUtils in r113. THREE.PlaneBufferGeometry is deprecated. Fixes AR-js-org#515 Signed-off-by: Gordon Smith <[email protected]>
Thank you for this PR, i will look at in the next day. 🙂 |
@GordonSmith many thanks for this. I think the bug arose from a time when we still had three.js lower than 0.113. I have tested it out on desktop, using both pure three.js and A-Frame, and it works fine with no errors. I don't think anyone will have older three, as the @kalwalt can we merge? |
@nickw1 haven't tested yet, i think it should be ok but i think i will have a bit of time in the next days. I will let you know. 🙂 |
We can't merge this PR as it is. @GordonSmith you need to switch to MathUtils (instead of Math) in
After rebuild the libs with the npm command npm run build and don't forget to run the prettier command too npm run format .It wolud be nice if we upgrade the three.js version in the examples to a more recent one. Actually is pretty old: 132 Also the three.js npm package will require an upgrade. |
@kalwalt - those |
referring to that line probably is using the JS built in library because there isn't a sqrt method https://threejs.org/docs/#api/en/math/MathUtils |
The imported name "MathUtil" didn't change (when you |
Sorry, i want to say that upgrading the there.js version could break in other parts of Ar.js. |
@kalwalt @GordonSmith yes that specific I have tested @GordonSmith's fix on the basic location-based three.js and A-Frame examples and it works, but haven't tested a full range of examples. @kalwalt what are the other lines of code which might cause a problem? |
This PR doesn't upgrade the three.js version? |
Having just updated a number of A-Frame component to be compatible with the A-Frame 1.4.1 and the corresponding version of three.js, I'd like to make these points:
|
#523 would appear to be more complete than this. |
Solved with #532 now that code is merged in the master branch. Thanks for your interest and colaboration! |
THREE.Math was renamed to THREE.MathUtils in r113. THREE.PlaneBufferGeometry is deprecated.
Fixes #515
What kind of change does this PR introduce? bugfix
Can it be referenced to an Issue? If so what is the issue # ? 515
How can we test it? Follow the Three.js tutorial
Summary
Does this PR introduce a breaking change? Potentially for folks using Three.js older than v0.113.0?
Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser Edge 110.0.1587.41 (on Android)
Other information