Commit 55d0c4e4 authored by Janis Born's avatar Janis Born
Browse files

use uint32 dtype internally for index arrays

parent 802c3ebf
...@@ -110,7 +110,7 @@ class Context(object): ...@@ -110,7 +110,7 @@ class Context(object):
# Create attributes dictionary, always use at least position and index # Create attributes dictionary, always use at least position and index
attributes=dict( attributes=dict(
position = three.BufferAttribute(np.asarray(vertices, dtype=np.float32), normalized=False), position = three.BufferAttribute(np.asarray(vertices, dtype=np.float32), normalized=False),
index = three.BufferAttribute(np.asarray(face_indices, dtype=np.uint16).ravel(), normalized=False), index = three.BufferAttribute(np.asarray(face_indices, dtype=np.uint32).ravel(), normalized=False),
) )
if resolved_colors is not None: if resolved_colors is not None:
...@@ -169,7 +169,7 @@ class Context(object): ...@@ -169,7 +169,7 @@ class Context(object):
attributes=dict( attributes=dict(
position = three.BufferAttribute(np.asarray(vertices, dtype=np.float32), normalized=False), position = three.BufferAttribute(np.asarray(vertices, dtype=np.float32), normalized=False),
index = three.BufferAttribute(np.asarray(edge_indices, dtype=np.uint16).ravel(), normalized=False), index = three.BufferAttribute(np.asarray(edge_indices, dtype=np.uint32).ravel(), normalized=False),
) )
if resolved_colors is not None: if resolved_colors is not None:
......
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