Skip to content

Commit

Permalink
fix: #142
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardLu2018 committed Aug 3, 2023
1 parent 15dbf12 commit 53d0688
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 10 additions & 1 deletion arena/objects/arena_object.py
@@ -1,5 +1,5 @@
from ..base_object import *
from ..attributes import Animation, Data, Color
from ..attributes import Animation, Data, Position, Rotation, Scale, Color
from ..utils import *
import uuid

Expand Down Expand Up @@ -42,6 +42,15 @@ def __init__(self, evt_handler=None, update_handler=None, **kwargs):
if "object_type" not in kwargs:
kwargs["object_type"] = Object.object_type

if "position" not in kwargs:
kwargs["position"] = Position(0,0,0)

if "rotation" not in kwargs:
kwargs["rotation"] = Rotation(0,0,0)

if "scale" not in kwargs:
kwargs["scale"] = Scale(1,1,1)

# print warning if object is being created with the same id as an existing object
if Object.exists(object_id):
if not Object.get(object_id).persist:
Expand Down
2 changes: 0 additions & 2 deletions examples/objects/image.py
Expand Up @@ -13,6 +13,4 @@ def make_im():
url=image_url
)

scene.add_object(im)

scene.run_tasks()
1 change: 0 additions & 1 deletion examples/objects/line.py
Expand Up @@ -13,6 +13,5 @@ def make_line():
end=end,
color=(0,255,0)
)
print(scene.add_object(line))

scene.run_tasks()

0 comments on commit 53d0688

Please sign in to comment.