Commit 07b82258 authored by Dario Seyb's avatar Dario Seyb

added linewidth attribute to edge drawing

parent 4fa60dec
This diff is collapsed.
......@@ -78,9 +78,10 @@ class Context(object):
self.scene.add(mesh_obj)
return self
def draw_edges(self, vertices, edge_indices=None, colors=None, uvs=None, z_offset=0):
def draw_edges(self, vertices, edge_indices=None, colors=None, uvs=None, z_offset=0, linewidth=1):
mat = three.LineBasicMaterial(color='#000000')
mat.linewidth = linewidth
if z_offset is not 0:
mat.polygonOffset = True
......
......@@ -3,8 +3,8 @@ from .context import *
def display_faces(vertices, face_indices, normals=None, colors=None, uvs=None, shading='flat', z_offset=0.5):
Context().draw_faces(vertices, face_indices, normals, colors, uvs, shading, z_offset).display()
def display_edges(vertices, edge_indices=None, colors=None, uvs=None, z_offset=0):
Context().draw_edges(vertices, edge_indices, colors, uvs, z_offset).display()
def display_edges(vertices, edge_indices=None, colors=None, uvs=None, z_offset=0, linewidth=1):
Context().draw_edges(vertices, edge_indices, colors, uvs, z_offset, linewidth).display()
def display_vertices(vertices, colors=None, point_size=1, z_offset=0, perspective=False):
Context().draw_vertices(vertices, colors, point_size, z_offset, perspective).display()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment