Can anyone help me get this line to show up? Im using @react-three/fiber and Typescript
My Faulty Component:
import * as THREE from 'three'
const RoadLine = ({start, end}: {start: THREE.Vector3, end: THREE.Vector3}) => {
return (
<line>
<bufferGeometry setFromPoints={() => new THREE.BufferGeometry().setFromPoints([start, end])}/>
<lineBasicMaterial color={'green'}/>
</line>
)
}
export default RoadLine
------------------------------------------------------------------------------------------
The Props Im sending in:
{roads?.map(road => {
return (
<RoadLine
key={road.id}
start={new THREE.Vector3(1,0,3)} //numbers just for test atm
end={new THREE.Vector3(11,0,33)} //numbers just for test atm
/>
)
})}
Im trying to make a basic line from point a to b essentially, not sure if I'm going about it correctly