Problem was having too many concurrent workers opened at once. Garbage collection apparently works very slowly on workers. Solution was to close them manually, after model data is sent to main thread.
Also some progress with Blender scene exporter. Some scenes now export correctly, though monkey test scene got worse, even with less hacky code.
If you want to get edges, run converter like with "-e" flag:
python convert_obj_three.py -i model.obj -o model.js -e
Output seems to match Blender exporter.
There is a new class Edge which stores vertices and faces for edge (I wasn't sure if indices or references would be better, so at least for the moment it contains both).
Geometry now contains a list of such edges, created in JSONLoader, based on edge data exported from Blender.
From Blender we get a list of vertex index pairs, from which in Geometry.computeEdgeFaces() we compute faces which share this particular edge and store them in the Edge object.
Not sure if edges work properly till we don't have something using them. For now I just checked cube data exported from Blender and it seems fine.
Also did some whitespace cleanup here and there.
In such case faces will not get material index in JSON data and then no material reference in Face objects, so MeshFaceMaterial is not going to show anything and you have to add your own material for the whole mesh after loading.
Tested on few models and it seems to work, new JSON format allows to omit materials :)
There is checkbox for choosing whether Blender should recalculate vertex normals or whether to use normals from the data.
Using vertex normals from the data can in some cases lead to artefacts. This is probably caused by sharing of vertices across several faces (I didn't find a way how to specify vertex normals per face use of vertex; there is just API for setting normals to vertices).
If you select "recalculate vertex normals" (default), this sets faces to use smooth shading, which upon subsequent mesh update computes correct vertex normals (but it will lose eventual smoothing groups baked in vertex normals).
Very much work in progress, for the moment it creates just pure geometry (no normals, uvs, colors or materials).
Also fixed bug in JSONLoader in handling of face uvs.
Work-in-progress.
So close yet so far. Test scene almost works, just two things are not rotated properly (which means maybe everything will need to be reworked :(