You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I add 3DObjects at Mapbox coordinates and i am now trying draw a line in between ( or instead instead)
I am encountering an issue trying to draw the line with coordinates as points. How can i transcribe mapbox's coordinates into the R3F world?
A hackier way would be to retrieve the position of the 3DObjects (or the Scene), Can i access these?
Thanks. Sorry for the late reply. I am trying to wrap my head around this. the ajustment works when I implement the extruded shape.
I need a line, like drawing on a mercator map, I get this:
// need to bring it to mercator space ??
// const points = props.drawnPoints.map((p) => coordsTovector3(p, props.drawnPoints[0])).map(([x, , z]) => new Vector2(x, z));
return (
<group>
<Line points={flatPt} lineWidth={1} color={'rgba(25,255,255, .20)'} opacity={.1} linejoin={'round'} transparent={true} />
}
so i implemented a mercator projection instead, it is a bit hacky, what should i use instead? const flatPt = props.drawFlat.map((p)=> [(p.x * 40000000 )- 20010000 , p.z, (p.y * 40000000) -20004000]);
This lib is a life saver!
I add 3DObjects at Mapbox coordinates and i am now trying draw a line in between ( or instead instead)
I am encountering an issue trying to draw the line with coordinates as points. How can i transcribe mapbox's coordinates into the R3F world?
A hackier way would be to retrieve the position of the 3DObjects (or the Scene), Can i access these?
<Line points={curvePoints} linewidth={30} color={"red"} />
The text was updated successfully, but these errors were encountered: