问题
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