diff --git a/objects/examples/PLY/Lucy100k.ply b/objects/examples/PLY/Lucy100k.ply new file mode 100644 index 0000000..13467e9 Binary files /dev/null and b/objects/examples/PLY/Lucy100k.ply differ diff --git a/utils/utils.py b/utils/utils.py index 8fe736f..6ded0ef 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -26,7 +26,7 @@ BASE_DIR = os.path.abspath( '../') ) OBJECT_DIR = os.path.join(BASE_DIR, 'objects') -OBJECT_TYPES = ['gltf', 'glb', 'obj', 'fbx', 'stl', 'dae', 'json'] +OBJECT_TYPES = ['gltf', 'glb', 'obj', 'fbx', 'stl', 'dae', 'json', 'ply'] def get_directory_content(dir_path): content = [] @@ -112,6 +112,11 @@ def get_object(file_path, result={}): object_path = str(file_path).replace(OBJECT_DIR, "") result['urls'].append(f"/objects{object_path}") return result + if extension == 'ply': + result['type'] = "ply" + object_path = str(file_path).replace(OBJECT_DIR, "") + result['urls'].append(f"/objects{object_path}") + return result return None diff --git a/views/vue-3d.tpl b/views/vue-3d.tpl index ddf915b..7eaf3a1 100644 --- a/views/vue-3d.tpl +++ b/views/vue-3d.tpl @@ -66,6 +66,15 @@ > %end + %if object['type'] == "ply": + + + %end