autodesk-forge - 在 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>
解决方案
Webcomponentjs still new to me, but manually loading lmvworker.js
causes some problems. Can you try removing this line?
推荐阅读
- r - 如何从具有符号参数的函数的结果创建方程
- excel - 循环为每一行发送一封电子邮件
- node.js - 使用 axios 在 nodejs 中执行 post 请求,但我无法在 post 路由中接收数据
- javascript - 如何查找数组内的差异值并记录差异的索引
- python - 无法使用 pool.apply_async 通过多处理聚合结果
- swift - Codable 结构中的 Codable 变量导致错误
- bevy - 如何防止相机在 Bevy 中看穿墙壁?
- php - php-在bind_param()中长时间使用“s”或“i”?
- javascript - GET 请求有时在 Postman 中有效,但在 Axios 中失败
- ios - ScrollView 位置数据 / SwiftUi