Addon. Produces almost infinite many time-varying geometries with functions

It took some time.:hourglass_flowing_sand:

Now the extension of THREEf to indexed and non-indexed BufferGeometry is finally finished. On GitHub: GitHub - hofk/THREEf.js: three.js addon, to produce almost infinite many time-varying geometries / buffer geometries with functions (cylindrical coordinates) . The old version is in THREEf_old.

If you do not need Geometry and BufferGeometry, you can delete the corresponding blocks.

That are

or in morphFaces

at the end of the functions

The new version you can test now on http://sandbox.threejs.hofk.de/ (firefox) .
There is a link basic examples / source where you can compare the three variants.

The old examples I have updated. Some figures are now created with BufferGeometry.
See http://sandbox.threejs.hofk.de/examplesTHREEf%20r86.html

There is still a difference between the normals of Geometry and Buffer geometry. Using .computeVertexNormals (); in Geometry the normals are twisted to the left / right at the upper and lower edge.

This results (!waffled) from the different number (1 or 2) of faces left/ right. In BufferGeomety I have balanced this by doubling faces.

For example
vFace.push( fIdx * 3 );
if ( i === 0 ) vFace.push( fIdx * 3 ); // face double (equal number left and right)

Maybe later, I calculate the normal at Geometry itself.


Some more information (only in german language - my english is very bad) and pictures:
http://xprofan.net/intl/de/php,html,js/3d-grafik-webgl-mit-three-js/

1 Like