Drawing 2D SVG markups using MarkupCore

做~自己de王妃 提交于 2020-01-07 06:54:14

问题


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

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