Commit e8d822b9 authored by Dario Seyb's avatar Dario Seyb

allow PointAttributes to be passed to draw_vertices

parent ce854033
......@@ -199,11 +199,16 @@ class Context(object):
if colors is None:
matColor = 'black'
elif isinstance(colors, PointAttribute):
colors = colors.values
matColor = '#ffffff'
elif hasattr(colors, '__len__') and (not isinstance(colors, str)):
matColor = '#ffffff'
else:
colors = None
attributes = dict(
position = three.BufferAttribute(np.asarray(vertices, dtype=np.float32), normalized=False),
)
......
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