pmndrs/use-cannon

Support for changing the number of segments through useSphere Args

Russo-creation opened this issue · 2 comments

Hi,
I have been looking how to change amount of sphere segments and i noticed that it is not supported in useSphere through passed args like it is in the useCylinder:

type CylinderArgs = [radiusTop?: number, radiusBottom?: number, height?: number, numSegments?: number]
type SphereArgs = [radius: number]
type TrimeshArgs = [vertices: ArrayLike<number>, indices: ArrayLike<number>]

It would be good to have this option as well for improving performance in some circumstances like scene with a lot of spheres.

The sphere in cannon-es does not have a segments. It's already optimized because the math for intersecting with a sphere is quite simple. Do you mean the visual representation of the sphere? That's coming from three.js.

@bjornstar I don't mean visual representation of it. I Just checked the documentation of the cannon-es and looks like only radius is possible to change. Thanks for pointing me that I'm closing the issue.