首页 > 解决方案 > 在 Web 组件中使用 Autodesk Forge

问题描述

我正在尝试创建一个包含伪造查看器的 web 组件。我很遗憾地遇到了伪造查看器无法正确加载 lmvworker 和 allstrings.json 的问题

看起来查看器在将它们用于 Web 组件时遇到问题:viewer3D.js:40122 GET https://stacksnippets.net/lmvworker.js 404(未找到)

查看器从 developer.api.autodesk.com 获取

要正确查看错误,请打开检查器。

<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>Core</title>
  <base href="./">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.14/webcomponents-hi.js"></script>
  <link rel="import" href="https://raw.githubusercontent.com/zedero/forge-webcomponent/master/bim.html">
</head>

<body>
  <bim-viewer></bim-viewer>
</body>

</html>

标签: autodesk-forge

解决方案


Webcomponentjs still new to me, but manually loading lmvworker.js causes some problems. Can you try removing this line?


推荐阅读