Merge pull request #323 from wood-galaxy/webgl-fix-mesh-export

Fix webgl export for mesh based object
This commit is contained in:
wwmayer 2016-10-29 15:29:50 +02:00 committed by GitHub
commit e4481982fe

View File

@ -187,7 +187,8 @@ def getObjectData(obj,wireframeMode=wireframeStyle):
result += tab+"geom.vertices.push(v"+str(p.Index)+");\n"
# adding facets data
for f in mesh.Facets:
result += tab+"geom.faces.push( new THREE.Face3"+str(f.PointIndices)+" );\n"
pointIndices = tuple([ int(i) for i in f.PointIndices ])
result += tab+"geom.faces.push( new THREE.Face3"+str(pointIndices)+" );\n"
if result:
# adding a base material