adds example PLY model
This commit is contained in:
parent
3afcc0af56
commit
081063647d
Binary file not shown.
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -66,6 +66,15 @@
|
|||
>
|
||||
</model-three>
|
||||
%end
|
||||
%if object['type'] == "ply":
|
||||
<model-ply
|
||||
:backgroundAlpha="0"
|
||||
@on-load="onLoad"
|
||||
:rotation="rotation"
|
||||
src="{{ object['urls'][0] }}"
|
||||
>
|
||||
</model-ply>
|
||||
%end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue