Loading IconMarkupExtension

被刻印的时光 ゝ 提交于 2019-12-24 18:55:22

问题


Trying to add labels with text on top of the objects in 3D viewer. I found the following post about an extension that does this:

https://twitter.com/augustomaia/status/1205652823733460993

viewer.loadExtension('IconMarkupExtension', {
  icons: [
    { dbId: 987,label: '300C',css:'fas fa-thermometer' }
  ]
});

Loading this extension, produces the following error:

"Extension not found: IconMarkupExtension. Has it been registered?"

Is this part of the official Extensions? Or is there similar functionality available in some code example how to make extension like this that would add the text label on top of the object with dbid and label?


回答1:


It's a custom extension, still a work in progress, but you can check at this repo.




回答2:


You might also be interested in looking at some the example (specially the markup one) provided by Denis Gregor here: https://github.com/apprentice3d/ForgeViewerExtensions



来源:https://stackoverflow.com/questions/59353939/loading-iconmarkupextension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!