You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
ar-threex-location-only.js throws an error when using new THREEx.LocationBased(...).
Uncaught TypeError: Cannot read properties of undefined (reading 'degToRad')
at t._haversineDist (ar-threex-location-only.js:1:3186)
at t._gpsReceived (ar-threex-location-only.js:1:2848)
at ar-threex-location-only.js:1:1902
Describe the bug
ar-threex-location-only.js throws an error when using
new THREEx.LocationBased(...)
.This happens because three.js has renamed the object
THREE.math
toTHREE.mathUtils
.(changelog: https://github.com/mrdoob/three.js/releases/tag/r113)
I suggest updating the logic so it works with the latest three.js version. However this may break existing usages that make use of the older three.js version. I suggest putting a clear disclaimer or making the code backwards compatible.
(ar.js logic that uses
Math
: https://github.com/AR-js-org/AR.js/blame/8662537d2dc1701afc4eadfbf7b04db3341199de/three.js/src/location-based/js/location-based.js#L161)To Reproduce
Steps to reproduce the behavior:
0.113.0
or higherconst arjs = new THREEx.LocationBased(scene, camera);
Expected behavior
The code does not throw an error
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: