I've been following a tutorial and I'm attempting to create a thick line using different coordinates. https://github.com/leighhalliday/google-maps-threejs/blob/main/pages/car.js
But I've encountered an issue in my code:
trackRef.current.material.resolution.copy(
overlayRef.current.getViewportSize()
);
It seems like there's no 'resolution' in the material. The code I'm using to draw a thick line is as follows:
const lineGeometry = new LineGeometry().setPositions(positions);
const lineMaterial = new THREE.LineBasicMaterial({
color: 0xff0000,
linewidth: 8,
});
const line = new Line2(lineGeometry, lineMaterial);
Is there a way to access material.resolution or does anyone know of an alternative method to achieve the same result?