Skip to content

Commit

Permalink
chore(handler): remove unused UV data parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sean1832 committed Aug 31, 2024
1 parent 79b09eb commit f5025dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions portal/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def handle_str_data(data, data_type):
elif data_type == "Mesh":
message_dics = json.loads(data)
for i, item in enumerate(message_dics):
vertices, faces, uvs = MeshHandler.deserialize_mesh(item)
vertices, faces = MeshHandler.deserialize_mesh(item)
MeshHandler.create_or_replace_mesh(f"object_{i}", vertices, faces)
except json.JSONDecodeError:
raise ValueError(f"Unsupported data: {data}")
Expand All @@ -37,8 +37,7 @@ class MeshHandler:
def deserialize_mesh(data):
vertices = [(v["X"], v["Y"], v["Z"]) for v in data["Vertices"]]
faces = [tuple(face_list) for face_list in data["Faces"]]
uvs = [(uv["X"], uv["Y"]) for uv in data["UVs"]]
return vertices, faces, uvs
return vertices, faces

@staticmethod
def create_or_replace_mesh(object_name, vertices, faces):
Expand Down

0 comments on commit f5025dc

Please sign in to comment.