Joni Turunen
Joni Turunen

Reputation: 137

Loading IconMarkupExtension

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:

Label extension

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?

Upvotes: 0

Views: 378

Answers (2)

Jeremy
Jeremy

Reputation: 367

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

Upvotes: 1

Augusto Goncalves
Augusto Goncalves

Reputation: 8594

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

Upvotes: 2

Related Questions