When it comes to transmitting data from the server to the client, the most efficient method would be:
- Sending your spline/curve to the client from the server
- Converting the curve to a polygon on the client side
- Creating a Lathe from the polygon in the client-side code
To start this process, you'll need to transform your SVG spline into a polygon, which will then be utilized in Three.js as a Lathe
Geometry.
The amount of data involved depends on the level of accuracy needed for your curve-to-polygon conversion (the number of samples/divisions used during the conversion). Since this task can be handled by the client side (refer to the code snippet below), the data volume should not raise concerns.
For guidance on creating a Lathe
Geometry from multiple points, check out this answer
If you're looking to convert an SVG curve
into a series of points, use the following code snippet:
// Function to convert path to polygon
function pathToPolygon(path, samples) {
// Code implementation here
}