Skip to content

Commit 56fd90d

Browse files
Fixed bug in rendering of 3D primitives
The Geometry class does not have children attribute which caused error in draw_shape() function
1 parent 1b233fd commit 56fd90d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

p5/core/primitives.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from ..pmath.utils import SINCOS
2727

2828
from .shape import PShape
29+
from .geometry import Geometry
2930

3031
from . import p5
3132

@@ -579,6 +580,10 @@ def draw_shape(shape, pos=(0, 0, 0)):
579580
580581
"""
581582
p5.renderer.render(shape)
583+
584+
if isinstance(shape, Geometry):
585+
return
586+
582587
for child_shape in shape.children:
583588
draw_shape(child_shape)
584589

0 commit comments

Comments
 (0)