简体   繁体   English

如何将 Autodesk Forge model 查看器嵌入网站?

[英]How to embed Autodesk Forge model viewer into a website?

I have created a web application for viewing models using the AutoDesk Forge Viewer, and I want to be able to add this onto a website.我创建了一个 web 应用程序,用于使用 AutoDesk Forge 查看器查看模型,我希望能够将其添加到网站上。 I used this tutorial: https://learnforge.autodesk.io/#/tutorials/viewmodels (using node.js for the language option).我使用了本教程: https://learnforge.autodesk.io/#/tutorials/viewmodels (使用 node.js 作为语言选项)。

The goal is to have the user access the viewer application from the website.目标是让用户从网站访问查看器应用程序。 I have been using VS code live server for testing.我一直在使用 VS Code 实时服务器进行测试。 However, when I link the page that has the viewer into my own website, the viewer does not load the buckets or allow for creation of new buckets.但是,当我将具有查看器的页面链接到我自己的网站时,查看器不会加载存储桶或允许创建新存储桶。 It is just stuck on a loading symbol like below:它只是停留在加载符号上,如下所示:

[Loading screen][1] [载入画面][1]

Could I please have the following questions answered:能否请我回答以下问题:

  1. What is the proper way to embed this application onto a website in the manner I have described above?以我上面描述的方式将此应用程序嵌入网站的正确方法是什么?

  2. What part of the code controls where the buckets are loaded in?代码的哪一部分控制桶的加载位置?

Thank You.谢谢你。 [1]: https://i.stack.imgur.com/4Xlfv.png [1]: https://i.stack.imgur.com/4Xlfv.png

LearnForge tutorial is an example on how to work with Forge API. LearnForge 教程是一个关于如何使用 Forge API 的示例。 As a web app, it depends on how the developer(you) designs the user interface, workflow, and data management.作为 web 应用程序,它取决于开发人员(您)如何设计用户界面、工作流程和数据管理。

eg you can remove the panel of bucket & object lists,keeping the viewer only in the UI.例如,您可以删除存储桶和 object 列表的面板,仅将查看器保留在 UI 中。 while you will need to design how to provide the object id (urn) which will be loaded in the viewer.而您需要设计如何提供将在查看器中加载的 object id (urn)。 Normally, you would need to setup your own users management, logging process etc, and set your own user permission.通常,您需要设置自己的用户管理、日志记录过程等,并设置自己的用户权限。 Then the user logs in, the web app lists all files (objects) he has permission to check, and when one file is selected, get the urn and load the model in Forge Viewer. Then the user logs in, the web app lists all files (objects) he has permission to check, and when one file is selected, get the urn and load the model in Forge Viewer.

if the end user of your app is BIM360 users, you could take advantage of BIM360 data management workflow, which follows the same permission specified with BIM360.如果您的应用程序的最终用户是 BIM360 用户,您可以利用 BIM360 数据管理工作流程,该工作流程遵循 BIM360 指定的相同权限。 Then the other tutorial will be a good start.然后另一个教程将是一个好的开始。 https://learnforge.autodesk.io/#/tutorials/viewhubmodels https://learnforge.autodesk.io/#/tutorials/viewhubmodels

In any case, the workflow and UI are defined by yourself.无论如何,工作流程和 UI 都是由您自己定义的。 I hope this explains.我希望这能解释。 If you have any further questions that need a meeting call, please feel free to check the calendar of our team: https://calendly.com/autodeskforge如果您还有其他需要电话会议的问题,请随时查看我们团队的日历: https://calendly.com/autodeskforge

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM