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
If you ever have more than one Three.js included or based on how the bundler works, instanceof may not work.
Code
Iwouldrecommendthatwejustchangeit to:
constisSphere='isSphere'insphereOrMesh;
### Live example
_No response_
### Expected behavior
CameraControls should work whether or not instanceof works on Sphere correctly.
### Screenshots or Video
_No response_
### Device
_No response_
### OS
_No response_
### Browser
_No response_
The text was updated successfully, but these errors were encountered:
Describe the bug
Using instanceof can be quite problematic:
https://github.com/yomotsu/camera-controls/blob/dev/src/CameraControls.ts#L1987
If you ever have more than one Three.js included or based on how the bundler works, instanceof may not work.
Instead I recommend using .isSphere, which is provided here in the Three.js Sphere API:
https://github.com/mrdoob/three.js/blob/dev/src/math/Sphere.js#L12
To Reproduce
If you ever have more than one Three.js included or based on how the bundler works, instanceof may not work.
Code
The text was updated successfully, but these errors were encountered: