mattrei / aframe-mapbox-component

A Mapbox component for A-Frame
https://mattrei.github.io/aframe-mapbox-component/
MIT License
16 stars 5 forks source link

aframe 1.4.2 error (Math has been renamed to MathUtils) #34

Open kfarr opened 1 year ago

kfarr commented 1 year ago

I get the following error when using this component with aframe 1.4.2 / three 0.147.1

caught (in promise) TypeError: Cannot read properties of undefined (reading 'floorPowerOfTwo')

First occurrence: https://github.com/mattrei/aframe-mapbox-component/blob/master/index.js#L241

Root cause: Math has been renamed to MathUtils with r113

Suggested solution: replace THREE.Math with THREE.MathUtils in index.js

kfarr commented 1 year ago

this PR fixes the issue https://github.com/mattrei/aframe-mapbox-component/pull/35