mesh.posotions and new Point3D(x,y,z) in javascript? [closed]

private void BuildVertices(double x, double y, double len) {
  if (len > 0.002) {
    mesh.Positions.Add(new Point3D(x, y + len, -len));
    mesh.Positions.Add(new Point3D(x - len, y - len, -len));
    mesh.Positions.Add(new Point3D(x + len, y - len, -len));
    len *= 0.5;
    BuildVertices(x, y + len, len);
    BuildVertices(x - len, y - len, len);
    BuildVertices(x + len, y - len, len);
  }
}

If I want to convert it to javascript
What is the mesh, and how to use it in javascript, and also what ismesh.positions, mesh.positions.add, new Point3D(x, y, z)

I would love some suggestions of how?

Here is a link to what this code does
https://i.stack.imgur.com/HAEZW.gif

Answer

This code is for the #C language and is a Unity game engine. JavaScript used to support this engine but now it does not. Mesh is a class that has spatial coordinate information.

In general, and as a conclusion, this code snippet cannot be converted to JavaScript because it is not currently supported

Leave a Reply

Your email address will not be published. Required fields are marked *