问题
Can you possibly provide a sample similar to https://forge.autodesk.com/cloud_and_mobile/2016/04/markup3d-sample-for-view-data-api.html, but now using the the MarkupCore now included in view3D.js? In particular how to draw and update the SVG graphics on top of the canvas. The source for the sample above seems to be removed from github.
回答1:
The source of the markup3D extension has been moved there:
https://github.com/Autodesk-Forge/library-javascript-viewer-extensions/tree/master/src/Viewing.Extension.Markup3D
This is only a sample, provided as-is, if you have requests for improvements it will be up to you to implement at your will.
The markupCore API is part of the viewer API, this only lets you create 2D markups that are bound to a fixed viewport.
I wrote an article about it, but there has been a few changes since then, the API is now part of viewer3D.js, so you won't have to load a separate file as mentioned in the post:
http://adndevblog.typepad.com/cloud_and_mobile/2016/02/playing-with-the-new-view-data-markup-api.html
The code used in the post is there:
https://github.com/Autodesk-Forge/library-javascript-viewer-extensions/tree/master/src/Viewing.Extension.Markup2D
Hope that helps
来源:https://stackoverflow.com/questions/42554749/drawing-2d-svg-markups-using-markupcore