问题描述
是否有一种简单的方法可以在Forge Viewer中更改模型浏览器的内容?我想重命名som节点,添加和删除节点.
不幸的是,Model Browser从对象树(model.getInstanceTree()
)中获取数据,该对象树是不可变的,只能通过重新创建自己的数据结构来扩展./p>
以下是两个不错的起点:
-
数据结构: https://forge.autodesk .com/blog/supporting-multiple-models-new-modelstructurepanel
-
行为: https://forge.autodesk. com/blog/customizing-modelstructurepanel-behavior-forge-viewer
-
代码示例: https://github .com/yiskang/forge-au-sample/tree/master/model-structure
Is there an easy way to change the content of Model Browser in the Forge Viewer? I would like to rename som nodes, add and remove node.
Unfortunately Model Browser sources its data from the object tree (model.getInstanceTree()
) which is immutable and can only be extended by re-creating your own data structure.
Here’s a couple of good starting points:
Data Structure: https://forge.autodesk.com/blog/supporting-multiple-models-new-modelstructurepanel
Behavior: https://forge.autodesk.com/blog/customizing-modelstructurepanel-behavior-forge-viewer
Code Sample: https://github.com/yiskang/forge-au-sample/tree/master/model-structure
这篇关于在Forge Viewer中更改模型浏览器的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!