Skip to content
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

fitToSphere assumes mesh has always geometry #547

Open
kolodi opened this issue Oct 29, 2024 · 1 comment
Open

fitToSphere assumes mesh has always geometry #547

kolodi opened this issue Oct 29, 2024 · 1 comment

Comments

@kolodi
Copy link

kolodi commented Oct 29, 2024

Describe the bug

const bufferGeometry = geometry;

There can be meshes that have no geometry (yet). fitToSphere method assumes they always have one leading to an error.

To Reproduce

Steps to reproduce the behavior:

  1. Have an object containing mesh with no geometry
  2. use it as parameter in fitToSphere
  3. See error

Code

No response

Live example

No response

Expected behavior

Ignore meshes having no geometry

Screenshots or Video

No response

Device

Desktop

OS

No response

Browser

No response

@yomotsu
Copy link
Owner

yomotsu commented Dec 20, 2024

Thank you for pointing that out.
However, please note that CameraControls cannot compute the sphere if the geometry does not exist.
Should CameraControls trigger a different error if the mesh lacks geometry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants