alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
41.27k stars 5.32k forks source link

请求增加 3D 模型预览/展示功能 #2788

Closed Febtw closed 1 year ago

Febtw commented 1 year ago

Please make sure of the following things

Description of the feature / 需求描述

1、Alist 已经支持了文本和多媒体的众多格式的预览,如果可以支持3D模型的展示,那么会使Alist变得更酷; 2、已有 kovacsv/Online3DViewer https://3dviewer.net/google/model-viewer https://modelviewer.dev/ 等方案便于开发,用 Alist 提供文件列表相得益彰。

Suggested solution / 实现思路

kovacsv/Online3DViewer https://3dviewer.net/google/model-viewer https://modelviewer.dev/ 结合

Additional context / 附件

No response

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the issue template!

xhofe commented 1 year ago

You can add it yourself by editing iframe-previews like:

        "glb": {
                "3dviewer": "https://3dviewer.net/#model=$url"
        }

demo: https://al.nn.ci/local/DamagedHelmet.glb

Febtw commented 1 year ago

You can add it yourself by editing iframe-previews like:

        "glb": {
                "3dviewer": "https://3dviewer.net/#model=$url"
        }

demo: https://al.nn.ci/local/DamagedHelmet.glb

This is my iframe-previews setting

{
    "doc,docx,xls,xlsx,ppt,pptx": {
        "Microsoft":"https://view.officeapps.live.com/op/view.aspx?src=$e_url",
        "Google":"https://docs.google.com/gview?url=$e_url&embedded=true"
    },
    "pdf": {
        "PDF.js":"https://alist-org.github.io/pdf.js/web/viewer.html?file=$e_url"
    },
    "obj,3ds,stl,ply,gltf,glb,off,3dm,fbx,dae,wrl,3mf,ifc,brep,step,iges,fcstd,bim": {
        "3Dviewer":"https://3dviewer.net/#model=$e_url"
    }
}

There's still something wrong. image

Febtw commented 1 year ago

Should I start a new issue?I also want to have GeoGebra Apps embeded. Reference:GeoGebra Apps Embedding

xhofe commented 1 year ago

No we will no longer add previews for new file types. Embed iframe for preview by editing iframe_previews yourself please.

github-actions[bot] commented 1 year ago

Hello @Febtw, this issue will not be worked on and will be closed. 你好 @Febtw,这不会被处理,将被关闭。

Febtw commented 1 year ago

No we will no longer add previews for new file types. Embed iframe for preview by editing iframe_previews yourself please.

Please, I have the last question, which parameter represents Alist file url ? I have tried $url and $e_url , it gets url like https://xxx.sharepoint.com/personal/xxx_onmicrosoft_com/_layouts/15/download.aspx?loooooong_string. And 3dviewer can't read the url. But It works, when I replace $url with Alist file url like https://my.site/d/Alist/DamagedHelmet.glb?sign=long_string=:0

My drive is Onedrive And ./alist version Built At: 2022-12-05 13:55:03 +0000 Go Version: go1.19.3 linux/amd64 (but my system is ubuntu 20.04 arm64) Author: Noah Hsu i@nn.ci Commit ID: f1a9b68 Version: v3.6.0 WebVersion: 3.6.0