在Autodesk Forge Viewer中升级三个js版本 [英] upgrade three js version in autodesk forge viewer

查看:104
本文介绍了在Autodesk Forge Viewer中升级三个js版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当时一直在试图升级在Autodesk Forge幕后使用的三个js,升级的原因是我试图使用库,它需要三个js r71及更高版本,并且在伪造查看器中似乎正在使用r33.我找到了一个博客,向我展示了如何利用后面的三个js的优势.我遵循了它,但似乎它不起作用.那里的伪造查看器现在有3个js的2个引用,并且混淆了使用哪个js,因此有些代码表现得很奇怪

I was looking to upgrade the three js which is used in autodesk forge behind the scene and reason for upgrade is I am trying to use this library and this need three js r71 and above and inside forge viewer it seems they are using r33. I found a blog where it showed me how can I take the advantage of later three js. I followed it but seems like its not working. There forge viewer now have 2 references of three js and it gets confused which one to use and hence some of code behave weird

这是我身上发生的一个例子

here is one of the example happening to me

THREE.Object3D.add: object not an instance of THREE.Object3D. 

当我尝试添加场景时得到了这个

I am getting this when I am trying to add a scene

有些人可能想知道Forge Viewer随附的三个js发生了什么因此,这里是被破坏的东西

some might would like to know what was happening with the three js which comes with forge viewer so here is the thing which is getting broken

我也尝试过在下面做这件事将源代码添加到三个js

I have also tried doing this below things adding source to three js

 <script src=" https://cdnjs.cloudflare.com/ajax/libs/three.js/r122/three.min.js"></script>

如果有人尝试过网格线库并且遇到类似的问题并且有解决方案,请问有其他解决方案可供我尝试

So is there any other solution which I can try and make it work also If someone had tried meshline library and faced similar issue and have solution for it do let me know

推荐答案

Forge Viewer使用Three.js版本71,并且由于两个库的编写方式不同,不幸的是很难将Forge Viewer移植到更现代的版本.Three.js.

Forge Viewer uses Three.js version 71, and due to the way both libraries are written, it is unfortunately very difficult to port Forge Viewer to more modern versions of Three.js.

您可以尝试向后移植您感兴趣的Three.js部分(我对

You can try back-porting parts of Three.js that you're interested in manually (I did that for the Potree point cloud library), but such work is not an officially supported.

这篇关于在Autodesk Forge Viewer中升级三个js版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆