Sketch runs slow in P5.js WEBGL, (SOLVED by using P5.Geometry)

I thought this might interest you: Here’s an example I made for the article I’m writing. This example is designed to support variable detailX/detailY and leverage the built in capabilities of computeFaces() and computeNormals():

4 Likes

Thanks, Paul. I knew I had to assign to each gid, but I tried

this.gid = ‘nut’+str(id++);

instead of

this.blendMesh.gid = ‘nut’+str(id++);

so that didn’t work. I have been ill for quite some days, but since yesterday I feel better and I decided to design “the enemy”, to look straight in its face. I used .obj files made by drawing vertexes in P5.java exporting them with a really good Processing library called OBJExport. Its not included in Processing’s “Contribution Manager”, but you can download it here. I used .obj because I thought that constructing the faces individually as I did with the ‘nut’ sketch would give tremendous work. But now I’ve read your last post, I see there is a method for it in the p5.Geometry Class to compute them. I should have taken your advice to study this Class sooner. But this will be my next step. Writing the objects of this sketch in p5.Geometry.

4 Likes