Open ali-faiz-brainx opened 1 year ago
Hello,
It should be quite easy. Most of public API is covered by several methods in DxfViewer.js, they are documented in the code as much as possible. Vue.js wrapper component demonstrates their invokations, it is pretty simple and does not require Vue.js knowledge to understand it. Basically, you create the viewer instance by providing container element, and some options (documented here). Then load the file. To utilize backgound loading, web-worker factory function should be provided (otherwise it will load in UI thread which may make it unresponsive while loading), this example uses webpack worker loader to get such factory function (it can be vanilla JS function like ()=>new Worker('my-worker-script.js')
). Worker script should invoke DxfViewer.SetupWorker()
which implements whole the worker functionality. Working with layers is also pretty simple and can be checked here.
I will try to find some time and add a brief description of the above to the package readme.
Hey there I don't know vue js too much and I want to make the same example for react js. Is there any GitHub repo that uses dxf-viewer or any blog?