From 91e188718e49cf3de4232e559a3a0112d56e7847 Mon Sep 17 00:00:00 2001 From: Nopfed Date: Mon, 12 Feb 2024 19:01:45 -0500 Subject: [PATCH] WIP: Able to call methods on model viewer --- components/ThreeDModel.vue | 10 ++++++++-- pages/publish/index.vue | 28 ++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/components/ThreeDModel.vue b/components/ThreeDModel.vue index d10f1a8..2a604e0 100644 --- a/components/ThreeDModel.vue +++ b/components/ThreeDModel.vue @@ -56,10 +56,16 @@ const getBlob = async () => { } const getDataURL = () => { - return modelViewer.value?.toDataURL() + return modelViewer.value?.toDataURL('image/jpeg') +} + +const showPoster = () => { + return modelViewer.value?.showPoster() } defineExpose({ - getDataURL + getBlob, + getDataURL, + showPoster }) \ No newline at end of file diff --git a/pages/publish/index.vue b/pages/publish/index.vue index 7be8757..f00789b 100644 --- a/pages/publish/index.vue +++ b/pages/publish/index.vue @@ -39,7 +39,7 @@ - + @@ -179,7 +179,7 @@