How internally conversion of 2d to 3d?

You’re at the site about Three.js. How you will get data from your Java-server is up to you. In the rest we have that question about converting 2D coordinates to 3D coordinates on the 3D model of roads.

I’d offer to use THREE.Raycaster() with the origin somewhere much higher the model of roads, kind of THREE.Vector3( fetchedX, height, fetchedY ) (and I won’t be surprised, if you you have to swap values of the fetched x and y, as you work with geodesic data), and its direction is always THREE.Vector3( 0, -1, 0 );.

Anyway, there’s also stays that question.

@prisoner849 Above java Code is there, there is only X & Y. Now tell me how to fetch in JS and how to assign to car(.obj file)

Impressive imperative!
Sir! Yes, sir! How fast I have to fulfill your command, sir? Sir!
Seems that I was paid for that, but I don’t remember when.
:joy:

And now seriously.
How to deal with Java and fetching the data is up to you. There should be tons of information in Internet on this theme.

1 Like

@prisoner849 Thank You for quick response

@sandipnd31 I mentioned Fetch API, XMLHttpRequest, and jQuery.ajax above. You should Google those and learn how to fetch data with those. Anyways, that’s a separate topic than Three.js. So once you research those things and learn to use one of them, you can fetch data, then come back here if you need help with the Three.js part.

Also, check out stackoverflow.com. Make an account there, and ask programming questions about how to fetch data from a server with JavaScript.

@trusktr, ok sir and thank you :slightly_smiling_face:

1 Like