Hello guys!
I’m trying to create something like that
Can you help me please?
maybe you have some examples or similar cases because I don’t know how to do this so that the performance is good
I’ve built the model with 256 lines from center to random position
const geometry = new THREE.BufferGeometry().setFromPoints(lineCoord)
const line = new THREE.Line(geometry, material)
and then I’ve added 256 circles at the end of each line
const circle = new THREE.Mesh(circleGeometry, material)
circle.position.set(circleCoord.x, circleCoord.y, circleCoord.z)
Since there’s quite literally zero visual difference in this case - your spheres are rendered without any textures or shading at all - consider using Points instead of Spheres. You should be easily able to render one billion points without worrying about losing even 0.1fps
Alternatively - you can continue with spheres, but consider using instanced spheres instead - but I feel like 256 shouldn’t be an amount that’s affecting performance greatly.
Does this example perform ok for you when you set Raycasters count to 1000 (here’s the code, you can safely ignore the BVH part, it’s just an example) ?
An option from the twilight zone of my mind.
LineSegments and Points share the same DataTexture with the data of vertices directions and radii, rotation axes and speeds.