我正在尝试使用 React 三纤维制作一个带有点的网格。我尝试使用 LineDashedMaterial,但它并不完美。我是 Threejs 新手。知道如何使用网格或平面制作带有点的表面吗?
<Canvas frameloop="demand" camera={{ position: [75, 1, 0.1], zoom: 15 }}>
<mesh>
<gridHelper
material={
new THREE.LineDashedMaterial({
dashSize: 0.1,
gapSize: 1,
vertexColors: true,
})
}
rotation-y={[Math.PI / 2]}
position={[0, 12.5, 0]}
onUpdate={(grid) => grid.computeLineDistances()}
/>
</mesh>
</Canvas>
代码沙箱:这里
我想要实现的目标是这样的