pboyer / verb

Open-source, cross-platform NURBS
http://www.verbnurbs.com
MIT License
733 stars 106 forks source link

[Question] ThreeJS Example #4

Closed lanceingle closed 10 years ago

lanceingle commented 10 years ago

Is there an example of rendering surfaces using ThreeJS instead of pure WebGL? I looked in the examples folder. I was wondering how you get from one of your surfaces to a ThreeJS mesh.

pboyer commented 10 years ago

Hi there Lance,

Presently there is not such an example, but you're welcome to submit a PR.

In short, you can get the mesh representation of any NurbsSurface by using the tesselate() method. This will return an object with the following properties: points, faces, uvs, normals. This should be sufficient to construct a THREE Geometry representation of the Surface. I hope this helps!

I'm going to close this for now, but let me know if you have any verb specific issues.