Skip to content

Commit

Permalink
Fixed missing name from morphing box example.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyjclark committed Mar 19, 2022
1 parent 3b215cb commit 958bf22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/morphing_box.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
{},
{}
],
"name": "Morphing Box",
"objects": [
{
"material": {
Expand Down
9 changes: 5 additions & 4 deletions examples/morphing_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

# Kludge to import logger from a relative path
from sys import path, stderr
path.append('../logger')

path.append("../logger")
from logger import Logger

BOX_NAME = "box"
BOX_SIZE = [0.25, 0.5, 0.1]
BOX_COLOR = [1, 1, 0, 1]
BOX_POS = [0, BOX_SIZE[1]/2, 0]
BOX_POS = [0, BOX_SIZE[1] / 2, 0]
BOX_ROT = [0, 0, 0, 1]

VISUALIZATION_STEP = 1
Expand All @@ -31,7 +32,7 @@ def morphing_box():
"""A simple example of changing the shape of an object."""

# Create the logger
logger = Logger(VISUALIZATION_STEP)
logger = Logger("Morphing Box", VISUALIZATION_STEP)

# Add all objects
logger.add_box(BOX_NAME, *BOX_SIZE, BOX_COLOR)
Expand Down Expand Up @@ -73,5 +74,5 @@ def morphing_box():
print(str(logger))


if __name__ == '__main__':
if __name__ == "__main__":
morphing_box()

0 comments on commit 958bf22

Please sign in to comment.