Hello, i created line by a lot of rectangles and it’s work correctly, but with big data it’s lagging. I rewrited it with instancedMesh, but i don’t know how i can set width for my rectangles and how i can add edges for my rectangles. In the screenshot, the top line should be like the bottom one. Can someone explain where i am wrong? sandbox
Just a guess. I might be completely wrong. In
InstancedMesh.tsx lines 31-32:
anonymousObject.position.set(x, y, z); anonymousObject.position.set(x, y, z);
anonymousObject.position.set(x, y, z); anonymousObject.scale.set(..., ..., ...);
Fill in the
... with proper values for the size (relative to the size of the base mesh). Sizes of instanced meshes are coded in the per-instance matrix.
@PavelBoytchev Thank you! I thought that i can set width, but scale is works for my case. I will look for how I can solve the edge problem.